diff options
author | Oleg Yadrov <oleg.yadrov@qt.io> | 2017-01-31 13:21:26 -0800 |
---|---|---|
committer | Oleg Yadrov <oleg.yadrov@qt.io> | 2017-01-31 22:24:36 +0000 |
commit | bc232b2befd6add9b275f868302b0f4b005a22a4 (patch) | |
tree | d800a7bd056ac8e0f8a80aae44282a0dca020d95 /src/widgets/styles | |
parent | 3ab7016632c825949f32b72d06ac324b6672b9f6 (diff) |
QCommonStyle: fix a few typos and formatting issues
Change-Id: I7855795bf010865d5c2b8dd51538c446cdff1974
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qcommonstyle.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index c174a7af26..18a0c4fb64 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -1099,7 +1099,7 @@ void QCommonStylePrivate::tabLayout(const QStyleOptionTab *opt, const QWidget *w || opt->shape == QTabBar::TriangularEast || opt->shape == QTabBar::TriangularWest; if (verticalTabs) - tr.setRect(0, 0, tr.height(), tr.width()); //0, 0 as we will have a translate transform + tr.setRect(0, 0, tr.height(), tr.width()); // 0, 0 as we will have a translate transform int verticalShift = proxyStyle->pixelMetric(QStyle::PM_TabBarTabShiftVertical, opt, widget); int horizontalShift = proxyStyle->pixelMetric(QStyle::PM_TabBarTabShiftHorizontal, opt, widget); @@ -1122,7 +1122,7 @@ void QCommonStylePrivate::tabLayout(const QStyleOptionTab *opt, const QWidget *w // right widget if (!opt->rightButtonSize.isEmpty()) { tr.setRight(tr.right() - 4 - - (verticalTabs ? opt->rightButtonSize.height() : opt->rightButtonSize.width())); + (verticalTabs ? opt->rightButtonSize.height() : opt->rightButtonSize.width())); } // icon @@ -1134,12 +1134,12 @@ void QCommonStylePrivate::tabLayout(const QStyleOptionTab *opt, const QWidget *w } QSize tabIconSize = opt->icon.actualSize(iconSize, (opt->state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled, - (opt->state & QStyle::State_Selected) ? QIcon::On : QIcon::Off ); - // High-dpi icons do not need adjustmet; make sure tabIconSize is not larger than iconSize + (opt->state & QStyle::State_Selected) ? QIcon::On : QIcon::Off); + // High-dpi icons do not need adjustment; make sure tabIconSize is not larger than iconSize tabIconSize = QSize(qMin(tabIconSize.width(), iconSize.width()), qMin(tabIconSize.height(), iconSize.height())); *iconRect = QRect(tr.left(), tr.center().y() - tabIconSize.height() / 2, - tabIconSize.width(), tabIconSize .height()); + tabIconSize.width(), tabIconSize.height()); if (!verticalTabs) *iconRect = proxyStyle->visualRect(opt->direction, opt->rect, *iconRect); tr.setLeft(tr.left() + tabIconSize.width() + 4); |