From 092f2014cf81d9f58670ede7d381022dd6903cbb Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 6 Jan 2010 15:09:21 +0100 Subject: 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 --- src/gui/styles/qstylesheetstyle.cpp | 2 +- tests/auto/uiloader/baseline/css_qtbug6855.ui | 57 --------------------------- 2 files changed, 1 insertion(+), 58 deletions(-) delete mode 100644 tests/auto/uiloader/baseline/css_qtbug6855.ui diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index aff3ac0..8b40931 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 @@ - - - Form - - - - 0 - 0 - 212 - 108 - - - - Form - - - QPushButton { padding: 20px; } - - - - - - Text not cropped - - - - - - - Qt::Horizontal - - - - 258 - 20 - - - - - - - - Qt::Vertical - - - - 20 - 218 - - - - - - - - - -- cgit v0.12