summaryrefslogtreecommitdiffstats
path: root/src/plugins/styles
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2018-01-29 15:27:05 -0800
committerGabriel de Dietrich <gabriel.dedietrich@qt.io>2018-02-05 19:45:15 +0000
commit4a55eb0e3a47f69bd6bce32433850133fd558185 (patch)
tree0ab70452067190a3ade4ff7a8b483b7ea6069708 /src/plugins/styles
parent14c4fe803722024c60781e2b39bb117060143036 (diff)
QMacStyle: Remove call to HIThemeDrawSeparator
It looked inverted for some reason. A single line looks better than before. Change-Id: Icb214b44ddcc6e9e57fe12e7b4c3f512a5f66452 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/styles')
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index d12b47b9d7..1041187407 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -4554,28 +4554,22 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
#if QT_CONFIG(mainwindow)
if (QMainWindow * mainWindow = qobject_cast<QMainWindow *>(w->window())) {
if (toolBar && toolBar->toolBarArea == Qt::TopToolBarArea && mainWindow->unifiedTitleAndToolBarOnMac()) {
-
// fill with transparent pixels.
p->save();
p->setCompositionMode(QPainter::CompositionMode_Source);
p->fillRect(opt->rect, Qt::transparent);
p->restore();
- // Drow a horizontal sepearator line at the toolBar bottom if the "unified" area ends here.
+ // Drow a horizontal separator line at the toolBar bottom if the "unified" area ends here.
// There might be additional toolbars or other widgets such as tab bars in document
// mode below. Determine this by making a unified toolbar area test for the row below
// this toolbar.
- QPoint windowToolbarEnd = w->mapTo(w->window(), opt->rect.bottomLeft());
- bool isEndOfUnifiedArea = !isInMacUnifiedToolbarArea(w->window()->windowHandle(), windowToolbarEnd.y() + 1);
+ const QPoint windowToolbarEnd = w->mapTo(w->window(), opt->rect.bottomLeft());
+ const bool isEndOfUnifiedArea = !isInMacUnifiedToolbarArea(w->window()->windowHandle(), windowToolbarEnd.y() + 1);
if (isEndOfUnifiedArea) {
- int margin;
- margin = qt_mac_aqua_get_metric(SeparatorSize);
- CGRect separatorRect = CGRectMake(opt->rect.left(), opt->rect.bottom(), opt->rect.width(), margin);
- HIThemeSeparatorDrawInfo separatorDrawInfo;
- separatorDrawInfo.version = 0;
- separatorDrawInfo.state = qt_macWindowMainWindow(mainWindow) ? kThemeStateActive : kThemeStateInactive;
- QMacCGContext cg(p);
- HIThemeDrawSeparator(&separatorRect, &separatorDrawInfo, cg, kHIThemeOrientationNormal);
+ const int margin = qt_mac_aqua_get_metric(SeparatorSize);
+ const auto separatorRect = QRect(opt->rect.left(), opt->rect.bottom(), opt->rect.width(), margin);
+ p->fillRect(separatorRect, opt->palette.dark().color());
}
break;
}