diff options
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qcleanlooksstyle.cpp | 5 | ||||
-rw-r--r-- | src/gui/styles/qmacstyle_mac.mm | 10 | ||||
-rw-r--r-- | src/gui/styles/qplastiquestyle.cpp | 1 | ||||
-rw-r--r-- | src/gui/styles/qstyleoption.cpp | 6 | ||||
-rw-r--r-- | src/gui/styles/qwindowscestyle.cpp | 1 | ||||
-rw-r--r-- | src/gui/styles/qwindowsmobilestyle.cpp | 5 | ||||
-rw-r--r-- | src/gui/styles/qwindowsstyle.cpp | 2 | ||||
-rw-r--r-- | src/gui/styles/qwindowsxpstyle.cpp | 2 |
8 files changed, 8 insertions, 24 deletions
diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp index fa6aeb2..0a82c9c 100644 --- a/src/gui/styles/qcleanlooksstyle.cpp +++ b/src/gui/styles/qcleanlooksstyle.cpp @@ -84,14 +84,9 @@ enum Direction { // from windows style static const int windowsItemFrame = 2; // menu item frame width -static const int windowsSepHeight = 6; // separator item height static const int windowsItemHMargin = 3; // menu item hor text margin static const int windowsItemVMargin = 8; // menu item ver text margin -static const int windowsArrowHMargin = 6; // arrow horizontal margin -static const int windowsTabSpacing = 12; // space between text and tab -static const int windowsCheckMarkHMargin = 2; // horiz. margins of check mark static const int windowsRightBorder = 15; // right border on windows -static const int windowsCheckMarkWidth = 12; // checkmarks width on windows /* XPM */ static const char * const dock_widget_close_xpm[] = { diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index 8736769..08b6ad8 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -4635,12 +4635,12 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex // no longer possible to move it, second the up/down buttons are removed when // there is not enough space for them. if (cc == CC_ScrollBar) { - const int scrollBarLenght = (slider->orientation == Qt::Horizontal) + const int scrollBarLength = (slider->orientation == Qt::Horizontal) ? slider->rect.width() : slider->rect.height(); const QMacStyle::WidgetSizePolicy sizePolicy = widgetSizePolicy(widget); - if (scrollBarLenght < scrollButtonsCutoffSize(thumbIndicatorCutoff, sizePolicy)) + if (scrollBarLength < scrollButtonsCutoffSize(thumbIndicatorCutoff, sizePolicy)) tdi.attributes &= ~kThemeTrackShowThumb; - if (scrollBarLenght < scrollButtonsCutoffSize(scrollButtonsCutoff, sizePolicy)) + if (scrollBarLength < scrollButtonsCutoffSize(scrollButtonsCutoff, sizePolicy)) tdi.enableState = kThemeTrackNothingToScroll; } @@ -5109,9 +5109,9 @@ QStyle::SubControl QMacStyle::hitTestComplexControl(ComplexControl cc, // The arrow buttons are not drawn if the scroll bar is to short, // exclude them from the hit test. - const int scrollBarLenght = (sb->orientation == Qt::Horizontal) + const int scrollBarLength = (sb->orientation == Qt::Horizontal) ? sb->rect.width() : sb->rect.height(); - if (scrollBarLenght < scrollButtonsCutoffSize(scrollButtonsCutoff, widgetSizePolicy(widget))) + if (scrollBarLength < scrollButtonsCutoffSize(scrollButtonsCutoff, widgetSizePolicy(widget))) sbi.enableState = kThemeTrackNothingToScroll; sbi.viewsize = sb->pageStep; diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp index 89d4ca5..04559dc 100644 --- a/src/gui/styles/qplastiquestyle.cpp +++ b/src/gui/styles/qplastiquestyle.cpp @@ -98,7 +98,6 @@ static const int windowsItemHMargin = 3; // menu item hor text margin static const int windowsItemVMargin = 2; // menu item ver text margin static const int windowsArrowHMargin = 6; // arrow horizontal margin static const int windowsTabSpacing = 12; // space between text and tab -static const int windowsCheckMarkHMargin = 2; // horiz. margins of check mark static const int windowsRightBorder = 15; // right border on windows static const int windowsCheckMarkWidth = 12; // checkmarks width on windows diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp index 38abd95..98996e2 100644 --- a/src/gui/styles/qstyleoption.cpp +++ b/src/gui/styles/qstyleoption.cpp @@ -954,7 +954,7 @@ QStyleOptionViewItemV2 &QStyleOptionViewItemV2::operator=(const QStyleOptionView Constructs a QStyleOptionViewItemV3 object. */ QStyleOptionViewItemV3::QStyleOptionViewItemV3() - : QStyleOptionViewItemV2(Version) + : QStyleOptionViewItemV2(Version), widget(0) { } @@ -962,7 +962,7 @@ QStyleOptionViewItemV3::QStyleOptionViewItemV3() Constructs a copy of \a other. */ QStyleOptionViewItemV3::QStyleOptionViewItemV3(const QStyleOptionViewItem &other) - : QStyleOptionViewItemV2(Version) + : QStyleOptionViewItemV2(Version), widget(0) { (void)QStyleOptionViewItemV3::operator=(other); } @@ -991,7 +991,7 @@ QStyleOptionViewItemV3 &QStyleOptionViewItemV3::operator = (const QStyleOptionVi \internal */ QStyleOptionViewItemV3::QStyleOptionViewItemV3(int version) - : QStyleOptionViewItemV2(version) + : QStyleOptionViewItemV2(version), widget(0) { } diff --git a/src/gui/styles/qwindowscestyle.cpp b/src/gui/styles/qwindowscestyle.cpp index 4817da0..bf97984 100644 --- a/src/gui/styles/qwindowscestyle.cpp +++ b/src/gui/styles/qwindowscestyle.cpp @@ -56,7 +56,6 @@ QT_BEGIN_NAMESPACE static const int windowsItemFrame = 2; // menu item frame width -static const int windowsSepHeight = 9; // separator item height static const int windowsItemHMargin = 3; // menu item hor text margin static const int windowsItemVMargin = 2; // menu item ver text margin static const int windowsArrowHMargin = 6; // arrow horizontal margin diff --git a/src/gui/styles/qwindowsmobilestyle.cpp b/src/gui/styles/qwindowsmobilestyle.cpp index 09d345a..f3dcee1 100644 --- a/src/gui/styles/qwindowsmobilestyle.cpp +++ b/src/gui/styles/qwindowsmobilestyle.cpp @@ -83,11 +83,6 @@ extern bool qt_wince_is_windows_mobile_65(); //defined in qguifunctions_wince.cp QT_BEGIN_NAMESPACE static const int windowsItemFrame = 1; // menu item frame width -static const int windowsItemHMargin = 2; // menu item hor text margin -static const int windowsItemVMargin = 2; // menu item ver text margin -static const int windowsArrowHMargin = 6; // arrow horizontal margin -static const int windowsRightBorder = 15; // right border on windows -static const int windowsCheckMarkWidth = 14; // checkmarks width on windows static const int windowsMobileitemViewCheckBoxSize = 13; static const int windowsMobileFrameGroupBoxOffset = 9; diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index 91dce4a..6b2dc70 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -121,8 +121,6 @@ static const int windowsSepHeight = 9; // separator item height static const int windowsItemHMargin = 3; // menu item hor text margin static const int windowsItemVMargin = 2; // menu item ver text margin static const int windowsArrowHMargin = 6; // arrow horizontal margin -static const int windowsTabSpacing = 12; // space between text and tab -static const int windowsCheckMarkHMargin = 2; // horiz. margins of check mark static const int windowsRightBorder = 15; // right border on windows static const int windowsCheckMarkWidth = 12; // checkmarks width on windows diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp index 5da1e4e..191b71e 100644 --- a/src/gui/styles/qwindowsxpstyle.cpp +++ b/src/gui/styles/qwindowsxpstyle.cpp @@ -125,11 +125,9 @@ static PtrIsThemeBackgroundPartiallyTransparent pIsThemeBackgroundPartiallyTrans // General const values static const int windowsItemFrame = 2; // menu item frame width -static const int windowsSepHeight = 9; // separator item height static const int windowsItemHMargin = 3; // menu item hor text margin static const int windowsItemVMargin = 0; // menu item ver text margin static const int windowsArrowHMargin = 6; // arrow horizontal margin -static const int windowsCheckMarkHMargin = 0; // horiz. margins of check mark static const int windowsRightBorder = 12; // right border on windows // External function calls |