VirtualBox

Changeset 66910 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 16, 2017 2:08:48 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
115435
Message:

FE/Qt: bugref:8847: Host Network Manager: Had to adjust macOS layout a bit for one of radio buttons (to make it similar to another). Strange thing actually, layout visually had 1px border.

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

Legend:

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

    r66860 r66910  
    4646    , m_pTabWidget(0)
    4747    , m_pButtonAutomatic(0), m_pErrorPaneAutomatic(0)
    48     , m_pButtonManual(0)
     48    , m_pButtonManual(0), m_pErrorPaneManual(0)
    4949    , m_pLabelIPv4(0), m_pEditorIPv4(0), m_pErrorPaneIPv4(0)
    5050    , m_pLabelNMv4(0), m_pEditorNMv4(0), m_pErrorPaneNMv4(0)
     
    283283            }
    284284
    285             /* Create manual interface configuration radio-button: */
    286             m_pButtonManual = new QRadioButton;
    287             AssertPtrReturnVoid(m_pButtonManual);
    288             {
    289                 /* Configure radio-button: */
    290                 connect(m_pButtonManual, &QRadioButton::toggled,
    291                         this, &UIHostNetworkDetailsDialog::sltToggledButtonManual);
    292                 /* Add into layout: */
    293                 pLayoutInterface->addWidget(m_pButtonManual, 1, 0, 1, 3);
     285            /* Create manual interface configuration layout: */
     286            QHBoxLayout *pLayoutManual = new QHBoxLayout;
     287            AssertPtrReturnVoid(pLayoutManual);
     288            {
     289                /* Configure layout: */
     290                pLayoutManual->setContentsMargins(0, 0, 0, 0);
     291                /* Create manual interface configuration radio-button: */
     292                m_pButtonManual = new QRadioButton;
     293                AssertPtrReturnVoid(m_pButtonManual);
     294                {
     295                    /* Configure radio-button: */
     296                    connect(m_pButtonManual, &QRadioButton::toggled,
     297                            this, &UIHostNetworkDetailsDialog::sltToggledButtonManual);
     298                    /* Add into layout: */
     299                    pLayoutManual->addWidget(m_pButtonManual);
     300                }
     301                /* Create manual interface configuration error pane: */
     302                m_pErrorPaneManual = new QLabel;
     303                AssertPtrReturnVoid(m_pErrorPaneManual);
     304                {
     305                    /* Configure label: */
     306                    m_pErrorPaneManual->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
     307                    m_pErrorPaneManual->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
     308                    m_pErrorPaneManual->setPixmap(UIIconPool::iconSet(":/status_error_16px.png").pixmap(QSize(16, 16)));
     309                    /* Add into layout: */
     310                    pLayoutManual->addWidget(m_pErrorPaneManual);
     311                }
     312                /* Add into layout: */
     313                pLayoutInterface->addLayout(pLayoutManual, 1, 0, 1, 3);
    294314            }
    295315
     
    766786                            && !m_newData.m_dhcpserver.m_fEnabled;
    767787        m_pErrorPaneAutomatic->setVisible(fError);
     788    }
     789    if (!pWidget || pWidget == m_pErrorPaneManual)
     790    {
     791        const bool fError = false;
     792        m_pErrorPaneManual->setVisible(fError);
    768793    }
    769794    if (!pWidget || pWidget == m_pErrorPaneIPv4)
  • trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkDetailsDialog.h

    r66855 r66910  
    264264        /** Holds the manual interface configuration button. */
    265265        QRadioButton *m_pButtonManual;
     266        /** Holds the manual interface configuration error pane. */
     267        QLabel       *m_pErrorPaneManual;
    266268
    267269        /** Holds the IPv4 address label. */
Note: See TracChangeset for help on using the changeset viewer.

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