VirtualBox

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


Ignore:
Timestamp:
Aug 22, 2023 8:18:02 AM (16 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10496, bugref:9072. Fixing size policy of the panel container.

File:
1 edited

Legend:

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

    r100933 r100934  
    747747    /* Create VM Log-Viewer container: */
    748748    m_pTabWidget = new UITabWidget;
    749     if (m_pTabWidget)
    750     {
    751         /* Add into layout: */
    752         m_pMainLayout->addWidget(m_pTabWidget);
    753         connect(m_pTabWidget, &QITabWidget::currentChanged, this, &UIVMLogViewerWidget::sltCurrentTabChanged);
    754     }
    755 
    756     /* Create VM Log-Viewer filter-panel: */
    757     // m_pFilterPanel = new UIVMLogViewerFilterPanel(0, this);
    758     // if (m_pFilterPanel)
    759     // {
    760     //     /* Configure panel: */
    761     //     //installEventFilter(m_pFilterPanel);
    762     //     m_pFilterPanel->hide();
    763 
    764     //     /* Add into layout: */
    765     //     m_pMainLayout->addWidget(m_pFilterPanel);
    766     // }
    767 
    768     /* Create VM Log-Viewer bookmarks-panel: */
    769     // m_pBookmarksPanel = new UIVMLogViewerBookmarksPanel(0, this);
    770     // if (m_pBookmarksPanel)
    771     // {
    772     //     /* Configure panel: */
    773     //     m_pBookmarksPanel->hide();
    774     //     connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigDeleteBookmarkByIndex,
    775     //             this, &UIVMLogViewerWidget::sltDeleteBookmarkByIndex);
    776     //     connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigDeleteAllBookmarks,
    777     //             this, &UIVMLogViewerWidget::sltDeleteAllBookmarks);
    778     //     connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigBookmarkSelected,
    779     //             this, &UIVMLogViewerWidget::gotoBookmark);
    780     //     /* Add into layout: */
    781     //     m_pMainLayout->addWidget(m_pBookmarksPanel);
    782     // }
     749    AssertReturnVoid(m_pTabWidget);
     750    /* Add into layout: */
     751    m_pMainLayout->addWidget(m_pTabWidget);
     752    m_pTabWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
     753    connect(m_pTabWidget, &QITabWidget::currentChanged, this, &UIVMLogViewerWidget::sltCurrentTabChanged);
    783754
    784755    /* Create VM Log-Viewer options-panel: */
    785     m_pOptionsPanel = new UIVMLogViewerOptionsPanel(0, this);
    786     if (m_pOptionsPanel)
    787     {
    788         /* Configure panel: */
    789         m_pOptionsPanel->hide();
    790         m_pOptionsPanel->setShowLineNumbers(m_bShowLineNumbers);
    791         m_pOptionsPanel->setWrapLines(m_bWrapLines);
    792         m_pOptionsPanel->setFontSizeInPoints(m_font.pointSize());
    793         connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigShowLineNumbers, this, &UIVMLogViewerWidget::sltShowLineNumbers);
    794         connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigWrapLines, this, &UIVMLogViewerWidget::sltWrapLines);
    795         connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigChangeFontSizeInPoints, this, &UIVMLogViewerWidget::sltFontSizeChanged);
    796         connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigChangeFont, this, &UIVMLogViewerWidget::sltChangeFont);
    797         connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigResetToDefaults, this, &UIVMLogViewerWidget::sltResetOptionsToDefault);
    798 
    799         /* Add into layout: */
    800         m_pMainLayout->addWidget(m_pOptionsPanel);
    801     }
     756    // m_pOptionsPanel = new UIVMLogViewerOptionsPanel(0, this);
     757    // AssertReturnVoid(m_pOptionsPanel);
     758    // /* Configure panel: */
     759    // m_pOptionsPanel->hide();
     760    // m_pOptionsPanel->setShowLineNumbers(m_bShowLineNumbers);
     761    // m_pOptionsPanel->setWrapLines(m_bWrapLines);
     762    // m_pOptionsPanel->setFontSizeInPoints(m_font.pointSize());
     763    // connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigShowLineNumbers, this, &UIVMLogViewerWidget::sltShowLineNumbers);
     764    // connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigWrapLines, this, &UIVMLogViewerWidget::sltWrapLines);
     765    // connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigChangeFontSizeInPoints, this, &UIVMLogViewerWidget::sltFontSizeChanged);
     766    // connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigChangeFont, this, &UIVMLogViewerWidget::sltChangeFont);
     767    // connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigResetToDefaults, this, &UIVMLogViewerWidget::sltResetOptionsToDefault);
     768
     769    // m_pMainLayout->addWidget(m_pOptionsPanel);
    802770
    803771    m_pPanel = new UIVMLogViewerPanelNew(0, this);
    804772    AssertReturnVoid(m_pPanel);
    805773    installEventFilter(m_pPanel);
     774    m_pPanel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
     775
    806776    connect(m_pPanel, &UIVMLogViewerPanelNew::sigHighlightingUpdated,
    807777            this, &UIVMLogViewerWidget::sltSearchResultHighLigting);
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