summaryrefslogtreecommitdiff
path: root/src/libs/utils/detailsbutton.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@theqtcompany.com>2016-03-04 17:55:20 +0100
committerAlessandro Portale <alessandro.portale@theqtcompany.com>2016-03-07 08:47:37 +0000
commitea018672974308d9af7bef9690458ee20e144a0e (patch)
treebae89d2fd48de08b897a1371272958822d772d22 /src/libs/utils/detailsbutton.cpp
parent383737d0202fd54e4e557e61e149444f56a27ca9 (diff)
downloadqt-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.cpp4
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);