diff options
Diffstat (limited to 'src/gui/styles/qgtkstyle.cpp')
-rw-r--r-- | src/gui/styles/qgtkstyle.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 28dff3b..852d3fd 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -1,7 +1,7 @@ /******* ********************************************************************* ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -150,7 +150,6 @@ bool QGtkStyleFilter::eventFilter(QObject *obj, QEvent *e) if (e->type() == QEvent::ApplicationPaletteChange) { // Only do this the first time since this will also // generate applicationPaletteChange events - extern QHash<QByteArray, QPalette> *qt_app_palettes_hash(); //qapplication.cpp if (!qt_app_palettes_hash() || qt_app_palettes_hash()->isEmpty()) { QGtk::applyCustomPaletteHash(); } @@ -788,24 +787,21 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, case PE_IndicatorBranch: if (option->state & State_Children) { QRect rect = option->rect; - rect = QRect(0, 0, 10, 10); + rect = QRect(0, 0, 12, 12); rect.moveCenter(option->rect.center()); rect.translate(2, 0); GtkExpanderStyle openState = GTK_EXPANDER_EXPANDED; GtkExpanderStyle closedState = GTK_EXPANDER_COLLAPSED; - GtkWidget *gtkExpander = QGtk::gtkWidget(QLS("GtkExpander")); - guint expanderSize; - QGtk::gtk_widget_style_get(gtkExpander, "expander-size", &expanderSize, NULL); - // Note CleanIce will crash unless a GtkExpander is provided - // but providing the expander will enforce the expander-size, which we - // don't neccessarily have room for + GtkWidget *gtkTreeView = QGtk::gtkWidget(QLS("GtkTreeView")); + GtkStateType state = GTK_STATE_NORMAL; if (!(option->state & State_Enabled)) state = GTK_STATE_INSENSITIVE; else if (option->state & State_MouseOver) state = GTK_STATE_PRELIGHT; - gtkPainter.paintExpander(expanderSize <= 10 ? gtkExpander : NULL, "expander", rect, state, - option->state & State_Open ? openState : closedState , gtkExpander->style); + + gtkPainter.paintExpander(gtkTreeView, "treeview", rect, state, + option->state & State_Open ? openState : closedState , gtkTreeView->style); } break; case PE_PanelItemViewItem: @@ -2851,8 +2847,7 @@ void QGtkStyle::drawControl(ControlElement element, if (vertical) { rect.translate(xt, -yt * 2); rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // Flip width and height - QTransform m; - m.translate(rect.height(), 0); + QTransform m = QTransform::fromTranslate(rect.height(), 0); m.rotate(90.0); painter->setTransform(m); } |