VirtualBox

Changeset 17960 in vbox


Ignore:
Timestamp:
Mar 16, 2009 5:31:15 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: 2869: Rework network adapter UI - Make better line-edit lengths.

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

Legend:

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

    r17954 r17960  
    5656    //mLeHMv6->setValidator (new QRegExpValidator
    5757    //    (QRegExp ("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"), this));
     58    mLeIPv6->setFixedWidthByText (QString().fill ('X', 39));
    5859    connect (mCbHOI, SIGNAL (currentIndexChanged (int)),
    5960             this, SLOT (hostOnlyInterfaceChanged()));
     
    7475    mLeMAC->setValidator (new QRegExpValidator
    7576        (QRegExp ("[0-9A-Fa-f][02468ACEace][0-9A-Fa-f]{10}"), this));
    76     QStyleOptionFrame options;
    77     options.initFrom (mLeMAC);
    78     options.rect = mLeMAC->contentsRect();
    79     options.lineWidth = mLeMAC->style()->pixelMetric (QStyle::PM_DefaultFrameWidth);
    80     options.midLineWidth = 0;
    81     options.state |= QStyle::State_Sunken;
    82     QSize contentSize (mLeMAC->fontMetrics().width ('X') * 12 + 2*2,
    83                        mLeMAC->fontMetrics().xHeight()        + 2*1);
    84     QSize totalSize = style()->sizeFromContents (QStyle::CT_LineEdit,
    85                                                  &options, contentSize, this);
    86     mLeMAC->setMinimumWidth (totalSize.width());
     77    mLeMAC->setFixedWidthByText (QString().fill ('X', 12));
    8778    connect (mTbMAC, SIGNAL (clicked()), this, SLOT (genMACClicked()));
    8879#if defined (Q_WS_MAC)
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsNetworkDetails.ui

    r17901 r17960  
    190190   </item>
    191191   <item row="6" column="2" colspan="3" >
    192     <widget class="QLineEdit" name="mLeIPv4" >
     192    <widget class="QILineEdit" name="mLeIPv4" >
    193193     <property name="sizePolicy" >
    194194      <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
     
    216216   </item>
    217217   <item row="7" column="2" colspan="3" >
    218     <widget class="QLineEdit" name="mLeHMv4" >
     218    <widget class="QILineEdit" name="mLeHMv4" >
    219219     <property name="sizePolicy" >
    220220      <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
     
    242242   </item>
    243243   <item row="8" column="2" colspan="3" >
    244     <widget class="QLineEdit" name="mLeIPv6" >
     244    <widget class="QILineEdit" name="mLeIPv6" >
    245245     <property name="sizePolicy" >
    246246      <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
     
    268268   </item>
    269269   <item row="9" column="2" colspan="3" >
    270     <widget class="QLineEdit" name="mLeHMv6" >
     270    <widget class="QILineEdit" name="mLeHMv6" >
    271271     <property name="sizePolicy" >
    272272      <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
     
    323323   </item>
    324324   <item row="11" column="2" colspan="2" >
    325     <widget class="QLineEdit" name="mLeMAC" >
     325    <widget class="QILineEdit" name="mLeMAC" >
    326326     <property name="sizePolicy" >
    327327      <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
     
    385385   <extends>QLabel</extends>
    386386   <header>QILabelSeparator.h</header>
     387  </customwidget>
     388  <customwidget>
     389   <class>QILineEdit</class>
     390   <extends>QLineEdit</extends>
     391   <header>QILineEdit.h</header>
    387392  </customwidget>
    388393  <customwidget>
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