summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-30 19:25:14 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-30 19:25:14 (GMT)
commit471528b2b678918a699653802c1b8f70d522825d (patch)
tree5ff7f3800fa6b1096775c4079381fe45ffcb85fa /src/gui
parent1b7c80fb09e962c7a05249d4b2779b84701ed326 (diff)
parentc8fc2b44213ded1bd789b4cd3106c4f0b0bfa78b (diff)
downloadQt-471528b2b678918a699653802c1b8f70d522825d.zip
Qt-471528b2b678918a699653802c1b8f70d522825d.tar.gz
Qt-471528b2b678918a699653802c1b8f70d522825d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (25 commits) Fix compilation on WinCE and MinGW by memsetting the OVERLAPPED struct. qdoc: Added <div> elements to some html output for class references. Fix compile error on mingw. MONILITY-645 Do not override alternate background color in Plastique Fix QComboBox ignoring foreground role in some styles Fix compilation on HP-UXi: _SC_MONOTONIC_CLOCK isn't defined Fix compilation with Sun CC: Ensure that we return QPair<long,long> in all cases. Update PLATFORM(SPARC64) to CPU(SPARC64) jui files are no c++ ... scan some more file types by default Support EtchDisabledText with spin box on Windows style QNAM HTTP: Fix invoking a method when being destructed right now Fixed a typo in the QDoubleValidotor doc. Trivial fix to JavaScriptCore to fix building with MSVC 2010 Autotest: oops, fix oops: remove qguard from auto.pro Autotests: oops, remove last traces of QGuard Remove QGuard. Unskip test that used to crash ...
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/styles/qplastiquestyle.cpp1
-rw-r--r--src/gui/styles/qwindowsstyle.cpp8
-rw-r--r--src/gui/text/qstatictext.cpp5
-rw-r--r--src/gui/widgets/qcombobox.cpp10
-rw-r--r--src/gui/widgets/qvalidator.cpp2
5 files changed, 20 insertions, 6 deletions
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp
index 4ae9f79..fbb5e4d 100644
--- a/src/gui/styles/qplastiquestyle.cpp
+++ b/src/gui/styles/qplastiquestyle.cpp
@@ -5846,7 +5846,6 @@ void QPlastiqueStyle::polish(QApplication *app)
void QPlastiqueStyle::polish(QPalette &pal)
{
QWindowsStyle::polish(pal);
- pal.setBrush(QPalette::AlternateBase, pal.base().color().darker(110));
#ifdef Q_WS_MAC
pal.setBrush(QPalette::Shadow, Qt::black);
#endif
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index 60c06ca..1653baa 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -3105,7 +3105,9 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp
qDrawWinButton(p, copy.rect, shadePal, copy.state & (State_Sunken | State_On),
&copy.palette.brush(QPalette::Button));
copy.rect.adjust(4, 1, -5, -1);
- if (!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepUpEnabled) ) {
+ if ((!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepUpEnabled))
+ && proxy()->styleHint(SH_EtchDisabledText, opt, widget) )
+ {
QStyleOptionSpinBox lightCopy = copy;
lightCopy.rect.adjust(1, 1, 1, 1);
lightCopy.palette.setBrush(QPalette::ButtonText, copy.palette.light());
@@ -3138,7 +3140,9 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp
qDrawWinButton(p, copy.rect, shadePal, copy.state & (State_Sunken | State_On),
&copy.palette.brush(QPalette::Button));
copy.rect.adjust(4, 0, -5, -1);
- if (!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepDownEnabled) ) {
+ if ((!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepDownEnabled))
+ && proxy()->styleHint(SH_EtchDisabledText, opt, widget) )
+ {
QStyleOptionSpinBox lightCopy = copy;
lightCopy.rect.adjust(1, 1, 1, 1);
lightCopy.palette.setBrush(QPalette::ButtonText, copy.palette.light());
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index 1fabf12..798ae37 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -553,8 +553,11 @@ void QStaticTextPrivate::paintText(const QPointF &pos, QPainter *p)
} else {
QTextDocument document;
document.setDefaultFont(font);
+#ifndef QT_NO_TEXTHTMLPARSER
document.setHtml(text);
-
+#else
+ document.setPlainText(text);
+#endif
QRectF rect = maximumSize.isValid() ? QRectF(pos, maximumSize) : QRectF();
document.adjustSize();
p->save();
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index c16f18a..b1a27f2 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -108,7 +108,15 @@ QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewIt
const QModelIndex &index) const
{
QStyleOptionMenuItem menuOption;
- menuOption.palette = option.palette.resolve(QApplication::palette("QMenu"));
+
+ QPalette resolvedpalette = option.palette.resolve(QApplication::palette("QMenu"));
+ QVariant value = index.data(Qt::ForegroundRole);
+ if (qVariantCanConvert<QBrush>(value)) {
+ resolvedpalette.setBrush(QPalette::WindowText, qvariant_cast<QBrush>(value));
+ resolvedpalette.setBrush(QPalette::ButtonText, qvariant_cast<QBrush>(value));
+ resolvedpalette.setBrush(QPalette::Text, qvariant_cast<QBrush>(value));
+ }
+ menuOption.palette = resolvedpalette;
menuOption.state = QStyle::State_None;
if (mCombo->window()->isActiveWindow())
menuOption.state = QStyle::State_Active;
diff --git a/src/gui/widgets/qvalidator.cpp b/src/gui/widgets/qvalidator.cpp
index 0b5cc5a..b75db45 100644
--- a/src/gui/widgets/qvalidator.cpp
+++ b/src/gui/widgets/qvalidator.cpp
@@ -523,7 +523,7 @@ public:
In addition, QDoubleValidator is always guaranteed to accept a number
formatted according to the "C" locale. QDoubleValidator will not accept
- numbers with thousand-seperators.
+ numbers with thousand-separators.
\sa QIntValidator, QRegExpValidator, {Line Edits Example}
*/