Skip to content

Commit

Permalink
Merge 9f1bb15 into 267daa4
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Feb 16, 2019
2 parents 267daa4 + 9f1bb15 commit 4159055
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/plugins/miscellaneous/Core/src/tabbarwidget.cpp
Expand Up @@ -47,7 +47,7 @@ TabBarWidget::TabBarWidget(QWidget *pParent) :
// hence we fix things by having 'our' own style (see
// https://bugreports.qt.io/browse/QTBUG-61742)...
// Note #2: this eventually got "fixed", but it still doesn't look right, so
// keep using our customised style...
// we keep using our customised style...

#ifdef Q_OS_MAC
setStyle(new TabBarWidgetMacStyle());
Expand Down
8 changes: 5 additions & 3 deletions src/plugins/miscellaneous/Core/src/tabbarwidgetmacstyle.mm
Expand Up @@ -40,7 +40,7 @@
const QWidget *pWidget) const
{
// Draw a tab bar tab label
// Note: anything else is drawn by our parent...
// Note: anything else is done by our parent...

if (pElement == CE_TabBarTabLabel) {
// Note: adapted from QCommonStyle::drawControl()...
Expand Down Expand Up @@ -135,10 +135,12 @@
const QStyleOption *pOption,
const QWidget *pWidget) const
{
// Determine and return the size of a sub-element
// Note: adapted from QCommonStyle::subElementRect()...
// Determine and return the size of tab bar tab text
// Note: anything else is done by our parent...

if (pElement == SE_TabBarTabText) {
// Note: adapted from QCommonStyle::subElementRect()...

if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(pOption)) {
QRect res;
QRect dummy;
Expand Down

0 comments on commit 4159055

Please sign in to comment.