VirtualBox

Ignore:
Timestamp:
Mar 16, 2009 4:43:16 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: 2869: Rework network adapter UI - giving better width to MAC address line-edit.

File:
1 edited

Legend:

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

    r17903 r17954  
    7474    mLeMAC->setValidator (new QRegExpValidator
    7575        (QRegExp ("[0-9A-Fa-f][02468ACEace][0-9A-Fa-f]{10}"), this));
    76     QStyleOption options;
     76    QStyleOptionFrame options;
    7777    options.initFrom (mLeMAC);
    78     QSize contentSize (mLeMAC->fontMetrics().width ('X') * 12,
    79                        mLeMAC->fontMetrics().xHeight());
     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);
    8084    QSize totalSize = style()->sizeFromContents (QStyle::CT_LineEdit,
    8185                                                 &options, contentSize, this);
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