From c93ca96552b70a6bd7332aec3504485e82d4d032 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 5 Nov 2009 10:52:55 +0100 Subject: Stylesheet: Fix lineedit size with an empty stylesheet with some styles Now passes tst_QStyleSheetStyle::emptyStyleSheet with gtk style Somehow there were some wrong and uneeded default padding for the QLineEdit with some styles Task-number: QTBUG-5434 Reviewed-by: axis --- src/gui/styles/qstylesheetstyle_default.cpp | 43 ----------------------------- 1 file changed, 43 deletions(-) diff --git a/src/gui/styles/qstylesheetstyle_default.cpp b/src/gui/styles/qstylesheetstyle_default.cpp index 406633e..f79f8e0 100644 --- a/src/gui/styles/qstylesheetstyle_default.cpp +++ b/src/gui/styles/qstylesheetstyle_default.cpp @@ -203,49 +203,6 @@ StyleSheet QStyleSheetStyle::getDefaultStyleSheet() const ADD_STYLE_RULE; } - /*QLineEdit[style="QCleanlooksStyle"] { - padding-top: 2px; - padding-bottom: 2px; - }*/ - if (baseStyle()->inherits("QCleanlooksStyle")) - { - SET_ELEMENT_NAME(QLatin1String("QLineEdit")); - ADD_BASIC_SELECTOR; - ADD_SELECTOR; - - - SET_PROPERTY(QLatin1String("padding-top"), PaddingTop); - ADD_VALUE(Value::Identifier, QString::fromLatin1("2px")); - ADD_DECLARATION; - - SET_PROPERTY(QLatin1String("padding-bottom"), PaddingBottom); - ADD_VALUE(Value::Identifier, QString::fromLatin1("2px")); - ADD_DECLARATION; - - ADD_STYLE_RULE; - } - - /*QLineEdit[style="QWindowsXPStyle"], - QLineEdit[style="QWindowsVistaStyle"], - QLineEdit[style="QGtkStyle"] { - padding-top: 1px; - padding-bottom: 1px; - }*/ - if (baseStyle()->inherits("QWindowsXPStyle") || baseStyle()->inherits("QGtkStyle")) - { - SET_ELEMENT_NAME(QLatin1String("QLineEdit")); - - SET_PROPERTY(QLatin1String("padding-top"), PaddingTop); - ADD_VALUE(Value::Identifier, QString::fromLatin1("1px")); - ADD_DECLARATION; - - SET_PROPERTY(QLatin1String("padding-bottom"), PaddingBottom); - ADD_VALUE(Value::Identifier, QString::fromLatin1("1px")); - ADD_DECLARATION; - - ADD_STYLE_RULE; - } - /*QFrame { border: native; }*/ -- cgit v0.12