VirtualBox

Changeset 711 in vbox


Ignore:
Timestamp:
Feb 6, 2007 2:35:31 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
18350
Message:

FE/Qt: Fixed Global Settings centering; fixed som USB UI spacing; added the minimum width (~40 characters) for the whatsThis pane.

Location:
trunk/src/VBox/Frontends/VirtualBox/ui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui

    r704 r711  
    2727            <x>0</x>
    2828            <y>0</y>
    29             <width>520</width>
     29            <width>580</width>
    3030            <height>370</height>
    3131        </rect>
     
    419419                        <number>0</number>
    420420                    </property>
    421                     <property name="spacing">
    422                         <number>10</number>
    423                     </property>
    424                     <widget class="QLayoutWidget">
     421                    <widget class="QGroupBox">
    425422                        <property name="name">
    426                             <cstring>layout47</cstring>
    427                         </property>
    428                         <hbox>
     423                            <cstring>grbKeyboard</cstring>
     424                        </property>
     425                        <property name="title">
     426                            <string>&amp;Keyboard</string>
     427                        </property>
     428                        <vbox>
    429429                            <property name="name">
    430430                                <cstring>unnamed</cstring>
     
    432432                            <widget class="QLayoutWidget">
    433433                                <property name="name">
    434                                     <cstring>layoutHostKey</cstring>
     434                                    <cstring>layout47</cstring>
    435435                                </property>
    436436                                <hbox>
     
    438438                                        <cstring>unnamed</cstring>
    439439                                    </property>
    440                                     <widget class="QLabel">
     440                                    <widget class="QLayoutWidget">
    441441                                        <property name="name">
    442                                             <cstring>txHostKey</cstring>
     442                                            <cstring>layoutHostKey</cstring>
    443443                                        </property>
    444                                         <property name="text">
    445                                             <string>Host &amp;Key</string>
     444                                        <hbox>
     445                                            <property name="name">
     446                                                <cstring>unnamed</cstring>
     447                                            </property>
     448                                            <widget class="QLabel">
     449                                                <property name="name">
     450                                                    <cstring>txHostKey</cstring>
     451                                                </property>
     452                                                <property name="text">
     453                                                    <string>&amp;Host Key</string>
     454                                                </property>
     455                                            </widget>
     456                                        </hbox>
     457                                    </widget>
     458                                    <spacer>
     459                                        <property name="name">
     460                                            <cstring>spacer22</cstring>
    446461                                        </property>
    447                                     </widget>
     462                                        <property name="orientation">
     463                                            <enum>Horizontal</enum>
     464                                        </property>
     465                                        <property name="sizeType">
     466                                            <enum>Expanding</enum>
     467                                        </property>
     468                                        <property name="sizeHint">
     469                                            <size>
     470                                                <width>40</width>
     471                                                <height>20</height>
     472                                            </size>
     473                                        </property>
     474                                    </spacer>
    448475                                </hbox>
    449476                            </widget>
    450                             <spacer>
     477                            <widget class="QCheckBox">
    451478                                <property name="name">
    452                                     <cstring>spacer22</cstring>
    453                                 </property>
    454                                 <property name="orientation">
    455                                     <enum>Horizontal</enum>
    456                                 </property>
    457                                 <property name="sizeType">
    458                                     <enum>Expanding</enum>
    459                                 </property>
    460                                 <property name="sizeHint">
    461                                     <size>
    462                                         <width>40</width>
    463                                         <height>20</height>
    464                                     </size>
    465                                 </property>
    466                             </spacer>
    467                         </hbox>
    468                     </widget>
    469                     <widget class="QCheckBox">
    470                         <property name="name">
    471                             <cstring>chbAutoCapture</cstring>
    472                         </property>
    473                         <property name="text">
    474                             <string>&amp;Auto capture keyboard</string>
    475                         </property>
    476                         <property name="accel">
    477                             <string>Alt+A</string>
    478                         </property>
    479                         <property name="whatsThis" stdset="0">
    480                             <string>When checked, the keyboard is automatically
    481 captured every time the VM window is activated.</string>
    482                         </property>
     479                                    <cstring>chbAutoCapture</cstring>
     480                                </property>
     481                                <property name="text">
     482                                    <string>&amp;Auto capture keyboard</string>
     483                                </property>
     484                                <property name="accel">
     485                                    <string>Alt+A</string>
     486                                </property>
     487                                <property name="whatsThis" stdset="0">
     488                                    <string>When checked, the keyboard is automatically
     489captured every time the VM window is activated. When the keyboard is captured,
     490all keystrokes (including system ones like Alt-Tab) are directed to the VM.</string>
     491                                </property>
     492                            </widget>
     493                        </vbox>
    483494                    </widget>
    484495                    <spacer>
     
    495506                            <size>
    496507                                <width>20</width>
    497                                 <height>120</height>
     508                                <height>40</height>
    498509                            </size>
    499510                        </property>
     
    10171028</forwards>
    10181029<variables>
     1030    <variable access="private">bool polished;</variable>
    10191031    <variable access="private">bool valid;</variable>
    10201032    <variable access="private">QTimer *whatsThisTimer;</variable>
     
    10481060<functions>
    10491061    <function access="private">init()</function>
     1062    <function access="protected">showEvent( QShowEvent * )</function>
    10501063    <function>getFrom( const CSystemProperties &amp; props, const VMGlobalSettings &amp; gs )</function>
    10511064    <function>putBackTo( CSystemProperties &amp; props, VMGlobalSettings &amp; gs )</function>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui.h

    r704 r711  
    7575void VBoxGlobalSettingsDlg::init()
    7676{
     77    polished = false;
     78
    7779    setCaption (tr ("VirtualBox Global Settings"));
    7880    setIcon (QPixmap::fromMimeSource ("global_settings_16px.png"));
     
    121123                                      6 /* seems that RichText adds some margin */ +
    122124                                      whatsThisLabel->fontMetrics().lineSpacing() * 3);
     125    whatsThisLabel->setMinimumWidth (whatsThisLabel->frameWidth() * 2 +
     126                                     6 /* seems that RichText adds some margin */ +
     127                                     whatsThisLabel->fontMetrics().width ('m') * 40);
    123128   
    124129    /*
     
    127132     */
    128133
    129     hkeHostKey = new QIHotKeyEdit( pageKeyboard, "hkeHostKey" );
    130     hkeHostKey->setSizePolicy(
    131         QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ));
     134    hkeHostKey = new QIHotKeyEdit (grbKeyboard, "hkeHostKey");
     135    hkeHostKey->setSizePolicy (QSizePolicy (QSizePolicy::Preferred, QSizePolicy::Fixed));
    132136    QWhatsThis::add (hkeHostKey,
    133137        tr ("Displays the key used as a Host Key in the VM window. Activate the "
    134138            "entry field and press a new Host Key. Note that alphanumeric, "
    135139            "cursor movement and editing keys cannot be used as a Host Key."));
    136     layoutHostKey->addWidget( hkeHostKey );
    137     txHostKey->setBuddy( hkeHostKey );
     140    layoutHostKey->addWidget (hkeHostKey);
     141    txHostKey->setBuddy (hkeHostKey);
    138142    setTabOrder (listView, hkeHostKey);
    139143
     
    240244}
    241245
     246void VBoxGlobalSettingsDlg::showEvent (QShowEvent *e)
     247{
     248    QDialog::showEvent (e);
     249
     250    /* one may think that QWidget::polish() is the right place to do things
     251     * below, but apparently, by the time when QWidget::polish() is called,
     252     * the widget style & layout are not fully done, at least the minimum
     253     * size hint is not properly calculated. Since this is sometimes necessary,
     254     * we provide our own "polish" implementation. */
     255
     256    if (polished)
     257        return;
     258
     259    polished = true;
     260
     261    /* resize to the miminum possible size */
     262    resize (minimumSize());
     263
     264    VBoxGlobal::centerWidget (this, parentWidget());
     265}
     266
    242267void VBoxGlobalSettingsDlg::listView_currentChanged (QListViewItem *item)
    243268{
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxUSBFilterSettings.ui

    r704 r711  
    9393                    <hsizetype>5</hsizetype>
    9494                    <vsizetype>0</vsizetype>
    95                     <horstretch>3</horstretch>
     95                    <horstretch>5</horstretch>
    9696                    <verstretch>0</verstretch>
    9797                </sizepolicy>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h

    r704 r711  
    269269                                      6 /* seems that RichText adds some margin */ +
    270270                                      whatsThisLabel->fontMetrics().lineSpacing() * 3);
     271    whatsThisLabel->setMinimumWidth (whatsThisLabel->frameWidth() * 2 +
     272                                     6 /* seems that RichText adds some margin */ +
     273                                     whatsThisLabel->fontMetrics().width ('m') * 40);
    271274
    272275    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette