Fixes: Toolbar cosmetic problem

RevBy:    b_lindeijer
Details:
This resolves the problem with missing top-borders on
the find toolbar.
This commit is contained in:
Jens Bache-Wiig
2009-02-04 12:46:38 +01:00
parent e0e929a0b6
commit e5c845fcc7
4 changed files with 6 additions and 15 deletions

View File

@@ -871,10 +871,11 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
painter->setPen(StyleHelper::borderColor());
if (horizontal) {
// Note: This is a hack to determine if we are the topmost
// toolbar and menu bar should draw the outline
// Note: This is a hack to determine if the
// toolbar should draw the top or bottom outline
// (needed for the find toolbar for instance)
QColor lighter(255, 255, 255, 40);
if (widget->mapToParent(rect.topLeft()).y()) {
if (widget && widget->property("topBorder").toBool()) {
p->drawLine(rect.topLeft(), rect.topRight());
p->setPen(lighter);
p->drawLine(rect.topLeft() + QPoint(0, 1), rect.topRight() + QPoint(0, 1));