diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-08-14 06:37:10 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-08-14 06:37:10 (GMT) |
commit | c80302a19f43ed1c39675a979762499fc589743a (patch) | |
tree | b4f29d66fa335f28e07f2953fa8c48048f2203ab /src/gui | |
parent | 0c831b8cf84c72ee8673d1d38f4e93e350dddd5f (diff) | |
download | Qt-c80302a19f43ed1c39675a979762499fc589743a.zip Qt-c80302a19f43ed1c39675a979762499fc589743a.tar.gz Qt-c80302a19f43ed1c39675a979762499fc589743a.tar.bz2 |
spel
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 10 | ||||
-rw-r--r-- | src/gui/painting/qpainterpath.h | 4 | ||||
-rw-r--r-- | src/gui/styles/qmacstyle_mac.mm | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 2ccb0c5..0762138 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7487,8 +7487,8 @@ void qt_format_text(const QFont &fnt, const QRectF &_r, QFontMetricsF fm(fnt); QString text = str; int offset = 0; -start_lenghtVariant: - bool hasMoreLenghtVariants = false; +start_lengthVariant: + bool hasMoreLengthVariants = false; // compatible behaviour to the old implementation. Replace // tabs by spaces bool has_tab = false; @@ -7510,7 +7510,7 @@ start_lenghtVariant: has_tab = true; } else if (chr == QChar(ushort(0x9c))) { // string with multiple length variants - hasMoreLenghtVariants = true; + hasMoreLengthVariants = true; break; } } @@ -7634,9 +7634,9 @@ start_lenghtVariant: } QRectF bounds = QRectF(r.x() + xoff, r.y() + yoff, width, height); - if (hasMoreLenghtVariants && !(tf & Qt::TextLongestVariant) && !r.contains(bounds)) { + if (hasMoreLengthVariants && !(tf & Qt::TextLongestVariant) && !r.contains(bounds)) { offset++; - goto start_lenghtVariant; + goto start_lengthVariant; } if (brect) *brect = bounds; diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h index 1adf315..e320c0b 100644 --- a/src/gui/painting/qpainterpath.h +++ b/src/gui/painting/qpainterpath.h @@ -298,9 +298,9 @@ inline void QPainterPath::lineTo(qreal x, qreal y) lineTo(QPointF(x, y)); } -inline void QPainterPath::arcTo(qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal arcLenght) +inline void QPainterPath::arcTo(qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal arcLength) { - arcTo(QRectF(x, y, w, h), startAngle, arcLenght); + arcTo(QRectF(x, y, w, h), startAngle, arcLength); } inline void QPainterPath::arcMoveTo(qreal x, qreal y, qreal w, qreal h, qreal angle) 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; |