Themes: Make toolbar highlights optional

Following Diana's flat style motto "remove unnecessary lines", this
patch makes highlights and shadows in the toolbars optional, and removes
them for the new flat theme.

"default" and "dark" are not affected by this change.

Change-Id: Iadbbaa669e318406a154fed3e07890fd40f5f621
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Alessandro Portale
2016-03-04 11:08:46 +01:00
parent cfaba1a190
commit a0fbfd3bd4
5 changed files with 29 additions and 23 deletions

View File

@@ -171,6 +171,7 @@ DrawIndicatorBranch=true
DrawProgressBarSunken=false DrawProgressBarSunken=false
DrawSearchResultWidgetFrame=false DrawSearchResultWidgetFrame=false
DrawTargetSelectorBottom=false DrawTargetSelectorBottom=false
DrawToolBarHighlights=true
ApplyThemePaletteGlobally=true ApplyThemePaletteGlobally=true
FlatSideBarIcons=true FlatSideBarIcons=true
FlatProjectsMode=true FlatProjectsMode=true

View File

@@ -173,6 +173,7 @@ DrawIndicatorBranch=true
DrawProgressBarSunken=false DrawProgressBarSunken=false
DrawSearchResultWidgetFrame=false DrawSearchResultWidgetFrame=false
DrawTargetSelectorBottom=false DrawTargetSelectorBottom=false
DrawToolBarHighlights=false
ApplyThemePaletteGlobally=false ApplyThemePaletteGlobally=false
FlatSideBarIcons=true FlatSideBarIcons=true
FlatProjectsMode=false FlatProjectsMode=false

View File

@@ -165,6 +165,7 @@ DrawIndicatorBranch=false
DrawProgressBarSunken=true DrawProgressBarSunken=true
DrawSearchResultWidgetFrame=true DrawSearchResultWidgetFrame=true
DrawTargetSelectorBottom=true DrawTargetSelectorBottom=true
DrawToolBarHighlights=true
ApplyThemePaletteGlobally=false ApplyThemePaletteGlobally=false
FlatSideBarIcons=false FlatSideBarIcons=false
FlatProjectsMode=false FlatProjectsMode=false

View File

@@ -256,6 +256,7 @@ public:
DrawSearchResultWidgetFrame, DrawSearchResultWidgetFrame,
DrawProgressBarSunken, DrawProgressBarSunken,
DrawIndicatorBranch, DrawIndicatorBranch,
DrawToolBarHighlights,
ComboBoxDrawTextShadow, ComboBoxDrawTextShadow,
DerivePaletteFromTheme, DerivePaletteFromTheme,
ApplyThemePaletteGlobally, ApplyThemePaletteGlobally,

View File

@@ -830,6 +830,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
else else
StyleHelper::verticalGradient(painter, gradientSpan, rect, drawLightColored); StyleHelper::verticalGradient(painter, gradientSpan, rect, drawLightColored);
if (creatorTheme()->flag(Theme::DrawToolBarHighlights)) {
if (!drawLightColored) if (!drawLightColored)
painter->setPen(StyleHelper::borderColor()); painter->setPen(StyleHelper::borderColor());
else else
@@ -858,6 +859,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
painter->drawLine(borderRect.topRight(), borderRect.bottomRight()); painter->drawLine(borderRect.topRight(), borderRect.bottomRight());
} }
} }
}
break; break;
default: default: