forked from qt-creator/qt-creator
ManhattanStyle: Minor cleanup
Change-Id: I936c289e806993165bc9ee3745d754e2a368835c Reviewed-by: Thorben Kroeger <thorbenkroeger@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
b2ec03c74c
commit
a02e3afebb
@@ -495,9 +495,6 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
|
|||||||
painter->drawLine(rect.topLeft() + QPoint(1, 0), rect.topRight() - QPoint(1, 0));
|
painter->drawLine(rect.topLeft() + QPoint(1, 0), rect.topRight() - QPoint(1, 0));
|
||||||
painter->drawLine(rect.topLeft(), rect.bottomLeft());
|
painter->drawLine(rect.topLeft(), rect.bottomLeft());
|
||||||
painter->drawLine(rect.topRight(), rect.bottomRight());
|
painter->drawLine(rect.topRight(), rect.bottomRight());
|
||||||
// painter->drawLine(rect.bottomLeft() + QPoint(1, 0), rect.bottomRight() - QPoint(1, 0));
|
|
||||||
QColor highlight(255, 255, 255, 30);
|
|
||||||
painter->setPen(highlight);
|
|
||||||
} else if (option->state & State_Enabled && option->state & State_MouseOver) {
|
} else if (option->state & State_Enabled && option->state & State_MouseOver) {
|
||||||
painter->fillRect(rect, creatorTheme()->color(Theme::PanelButtonToolBackgroundColorHover));
|
painter->fillRect(rect, creatorTheme()->color(Theme::PanelButtonToolBackgroundColorHover));
|
||||||
} else if (widget && widget->property("highlightWidget").toBool()) {
|
} else if (widget && widget->property("highlightWidget").toBool()) {
|
||||||
@@ -844,23 +841,16 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool drawLightColored = lightColored(widget);
|
bool drawLightColored = lightColored(widget);
|
||||||
if (horizontal)
|
|
||||||
{
|
|
||||||
// draws the background of the 'Type hierarchy', 'Projects' headers
|
// draws the background of the 'Type hierarchy', 'Projects' headers
|
||||||
if (creatorTheme()->widgetStyle() == Theme::StyleFlat)
|
if (creatorTheme()->widgetStyle() == Theme::StyleFlat)
|
||||||
painter->fillRect (rect, creatorTheme()->color(Theme::ToolBarBackgroundColor));
|
painter->fillRect (rect, creatorTheme()->color(Theme::ToolBarBackgroundColor));
|
||||||
else
|
else if (horizontal)
|
||||||
StyleHelper::horizontalGradient(painter, gradientSpan, rect, drawLightColored);
|
StyleHelper::horizontalGradient(painter, gradientSpan, rect, drawLightColored);
|
||||||
} else {
|
|
||||||
if (creatorTheme()->widgetStyle() == Theme::StyleFlat)
|
|
||||||
painter->fillRect (rect, creatorTheme()->color(Theme::ToolBarBackgroundColor));
|
|
||||||
else
|
else
|
||||||
StyleHelper::verticalGradient(painter, gradientSpan, rect, drawLightColored);
|
StyleHelper::verticalGradient(painter, gradientSpan, rect, drawLightColored);
|
||||||
}
|
|
||||||
|
|
||||||
if (!drawLightColored) {
|
if (!drawLightColored)
|
||||||
painter->setPen(StyleHelper::borderColor());
|
painter->setPen(StyleHelper::borderColor());
|
||||||
}
|
|
||||||
else
|
else
|
||||||
painter->setPen(QColor(0x888888));
|
painter->setPen(QColor(0x888888));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user