VirtualBox

Changeset 108097 in vbox


Ignore:
Timestamp:
Feb 6, 2025 3:01:56 PM (2 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167395
Message:

FE/Qt: bugref:10814: VBox Manager / Tools pane: Active/inactive background color support; Making tone a bit closer to original Window color.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.cpp

    r108004 r108097  
    210210    /* Setup palette: */
    211211    QPalette pal = qApp->palette();
    212     QColor backgroundColor = pal.color(QPalette::Active, QPalette::Window);
     212
     213    /* We are just taking the [in]active Window colors and
     214     * making them a bit darker/lighter according to theme: */
     215    QColor backgroundColorActive = pal.color(QPalette::Active, QPalette::Window);
     216    QColor backgroundColorInactive = pal.color(QPalette::Inactive, QPalette::Window);
    213217    if (!tools()->isPopup())
    214         backgroundColor = uiCommon().isInDarkMode()
    215                         ? backgroundColor.lighter(130)
    216                         : backgroundColor.darker(110);
    217     pal.setColor(QPalette::Active, QPalette::Base, backgroundColor);
    218     pal.setColor(QPalette::Inactive, QPalette::Base, backgroundColor);
     218    {
     219        backgroundColorActive = uiCommon().isInDarkMode()
     220                              ? backgroundColorActive.lighter(120)
     221                              : backgroundColorActive.darker(108);
     222        backgroundColorInactive = uiCommon().isInDarkMode()
     223                                ? backgroundColorInactive.lighter(120)
     224                                : backgroundColorInactive.darker(108);
     225    }
     226    pal.setColor(QPalette::Active, QPalette::Base, backgroundColorActive);
     227    pal.setColor(QPalette::Inactive, QPalette::Base, backgroundColorInactive);
     228
     229    /* Assing changed palette: */
    219230    setPalette(pal);
    220231}
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