From bc232b2befd6add9b275f868302b0f4b005a22a4 Mon Sep 17 00:00:00 2001 From: Oleg Yadrov Date: Tue, 31 Jan 2017 13:21:26 -0800 Subject: [PATCH] QCommonStyle: fix a few typos and formatting issues Change-Id: I7855795bf010865d5c2b8dd51538c446cdff1974 Reviewed-by: Jake Petroules --- src/widgets/styles/qcommonstyle.cpp | 10 +++++----- 1 file 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);