Commit 49525a11 authored by Alessandro Portale's avatar Alessandro Portale

Flat themes: enable recoloring of the status bar & progress

The flat OutputPaneToggleButton now has the same hover and selected
colors as the sidebar items and toolbar items. This changes the
appearance in the dark theme a bit, and I hope in a good way.

Change-Id: I52826c6d1c4539f799c74580f195a95609ea0416
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 3446e003
......@@ -7,8 +7,8 @@ DefaultTextEditorColorScheme=dark.xml
shadowBackground=ff232323
text=ffe7e7e7
textDisabled=7fffffff
hoverBackground=ff515151
selectedBackground=ff151515
hoverBackground=18ffffff
selectedBackground=46ffffff
normalBackground=ff333333
alternateBackground=ff515151
error=ffff0000
......@@ -19,7 +19,7 @@ BackgroundColorDark=shadowBackground
BackgroundColorHover=hoverBackground
BackgroundColorNormal=normalBackground
BackgroundColorDisabled=ff444444
BackgroundColorSelected=ff909090
BackgroundColorSelected=selectedBackground
BadgeLabelBackgroundColorChecked=normalBackground
BadgeLabelBackgroundColorUnchecked=selectedBackground
BadgeLabelTextColorChecked=text
......@@ -47,7 +47,7 @@ FancyTabWidgetDisabledUnselectedTextColor=textDisabled
FancyTabWidgetEnabledSelectedTextColor=text
FancyTabWidgetEnabledUnselectedTextColor=text
FancyToolButtonHoverColor=35ffffff
FancyToolButtonSelectedColor=7effffff
FancyToolButtonSelectedColor=selectedBackground
FutureProgressBackgroundColor=shadowBackground
IconsBaseColor=ffdcdcdc
IconsDisabledColor=textDisabled
......@@ -83,7 +83,6 @@ MiniProjectTargetSelectorBackgroundColor=shadowBackground
MiniProjectTargetSelectorBorderColor=shadowBackground
MiniProjectTargetSelectorSummaryBackgroundColor=shadowBackground
MiniProjectTargetSelectorTextColor=text
PanelButtonToolBackgroundColorHover=hoverBackground
PanelStatusBarBackgroundColor=shadowBackground
PanelsWidgetSeparatorLineColor=0
PanelTextColorDark=text
......
......@@ -8,8 +8,8 @@ text=ff000000
textDisabled=55000000
toolBarItem=b6fbfdff
toolBarItemDisabled=88a4a6a8
hoverBackground=ff515151
selectedBackground=ff151515
hoverBackground=22ffffff
selectedBackground=66000000
normalBackground=ffffffff
alternateBackground=ff515151
error=ffe41e25
......@@ -21,7 +21,7 @@ BackgroundColorDark=shadowBackground
BackgroundColorHover=hoverBackground
BackgroundColorNormal=normalBackground
BackgroundColorDisabled=ff444444
BackgroundColorSelected=ff909090
BackgroundColorSelected=selectedBackground
BadgeLabelBackgroundColorChecked=ffe0e0e0
BadgeLabelBackgroundColorUnchecked=ff808080
BadgeLabelTextColorChecked=ff606060
......@@ -48,8 +48,8 @@ FancyTabWidgetDisabledSelectedTextColor=toolBarItemDisabled
FancyTabWidgetDisabledUnselectedTextColor=toolBarItemDisabled
FancyTabWidgetEnabledSelectedTextColor=toolBarItem
FancyTabWidgetEnabledUnselectedTextColor=toolBarItem
FancyToolButtonHoverColor=35ffffff
FancyToolButtonSelectedColor=66000000
FancyToolButtonHoverColor=hoverBackground
FancyToolButtonSelectedColor=selectedBackground
FutureProgressBackgroundColor=shadowBackground
IconsBaseColor=toolBarItem
IconsDisabledColor=toolBarItemDisabled
......@@ -85,7 +85,6 @@ MiniProjectTargetSelectorBackgroundColor=shadowBackground
MiniProjectTargetSelectorBorderColor=shadowBackground
MiniProjectTargetSelectorSummaryBackgroundColor=shadowBackground
MiniProjectTargetSelectorTextColor=text
PanelButtonToolBackgroundColorHover=hoverBackground
PanelStatusBarBackgroundColor=shadowBackground
PanelsWidgetSeparatorLineColor=0
PanelTextColorDark=text
......
......@@ -34,7 +34,7 @@ DoubleTabWidget2ndTabActiveTextColor=ffffffff
DoubleTabWidget2ndTabBackgroundColor=ffff0000
DoubleTabWidget2ndTabInactiveTextColor=ff000000
EditorPlaceholderColor=ffe0dcd8
FancyToolBarSeparatorColor=ff000000
FancyToolBarSeparatorColor=60ffffff
FancyTabBarBackgroundColor=ffff0000
FancyTabWidgetDisabledSelectedTextColor=textDisabled
FancyTabWidgetDisabledUnselectedTextColor=textDisabled
......@@ -77,7 +77,6 @@ MiniProjectTargetSelectorBackgroundColor=ffa0a0a0
MiniProjectTargetSelectorBorderColor=ff000000
MiniProjectTargetSelectorSummaryBackgroundColor=ff464646
MiniProjectTargetSelectorTextColor=a0ffffff
PanelButtonToolBackgroundColorHover=25ffffff
PanelStatusBarBackgroundColor=ffff0000
PanelsWidgetSeparatorLineColor=ffbfbcb8
PanelTextColorDark=darkText
......
......@@ -103,7 +103,6 @@ public:
OutputPaneButtonFlashColor,
OutputPaneToggleButtonTextColorChecked,
OutputPaneToggleButtonTextColorUnchecked,
PanelButtonToolBackgroundColorHover,
PanelStatusBarBackgroundColor,
PanelsWidgetSeparatorLineColor,
PanelTextColorDark,
......
......@@ -32,7 +32,7 @@ namespace Utils {
namespace Icons {
const Utils::Icon EDIT_CLEAR({
{QLatin1String(":/core/images/editclear.png"), Utils::Theme::BackgroundColorHover}}, Utils::Icon::Tint);
{QLatin1String(":/core/images/editclear.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint);
} // namespace Icons
} // namespace Utils
......
......@@ -84,7 +84,7 @@ const Icon NEXT({
const Icon PREV({
{QLatin1String(":/core/images/prev.png"), Theme::IconsNavigationArrowsColor}});
const Icon MAGNIFIER({
{QLatin1String(":/core/images/magnifier.png"), Theme::BackgroundColorHover}}, Icon::Tint);
{QLatin1String(":/core/images/magnifier.png"), Theme::PanelTextColorMid}}, Icon::Tint);
const Icon CLEAN_PANE({
{QLatin1String(":/core/images/clean_pane_small.png"), Theme::IconsBaseColor}});
const Icon RELOAD({
......
......@@ -488,15 +488,14 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
QColor shadow(0, 0, 0, 30);
painter->setPen(shadow);
if (pressed) {
QColor shade = option->palette.base().color();
shade.setHsv(shade.hue(), shade.saturation(), 255 - shade.value(), 40);
const QColor shade = creatorTheme()->color(Theme::FancyToolButtonSelectedColor);
painter->fillRect(rect, shade);
const QRectF borderRect = QRectF(rect).adjusted(0.5, 0.5, -0.5, -0.5);
painter->drawLine(borderRect.topLeft() + QPointF(1, 0), borderRect.topRight() - QPointF(1, 0));
painter->drawLine(borderRect.topLeft(), borderRect.bottomLeft());
painter->drawLine(borderRect.topRight(), borderRect.bottomRight());
} else if (option->state & State_Enabled && option->state & State_MouseOver) {
painter->fillRect(rect, creatorTheme()->color(Theme::PanelButtonToolBackgroundColorHover));
painter->fillRect(rect, creatorTheme()->color(Theme::FancyToolButtonHoverColor));
} else if (widget && widget->property("highlightWidget").toBool()) {
QColor shade(0, 0, 0, 128);
painter->fillRect(rect, shade);
......@@ -529,7 +528,9 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
painter->drawLine(borderRect.topLeft(), borderRect.topRight());
painter->restore();
} else {
painter->fillRect(rect, creatorTheme()->color(Theme::PanelStatusBarBackgroundColor));
painter->fillRect(rect, StyleHelper::isBaseColorDefault()
? creatorTheme()->color(Theme::PanelStatusBarBackgroundColor)
: StyleHelper::baseColor());
}
}
break;
......
......@@ -72,9 +72,9 @@ void MiniSplitterHandle::resizeEvent(QResizeEvent *event)
void MiniSplitterHandle::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
const QColor color = m_lightColored
? Utils::StyleHelper::borderColor(m_lightColored)
: Utils::creatorTheme()->color(Utils::Theme::SplitterColor);
const QColor color = Utils::creatorTheme()->color(
m_lightColored ? Utils::Theme::FancyToolBarSeparatorColor
: Utils::Theme::SplitterColor);
painter.fillRect(event->rect(), color);
}
......
......@@ -686,17 +686,15 @@ void OutputPaneToggleButton::paintEvent(QPaintEvent*)
if (image)
StyleHelper::drawCornerImage(*image, &p, rect(), numberAreaWidth, buttonBorderWidth, buttonBorderWidth, buttonBorderWidth);
} else {
QColor c;
if (isChecked()) {
c = creatorTheme()->color(hovered ? Theme::BackgroundColorHover
: Theme::BackgroundColorSelected);
} else if (isDown()) {
c = creatorTheme()->color(Theme::BackgroundColorSelected);
} else {
c = creatorTheme()->color(hovered ? Theme::BackgroundColorHover
: Theme::BackgroundColorDark);
}
p.fillRect(rect(), c);
Theme::Color c = Theme::BackgroundColorDark;
if (hovered)
c = Theme::BackgroundColorHover;
else if (isDown() || isChecked())
c = Theme::BackgroundColorSelected;
if (c != Theme::BackgroundColorDark)
p.fillRect(rect(), creatorTheme()->color(c));
}
if (m_flashTimer->state() == QTimeLine::Running)
......
......@@ -296,7 +296,9 @@ void FutureProgress::paintEvent(QPaintEvent *)
{
QPainter p(this);
if (creatorTheme()->widgetStyle() == Theme::StyleFlat) {
p.fillRect(rect(), creatorTheme()->color(Theme::FutureProgressBackgroundColor));
p.fillRect(rect(), StyleHelper::isBaseColorDefault()
? creatorTheme()->color(Theme::FutureProgressBackgroundColor)
: StyleHelper::baseColor());
} else {
QLinearGradient grad = StyleHelper::statusBarGradient(rect());
p.fillRect(rect(), grad);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment