VirtualBox

Changeset 3524 in vbox


Ignore:
Timestamp:
Jul 10, 2007 12:58:55 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
22748
Message:

2013: FE/Qt: Default Colors:

During drawing widget's primitives, some gui qt-styles (For example, Windows, Platinum, Motif) has it's own color for push&tool-buttons which is different from the background color. Dropped-down menu complex widget also uses the tool-buttons primitive to draw himself.
In the other side, some other styles (Like Plastik) has the button's color similar to the background color.
That is why some styles (Plastik) looks good and some styles (Windows, Motif) looks annoying.
Our palette's button-color changed to make it similar to the background color.

File:
1 edited

Legend:

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

    r2981 r3524  
    136136    QIApplication a (argc, argv);
    137137
    138     /* weird palette test */
    139 #if 0
     138    /* some gui qt-styles has it's own different color for buttons
     139     * causing tool-buttons and dropped menu displayed in
     140     * different annoying color, so fixing palette button's color */
    140141    QPalette pal = a.palette();
    141     pal.setColor (QColorGroup::Background, Qt::red);
    142     pal.setBrush (QColorGroup::Background,
    143                   QBrush (QColor(),
    144                           QPixmap::fromMimeSource ("about_16px.png")));
     142    pal.setColor (QPalette::Disabled, QColorGroup::Button,
     143                  pal.color (QPalette::Disabled, QColorGroup::Background));
     144    pal.setColor (QPalette::Active, QColorGroup::Button,
     145                  pal.color (QPalette::Active, QColorGroup::Background));
     146    pal.setColor (QPalette::Inactive, QColorGroup::Button,
     147                  pal.color (QPalette::Inactive, QColorGroup::Background));
    145148    a.setPalette (pal);
    146 #endif
    147149
    148150#ifdef Q_WS_X11
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