diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-27 19:32:08 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-27 19:32:08 (GMT) |
commit | e0a2a4d343902e96e51df1fabeaaf543f4cd2a47 (patch) | |
tree | 4cb1ab83e9881a403e2857882fb0d6383118a393 /tools/designer | |
parent | f6f9777408691a945c49ef8ec5037d8401c747eb (diff) | |
parent | a17339e943f21bb6c6e16884f716dd9ab8f94938 (diff) | |
download | Qt-e0a2a4d343902e96e51df1fabeaaf543f4cd2a47.zip Qt-e0a2a4d343902e96e51df1fabeaaf543f4cd2a47.tar.gz Qt-e0a2a4d343902e96e51df1fabeaaf543f4cd2a47.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
tools/qdoc3/test/assistant.qdocconf
tools/qdoc3/test/designer.qdocconf
tools/qdoc3/test/linguist.qdocconf
tools/qdoc3/test/qmake.qdocconf
tools/qdoc3/test/qt-html-templates.qdocconf
tools/qdoc3/test/qt.qdocconf
Diffstat (limited to 'tools/designer')
-rw-r--r-- | tools/designer/src/components/propertyeditor/propertyeditor.cpp | 2 | ||||
-rw-r--r-- | tools/designer/src/lib/shared/filterwidget.cpp | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/tools/designer/src/components/propertyeditor/propertyeditor.cpp b/tools/designer/src/components/propertyeditor/propertyeditor.cpp index 86d7bdf..a8ca8ad 100644 --- a/tools/designer/src/components/propertyeditor/propertyeditor.cpp +++ b/tools/designer/src/components/propertyeditor/propertyeditor.cpp @@ -135,7 +135,7 @@ QSize ElidingLabel::sizeHint() const return size; } -void ElidingLabel::paintEvent(QPaintEvent *e) { +void ElidingLabel::paintEvent(QPaintEvent *) { QPainter painter(this); painter.setPen(QColor(0, 0, 0, 60)); painter.setBrush(QColor(255, 255, 255, 40)); diff --git a/tools/designer/src/lib/shared/filterwidget.cpp b/tools/designer/src/lib/shared/filterwidget.cpp index f485346..07af901 100644 --- a/tools/designer/src/lib/shared/filterwidget.cpp +++ b/tools/designer/src/lib/shared/filterwidget.cpp @@ -80,8 +80,11 @@ void IconButton::paintEvent(QPaintEvent *) QPainter painter(this); // Note isDown should really use the active state but in most styles // this has no proper feedback - QPixmap iconpixmap = icon().pixmap(ICONBUTTON_SIZE, ICONBUTTON_SIZE, isDown() ? - QIcon::Selected : QIcon::Normal); + QIcon::Mode state = QIcon::Disabled; + if (isEnabled()) + state = isDown() ? QIcon::Selected : QIcon::Normal; + QPixmap iconpixmap = icon().pixmap(QSize(ICONBUTTON_SIZE, ICONBUTTON_SIZE), + state, QIcon::Off); QRect pixmapRect = QRect(0, 0, iconpixmap.width(), iconpixmap.height()); pixmapRect.moveCenter(rect().center()); painter.setOpacity(m_fader); @@ -204,9 +207,12 @@ QString FilterWidget::text() const return m_editor->text(); } -void FilterWidget::checkButton(const QString &) +void FilterWidget::checkButton(const QString &text) { - m_button->animateShow(!m_editor->text().isEmpty()); + static QString oldtext; + if (oldtext.isEmpty() || text.isEmpty()) + m_button->animateShow(!m_editor->text().isEmpty()); + oldtext = text; } void FilterWidget::reset() |