Commit 0235412b authored by Alessandro Portale's avatar Alessandro Portale

FancyTabWidget: Ensure a separator between colorbutton and tabbar

Some Themes do not want highlights and shadows in the toolbars. But we
definitely want a separator between FancyColorButton and FancyTabBar.

Change-Id: I24f384514146d664dbb41ef073368a11c79d85b8
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent e73a9c1b
......@@ -404,6 +404,20 @@ public:
emit clicked(ev->button(), ev->modifiers());
}
void paintEvent(QPaintEvent *event)
{
QWidget::paintEvent(event);
// Some Themes do not want highlights and shadows in the toolbars.
// But we definitely want a separator between FancyColorButton and FancyTabBar
if (!creatorTheme()->flag(Theme::DrawToolBarHighlights)) {
QPainter p(this);
p.setPen(StyleHelper::borderColor());
const QRectF innerRect = QRectF(rect()).adjusted(0.5, 0.5, -0.5, -0.5);
p.drawLine(innerRect.bottomLeft(), innerRect.bottomRight());
}
}
signals:
void clicked(Qt::MouseButton button, Qt::KeyboardModifiers modifiers);
};
......
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