diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2010-01-06 14:09:21 (GMT) |
---|---|---|
committer | Jesper Thomschutz <jesper.thomschutz@nokia.com> | 2010-01-08 11:56:53 (GMT) |
commit | eeb4b1a0a05e5e53a642d79052a631470e0a57fc (patch) | |
tree | 6e7e6109e19c76ca024051f0c89d3ca186ac96cc | |
parent | 554337bf8cc67d5f77454cf01cafbc6b91b0466c (diff) | |
download | Qt-eeb4b1a0a05e5e53a642d79052a631470e0a57fc.zip Qt-eeb4b1a0a05e5e53a642d79052a631470e0a57fc.tar.gz Qt-eeb4b1a0a05e5e53a642d79052a631470e0a57fc.tar.bz2 |
Revert "QStyleSheetStyle: Fixed some text croped when having padding with native border."
This reverts commit 6e90192b599cee9b903177a0978198326f667613.
his change the behaviour a little bit. It is better to wait for Qt 4.7
Reviewed-by: jbache
(cherry picked from commit 092f2014cf81d9f58670ede7d381022dd6903cbb)
-rw-r--r-- | src/gui/styles/qstylesheetstyle.cpp | 2 | ||||
-rw-r--r-- | tests/auto/uiloader/baseline/css_qtbug6855.ui | 57 |
2 files changed, 1 insertions, 58 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 2bc8ef6..83a863d 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -1065,7 +1065,7 @@ QRect QRenderRule::boxRect(const QRect& cr, int flags) const r.adjust(-p[LeftEdge], -p[TopEdge], p[RightEdge], p[BottomEdge]); } } - if (hasBorder() && (flags & Border)) { + if (!hasNativeBorder() && (flags & Border)) { const int *b = border()->borders; r.adjust(-b[LeftEdge], -b[TopEdge], b[RightEdge], b[BottomEdge]); } diff --git a/tests/auto/uiloader/baseline/css_qtbug6855.ui b/tests/auto/uiloader/baseline/css_qtbug6855.ui deleted file mode 100644 index 0727f6b..0000000 --- a/tests/auto/uiloader/baseline/css_qtbug6855.ui +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>Form</class> - <widget class="QWidget" name="Form"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>212</width> - <height>108</height> - </rect> - </property> - <property name="windowTitle"> - <string>Form</string> - </property> - <property name="styleSheet"> - <string notr="true">QPushButton { padding: 20px; }</string> - </property> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="0"> - <widget class="QPushButton" name="pushButton"> - <property name="text"> - <string>Text not cropped</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>258</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="1" column="0"> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>218</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <resources/> - <connections/> -</ui> |