VirtualBox

Changeset 18259 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Mar 25, 2009 1:57:55 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: fixed sizes on the Mac for the global language & network settings

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGLSettingsLanguage.cpp

    r18247 r18259  
    257257
    258258    /* Adjust selector list */
     259#ifdef Q_WS_MAC
     260    mTwLanguage->setFixedWidth (static_cast<QAbstractItemView*> (mTwLanguage)
     261#else /* Q_WS_MAC */
    259262    mTwLanguage->setMinimumWidth (static_cast<QAbstractItemView*> (mTwLanguage)
     263#endif /* Q_WS_MAC */
    260264        ->sizeHintForColumn (0) + 2 * mTwLanguage->frameWidth() +
    261265        QApplication::style()->pixelMetric (QStyle::PM_ScrollBarExtent));
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGLSettingsNetwork.cpp

    r18251 r18259  
    249249    mTwInterfaces->setContextMenuPolicy (Qt::CustomContextMenu);
    250250
    251     /* Setup data label */
    252     mLbInfo->setMinimumHeight (fontMetrics().height() * 4);
    253 
    254251    /* Prepare toolbar */
    255252    mAddInterface = new QAction (mTwInterfaces);
     
    318315    mTwInterfaces->setCurrentItem (item);
    319316    updateCurrentItem();
     317
     318#ifdef Q_WS_MAC
     319    int width = qMax (static_cast<QAbstractItemView*> (mTwInterfaces)
     320        ->sizeHintForColumn (0) + 2 * mTwInterfaces->frameWidth() +
     321        QApplication::style()->pixelMetric (QStyle::PM_ScrollBarExtent),
     322        160);
     323    mTwInterfaces->setFixedWidth (width);
     324    mTwInterfaces->resizeColumnToContents (0);
     325#else /* Q_WS_MAC */
     326    mSpacer1->changeSize (0, 0, QSizePolicy::Ignored, QSizePolicy::Ignored);
     327#endif /* Q_WS_MAC */
    320328}
    321329
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGLSettingsNetwork.ui

    r18247 r18259  
    1 <ui version="4.0" >
     1<?xml version="1.0" encoding="UTF-8"?>
     2<ui version="4.0">
    23 <comment>
    3  VBox frontends: Qt4 GUI ("VirtualBox"):
     4 VBox frontends: Qt4 GUI (&quot;VirtualBox&quot;):
    45
    56 Copyright (C) 2009 Sun Microsystems, Inc.
     
    910 you can redistribute it and/or modify it under the terms of the GNU
    1011 General Public License (GPL) as published by the Free Software
    11  Foundation, in version 2 as it comes in the "COPYING" file of the
     12 Foundation, in version 2 as it comes in the &quot;COPYING&quot; file of the
    1213 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    1314 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
     
    1819 </comment>
    1920 <class>VBoxGLSettingsNetwork</class>
    20  <widget class="QWidget" name="VBoxGLSettingsNetwork" >
    21   <property name="geometry" >
     21 <widget class="QWidget" name="VBoxGLSettingsNetwork">
     22  <property name="geometry">
    2223   <rect>
    2324    <x>0</x>
    2425    <y>0</y>
    25     <width>346</width>
    26     <height>246</height>
     26    <width>286</width>
     27    <height>219</height>
    2728   </rect>
    2829  </property>
    29   <layout class="QGridLayout" >
    30    <item row="0" column="0" >
     30  <layout class="QGridLayout" name="gridLayout">
     31   <item row="0" column="0">
    3132    <spacer>
    32      <property name="orientation" >
     33     <property name="orientation">
    3334      <enum>Qt::Horizontal</enum>
    3435     </property>
    35      <property name="sizeType" >
     36     <property name="sizeType">
    3637      <enum>QSizePolicy::Fixed</enum>
    3738     </property>
    38      <property name="sizeHint" >
     39     <property name="sizeHint" stdset="0">
    3940      <size>
    4041       <width>40</width>
     
    4445    </spacer>
    4546   </item>
    46    <item row="0" column="1" colspan="3" >
    47     <widget class="QLabel" name="mLbPageName" >
    48      <property name="text" >
     47   <item row="0" column="1" colspan="4">
     48    <widget class="QLabel" name="mLbPageName">
     49     <property name="text">
    4950      <string>&amp;Host-only Networks List:</string>
    5051     </property>
    51      <property name="buddy" >
     52     <property name="buddy">
    5253      <cstring>mTwInterfaces</cstring>
    5354     </property>
    5455    </widget>
    5556   </item>
    56    <item row="1" column="1" rowspan="2" >
    57     <spacer>
    58      <property name="orientation" >
    59       <enum>Qt::Horizontal</enum>
    60      </property>
    61      <property name="sizeType" >
    62       <enum>QSizePolicy::Fixed</enum>
    63      </property>
    64      <property name="sizeHint" >
    65       <size>
    66        <width>20</width>
    67        <height>10</height>
    68       </size>
    69      </property>
    70     </spacer>
    71    </item>
    72    <item row="1" column="2" rowspan="2" >
    73     <widget class="QTreeWidget" name="mTwInterfaces" >
    74      <property name="rootIsDecorated" >
    75       <bool>false</bool>
    76      </property>
    77      <property name="sizePolicy" >
    78       <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
     57   <item row="1" column="2" rowspan="2">
     58    <widget class="QTreeWidget" name="mTwInterfaces">
     59     <property name="sizePolicy">
     60      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
    7961       <horstretch>0</horstretch>
    8062       <verstretch>0</verstretch>
    8163      </sizepolicy>
    8264     </property>
    83      <property name="minimumSize" >
     65     <property name="minimumSize">
    8466      <size>
    8567       <width>0</width>
     
    8769      </size>
    8870     </property>
    89      <property name="whatsThis" >
     71     <property name="whatsThis">
    9072      <string>Lists all available host-only networks.</string>
    9173     </property>
     74     <property name="rootIsDecorated">
     75      <bool>false</bool>
     76     </property>
    9277     <column>
    93       <property name="text" >
     78      <property name="text">
    9479       <string>Name</string>
    9580      </property>
     
    9782    </widget>
    9883   </item>
    99    <item row="1" column="3" >
    100     <widget class="VBoxToolBar" name="mTbActions" >
    101      <property name="orientation" >
     84   <item row="1" column="3">
     85    <widget class="VBoxToolBar" name="mTbActions">
     86     <property name="orientation">
    10287      <enum>Qt::Horizontal</enum>
    10388     </property>
    10489    </widget>
    10590   </item>
    106    <item row="2" column="3" >
     91   <item row="2" column="1">
    10792    <spacer>
    108      <property name="orientation" >
     93     <property name="orientation">
     94      <enum>Qt::Horizontal</enum>
     95     </property>
     96     <property name="sizeType">
     97      <enum>QSizePolicy::Fixed</enum>
     98     </property>
     99     <property name="sizeHint" stdset="0">
     100      <size>
     101       <width>20</width>
     102       <height>20</height>
     103      </size>
     104     </property>
     105    </spacer>
     106   </item>
     107   <item row="2" column="3">
     108    <spacer>
     109     <property name="orientation">
    109110      <enum>Qt::Vertical</enum>
    110111     </property>
    111      <property name="sizeType" >
     112     <property name="sizeType">
    112113      <enum>QSizePolicy::Expanding</enum>
    113114     </property>
    114      <property name="sizeHint" >
     115     <property name="sizeHint" stdset="0">
    115116      <size>
    116117       <width>10</width>
     
    120121    </spacer>
    121122   </item>
    122    <item row="3" column="2" >
    123     <widget class="QLabel" name="mLbInfo" >
    124      <property name="sizePolicy" >
    125       <sizepolicy vsizetype="Minimum" hsizetype="Expanding" >
     123   <item row="2" column="4">
     124    <spacer name="mSpacer1">
     125     <property name="orientation">
     126      <enum>Qt::Horizontal</enum>
     127     </property>
     128     <property name="sizeType">
     129      <enum>QSizePolicy::Expanding</enum>
     130     </property>
     131     <property name="sizeHint" stdset="0">
     132      <size>
     133       <width>2</width>
     134       <height>20</height>
     135      </size>
     136     </property>
     137    </spacer>
     138   </item>
     139   <item row="3" column="2" colspan="3">
     140    <widget class="QLabel" name="mLbInfo">
     141     <property name="sizePolicy">
     142      <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
    126143       <horstretch>0</horstretch>
    127144       <verstretch>0</verstretch>
    128145      </sizepolicy>
    129146     </property>
    130      <property name="alignment" >
     147     <property name="alignment">
    131148      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
    132149     </property>
    133      <property name="wordWrap" >
     150     <property name="wordWrap">
    134151      <bool>true</bool>
    135152     </property>
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