summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/styles/qmacstyle_mac.mm10
-rw-r--r--src/gui/widgets/qtabwidget.cpp4
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp1
3 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 4dcb469..38c3feb 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -342,12 +342,12 @@ void drawTabBase(QPainter *p, const QStyleOptionTabBarBaseV2 *tbb, const QWidget
borderHighlightTop = QColor(207, 207, 207);
}
p->setPen(borderHighlightTop);
- p->drawLine(0, 0, width, 0);
+ p->drawLine(tabRect.x(), 0, width, 0);
p->setPen(borderTop);
- p->drawLine(0, 1, width, 1);
+ p->drawLine(tabRect.x(), 1, width, 1);
// center block
- QRect centralRect(0, 2, width, height - 2);
+ QRect centralRect(tabRect.x(), 2, width, height - 2);
if (active) {
QColor mainColor = QColor(120, 120, 120);
p->fillRect(centralRect, mainColor);
@@ -370,9 +370,9 @@ void drawTabBase(QPainter *p, const QStyleOptionTabBarBaseV2 *tbb, const QWidget
borderBottom = QColor(127, 127, 127);
}
p->setPen(borderHighlightBottom);
- p->drawLine(0, height - 2, width, height - 2);
+ p->drawLine(tabRect.x(), height - 2, width, height - 2);
p->setPen(borderBottom);
- p->drawLine(0, height - 1, width, height - 1);
+ p->drawLine(tabRect.x(), height - 1, width, height - 1);
}
/*
diff --git a/src/gui/widgets/qtabwidget.cpp b/src/gui/widgets/qtabwidget.cpp
index 9aeb033..0c89a72 100644
--- a/src/gui/widgets/qtabwidget.cpp
+++ b/src/gui/widgets/qtabwidget.cpp
@@ -1167,8 +1167,8 @@ void QTabWidget::tabRemoved(int index)
void QTabWidget::paintEvent(QPaintEvent *)
{
Q_D(QTabWidget);
- QStylePainter p(this);
if (documentMode()) {
+ QStylePainter p(this, tabBar());
if (QWidget *w = cornerWidget(Qt::TopLeftCorner)) {
QStyleOptionTabBarBaseV2 opt;
QTabBarPrivate::initStyleBaseOption(&opt, tabBar(), w->size());
@@ -1185,7 +1185,7 @@ void QTabWidget::paintEvent(QPaintEvent *)
}
return;
}
-
+ QStylePainter p(this);
QStyleOptionTabWidgetFrame opt;
initStyleOption(&opt);
opt.rect = d->panelRect;
diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp
index 04739d4..2722b2f 100644
--- a/tools/assistant/tools/assistant/centralwidget.cpp
+++ b/tools/assistant/tools/assistant/centralwidget.cpp
@@ -230,6 +230,7 @@ CentralWidget::CentralWidget(QHelpEngine *engine, MainWindow *parent)
#endif
tabWidget = new QTabWidget(this);
+ tabWidget->setDocumentMode(true);
connect(tabWidget, SIGNAL(currentChanged(int)), this,
SLOT(currentPageChanged(int)));