VirtualBox

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


Ignore:
Timestamp:
Aug 23, 2023 8:01:03 AM (16 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10496, bugref:9072. Adding a close button to panel container.

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

Legend:

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

    r100917 r100951  
    5050    : QWidget(pParent)
    5151    , m_pTabWidget(0)
     52    , m_pCloseButton(0)
    5253{
    5354    prepare();
    5455}
     56
     57//     m_pCloseButton = new QIToolButton;
     58//     if (m_pCloseButton)
     59//     {
     60//         m_pCloseButton->setIcon(UIIconPool::iconSet(":/close_16px.png"));
     61//         m_pMainLayout->addWidget(m_pCloseButton, 0, Qt::AlignLeft);
     62//     }
     63// }
     64
     65// void UIDialogPanel::prepareConnections()
     66// {
     67//     if (m_pCloseButton)
     68//         connect(m_pCloseButton, &QIToolButton::clicked, this, &UIDialogPanel::hide);
     69// }
     70
     71// void UIDialogPanel::retranslateUi()
     72// {
     73//     if (m_pCloseButton)
     74//         m_pCloseButton->setToolTip(tr("Close the pane"));
     75// }
    5576
    5677void UIDialogPanelBase::prepare()
     
    6384    AssertReturnVoid(m_pTabWidget);
    6485    pLayout->addWidget(m_pTabWidget);
     86    /* Add a button to close the tab widget: */
     87    m_pCloseButton = new QIToolButton;
     88    AssertReturnVoid(m_pCloseButton);
     89    m_pCloseButton->setIcon(UIIconPool::iconSet(":/close_16px.png"));
     90    m_pTabWidget->setCornerWidget(m_pCloseButton);
     91
    6592}
    6693
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDialogPanel.h

    r100917 r100951  
    6666private:
    6767
    68     QTabWidget *m_pTabWidget;
     68    QTabWidget    *m_pTabWidget;
     69    QIToolButton  *m_pCloseButton;
    6970};
    7071
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r100946 r100951  
    801801
    802802    m_pMainLayout->addWidget(m_pPanel);
    803 
    804803}
    805804
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