diff options
author | Alessandro Portale <alessandro.portale@theqtcompany.com> | 2016-03-04 17:55:20 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@theqtcompany.com> | 2016-03-07 08:47:37 +0000 |
commit | ea018672974308d9af7bef9690458ee20e144a0e (patch) | |
tree | bae89d2fd48de08b897a1371272958822d772d22 /src/libs/utils/detailsbutton.cpp | |
parent | 383737d0202fd54e4e557e61e149444f56a27ca9 (diff) | |
download | qt-creator-ea018672974308d9af7bef9690458ee20e144a0e.tar.gz |
Themes: Add a theme flag for "default" or "flat" ProjectsMode
I'd like a "flat" style to have a "default" projects mode.
This patch introduces a FlatProjectsMode. The painting code of the
widgets in the project mode follow that instead of the
Theme::WidgetStyle.
In the course of it, DoubleTabWidget does not imitate the dummy toolbar
anymore, but calls the style painting code, instead. That makes the
theme color DoubleTabWidget1stEmptyAreaBackgroundColor obsolete, so that
key disappears from the Theme enum and also from the creatorthemes.
Change-Id: Ia1479c761f61753d6738a43bbde368bf0b8814b2
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/libs/utils/detailsbutton.cpp')
-rw-r--r-- | src/libs/utils/detailsbutton.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/utils/detailsbutton.cpp b/src/libs/utils/detailsbutton.cpp index ebd88d61a5..5f2c88eca3 100644 --- a/src/libs/utils/detailsbutton.cpp +++ b/src/libs/utils/detailsbutton.cpp @@ -122,7 +122,7 @@ void DetailsButton::paintEvent(QPaintEvent *e) c.setAlpha (int(m_fader * c.alpha())); QRect r = rect(); - if (creatorTheme()->widgetStyle() == Theme::StyleDefault) + if (!creatorTheme()->flag(Theme::FlatProjectsMode)) r.adjust(1, 1, -2, -2); p.fillRect(r, c); } @@ -158,7 +158,7 @@ QPixmap DetailsButton::cacheRendering(const QSize &size, bool checked) p.setRenderHint(QPainter::Antialiasing, true); p.translate(0.5, 0.5); - if (creatorTheme()->widgetStyle() == Theme::StyleDefault) { + if (!creatorTheme()->flag(Theme::FlatProjectsMode)) { QLinearGradient lg; lg.setCoordinateMode(QGradient::ObjectBoundingMode); lg.setFinalStop(0, 1); |