Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/styles/qgtkstyle.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    6868#include <QtGui/QCheckBox>
    6969#include <QtGui/QTreeView>
     70#include <QtGui/QStyledItemDelegate>
    7071#include <qpixmapcache.h>
    7172#undef signals // Collides with GTK stymbols
     
    223224    if (d->isThemeAvailable()) {
    224225        GtkStyle *style = d->gtkStyle();
    225         GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
     226        GtkWidget *gtkButton = d->gtkWidget("GtkButton");
    226227        GtkWidget *gtkEntry = d->getTextColorWidget();
    227 
    228         GdkColor gdkBg, gdkBase, gdkText, gdkForeground, gdkSbg, gdkSfg;
    229         QColor bg, base, text, fg, highlight, highlightText;
     228        GdkColor gdkBg, gdkBase, gdkText, gdkForeground, gdkSbg, gdkSfg, gdkaSbg, gdkaSfg;
     229        QColor bg, base, text, fg, highlight, highlightText, inactiveHighlight, inactiveHighlightedTExt;
    230230        gdkBg = style->bg[GTK_STATE_NORMAL];
    231231        gdkForeground = gtkButton->style->fg[GTK_STATE_NORMAL];
     
    237237        gdkSbg = gtkEntry->style->base[GTK_STATE_SELECTED];
    238238        gdkSfg = gtkEntry->style->text[GTK_STATE_SELECTED];
     239
     240        // The ACTIVE base color is really used for inactive windows
     241        gdkaSbg = gtkEntry->style->base[GTK_STATE_ACTIVE];
     242        gdkaSfg = gtkEntry->style->text[GTK_STATE_ACTIVE];
     243
    239244        bg = QColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8);
    240245        text = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8);
     
    243248        highlight = QColor(gdkSbg.red>>8, gdkSbg.green>>8, gdkSbg.blue>>8);
    244249        highlightText = QColor(gdkSfg.red>>8, gdkSfg.green>>8, gdkSfg.blue>>8);
     250        inactiveHighlight = QColor(gdkaSbg.red>>8, gdkaSbg.green>>8, gdkaSbg.blue>>8);
     251        inactiveHighlightedTExt = QColor(gdkaSfg.red>>8, gdkaSfg.green>>8, gdkaSfg.blue>>8);
    245252
    246253        palette.setColor(QPalette::HighlightedText, highlightText);
     254
     255
    247256        palette.setColor(QPalette::Light, bg.lighter(125));
    248257        palette.setColor(QPalette::Shadow, bg.darker(130));
     
    254263
    255264        QColor alternateRowColor = palette.base().color().lighter(93); // ref gtkstyle.c draw_flat_box
    256         GtkWidget *gtkTreeView = d->gtkWidget(QLS("GtkTreeView"));
     265        GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView");
    257266        GdkColor *gtkAltBase = NULL;
    258267        d->gtk_widget_style_get(gtkTreeView, "odd-row-color", &gtkAltBase, NULL);
     
    279288        palette.setColor(QPalette::Disabled, QPalette::Highlight, highlight);
    280289        palette.setColor(QPalette::Disabled, QPalette::HighlightedText, highlightText);
     290
     291        palette.setColor(QPalette::Inactive, QPalette::HighlightedText, inactiveHighlightedTExt);
     292        palette.setColor(QPalette::Inactive, QPalette::Highlight, inactiveHighlight);
     293
    281294        style = d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(), "gtk-tooltips", "GtkWindow",
    282295                d->gtk_window_get_type());
     
    326339            qt_filedialog_open_filenames_hook = &QGtkStylePrivate::openFilenames;
    327340            qt_filedialog_existing_directory_hook = &QGtkStylePrivate::openDirectory;
     341            qApp->installEventFilter(&d->filter);
    328342        }
    329343    }
     
    346360        qt_filedialog_open_filenames_hook = 0;
    347361        qt_filedialog_existing_directory_hook = 0;
     362        qApp->removeEventFilter(&d->filter);
    348363    }
    349364}
     
    422437
    423438    case PM_ButtonShiftHorizontal: {
    424         GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
     439        GtkWidget *gtkButton = d->gtkWidget("GtkButton");
    425440        guint horizontal_shift;
    426441        d->gtk_widget_style_get(gtkButton, "child-displacement-x", &horizontal_shift, NULL);
     
    429444
    430445    case PM_ButtonShiftVertical: {
    431         GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
     446        GtkWidget *gtkButton = d->gtkWidget("GtkButton");
    432447        guint vertical_shift;
    433448        d->gtk_widget_style_get(gtkButton, "child-displacement-y", &vertical_shift, NULL);
     
    439454
    440455    case PM_MenuPanelWidth: {
    441         GtkWidget *gtkMenu = d->gtkWidget(QLS("GtkMenu"));
     456        GtkWidget *gtkMenu = d->gtkWidget("GtkMenu");
    442457        guint horizontal_padding = 0;
    443458        // horizontal-padding is used by Maemo to get thicker borders
     
    496511    case PM_SliderThickness:
    497512    case PM_SliderControlThickness: {
    498         GtkWidget *gtkScale = d->gtkWidget(QLS("GtkHScale"));
     513        GtkWidget *gtkScale = d->gtkWidget("GtkHScale");
    499514        gint val;
    500515        d->gtk_widget_style_get(gtkScale, "slider-width", &val, NULL);
     
    507522        gint sliderLength;
    508523        gint trough_border;
    509         GtkWidget *hScrollbar = d->gtkWidget(QLS("GtkHScrollbar"));
     524        GtkWidget *hScrollbar = d->gtkWidget("GtkHScrollbar");
    510525        d->gtk_widget_style_get(hScrollbar,
    511526                               "trough-border",   &trough_border,
     
    520535    case PM_SliderLength:
    521536        gint val;
    522         d->gtk_widget_style_get(d->gtkWidget(QLS("GtkHScale")), "slider-length", &val, NULL);
     537        d->gtk_widget_style_get(d->gtkWidget("GtkHScale"), "slider-length", &val, NULL);
    523538        return val;
    524539
     
    527542    case PM_IndicatorWidth:
    528543    case PM_IndicatorHeight: {
    529         GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton"));
     544        GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton");
    530545        gint size, spacing;
    531546        d->gtk_widget_style_get(gtkCheckButton, "indicator-spacing", &spacing, "indicator-size", &size, NULL);
     
    534549
    535550    case PM_MenuBarVMargin: {
    536         GtkWidget *gtkMenubar = d->gtkWidget(QLS("GtkMenuBar"));
     551        GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar");
    537552        return  qMax(0, gtkMenubar->style->ythickness);
    538553    }
     
    540555    {
    541556        gint spacing = 3;
    542         GtkWidget *gtkScrollWindow = d->gtkWidget(QLS("GtkScrolledWindow"));
     557        GtkWidget *gtkScrollWindow = d->gtkWidget("GtkScrolledWindow");
    543558        Q_ASSERT(gtkScrollWindow);
    544559        d->gtk_widget_style_get(gtkScrollWindow, "scrollbar-spacing", &spacing, NULL);
     
    547562    case PM_SubMenuOverlap: {
    548563        gint offset = 0;
    549         GtkWidget *gtkMenu = d->gtkWidget(QLS("GtkMenu"));
     564        GtkWidget *gtkMenu = d->gtkWidget("GtkMenu");
    550565        d->gtk_widget_style_get(gtkMenu, "horizontal-offset", &offset, NULL);
    551566        return offset;
     
    588603        if (d->isKDE4Session())
    589604            return QCleanlooksStyle::styleHint(hint, option, widget, returnData);
    590         GtkWidget *gtkToolbar = d->gtkWidget(QLS("GtkToolbar"));
     605        GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar");
    591606        GtkToolbarStyle toolbar_style = GTK_TOOLBAR_ICONS;
    592607        g_object_get(gtkToolbar, "toolbar-style", &toolbar_style, NULL);
     
    611626
    612627    case SH_ComboBox_Popup: {
    613         GtkWidget *gtkComboBox = d->gtkWidget(QLS("GtkComboBox"));
     628        GtkWidget *gtkComboBox = d->gtkWidget("GtkComboBox");
    614629        gboolean appears_as_list;
    615630        d->gtk_widget_style_get((GtkWidget*)gtkComboBox, "appears-as-list", &appears_as_list, NULL);
     
    635650            scrollbars_within_bevel = true;
    636651        else if (!d->gtk_check_version(2, 12, 0)) {
    637             GtkWidget *gtkScrollWindow = d->gtkWidget(QLS("GtkScrolledWindow"));
     652            GtkWidget *gtkScrollWindow = d->gtkWidget("GtkScrolledWindow");
    638653            d->gtk_widget_style_get(gtkScrollWindow, "scrollbars-within-bevel", &scrollbars_within_bevel, NULL);
    639654        }
     
    691706        const int pmSize = 64;
    692707        const int border = proxy()->pixelMetric(PM_DefaultFrameWidth, option, widget);
    693         const QString pmKey = QString(QLS("windowframe %0")).arg(option->state);
     708        const QString pmKey = QLatin1Literal("windowframe") % HexString<uint>(option->state);
    694709
    695710        QPixmap pixmap;
     
    713728                                     "*.GtkScrolledWindow", "*.GtkScrolledWindow", d->gtk_window_get_type());
    714729            if (style)
    715                 gtkFramePainter.paintShadow(d->gtkWidget(QLS("GtkFrame")), "viewport", pmRect,
     730                gtkFramePainter.paintShadow(d->gtkWidget("GtkFrame"), "viewport", pmRect,
    716731                                         option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
    717732                                         shadow_type, style);
     
    740755
    741756    case PE_PanelTipLabel: {
    742         GtkWidget *gtkWindow = d->gtkWidget(QLS("GtkWindow")); // The Murrine Engine currently assumes a widget is passed
     757        GtkWidget *gtkWindow = d->gtkWidget("GtkWindow"); // The Murrine Engine currently assumes a widget is passed
    743758        style = d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(), "gtk-tooltips", "GtkWindow",
    744759                d->gtk_window_get_type());
     
    755770        }
    756771        GtkShadowType shadow_type;
    757         GtkWidget *gtkStatusbarFrame = d->gtkWidget(QLS("GtkStatusbar.GtkFrame"));
     772        GtkWidget *gtkStatusbarFrame = d->gtkWidget("GtkStatusbar.GtkFrame");
    758773        d->gtk_widget_style_get(gtkStatusbarFrame->parent, "shadow-type", &shadow_type, NULL);
    759774        gtkPainter.paintShadow(gtkStatusbarFrame, "frame", option->rect, GTK_STATE_NORMAL,
     
    764779    case PE_IndicatorHeaderArrow:
    765780        if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
    766             GtkWidget *gtkTreeHeader = d->gtkWidget(QLS("GtkTreeView.GtkButton"));
     781            GtkWidget *gtkTreeHeader = d->gtkWidget("GtkTreeView.GtkButton");
    767782            GtkStateType state = gtkPainter.gtkState(option);
    768783            style = gtkTreeHeader->style;
     
    770785            QRect r = header->rect;
    771786            QImage arrow;
     787            // This sorting indicator inversion is intentional, and follows the GNOME HIG.
     788            // See http://library.gnome.org/devel/hig-book/stable/controls-lists.html.en#controls-lists-sortable
    772789            if (header->sortIndicator & QStyleOptionHeader::SortUp)
    773790                type = GTK_ARROW_UP;
     
    787804            QRect frameRect = option->rect.adjusted(1, 1, -1, -2);
    788805
    789             if (qobject_cast<const QTabBar*>(widget))
    790                 frameRect.adjust(-1, 1, 1, 1);
    791 
    792             gtkPainter.paintFocus(NULL, "tab", frameRect, GTK_STATE_ACTIVE, style);
     806            if (qobject_cast<const QTabBar*>(widget)) {
     807                GtkWidget *gtkNotebook = d->gtkWidget("GtkNotebook");
     808                style = gtkPainter.getStyle(gtkNotebook);
     809                gtkPainter.paintFocus(gtkNotebook, "tab", frameRect.adjusted(-1, 1, 1, 1), GTK_STATE_ACTIVE, style);
     810            } else {
     811                gtkPainter.paintFocus(NULL, "tab", frameRect, GTK_STATE_ACTIVE, style);
     812            }
    793813        }
    794814        break;
     
    802822            GtkExpanderStyle openState = GTK_EXPANDER_EXPANDED;
    803823            GtkExpanderStyle closedState = GTK_EXPANDER_COLLAPSED;
    804             GtkWidget *gtkTreeView = d->gtkWidget(QLS("GtkTreeView"));
     824            GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView");
    805825
    806826            GtkStateType state = GTK_STATE_NORMAL;
     
    814834        }
    815835        break;
     836
     837    case PE_PanelItemViewRow:
     838        // This primitive is only used to draw selection behind selected expander arrows.
     839        // We try not to decorate the tree branch background unless you inherit from StyledItemDelegate
     840        // The reason for this is that a lot of code that relies on custom item delegates will look odd having
     841        // a gradient on the branch but a flat shaded color on the item itself.
     842        QCommonStyle::drawPrimitive(element, option, painter, widget);
     843        if (!option->state & State_Selected) {
     844            break;
     845        } else {
     846            if (const QAbstractItemView *view = qobject_cast<const QAbstractItemView*>(widget)) {
     847                if (!qobject_cast<QStyledItemDelegate*>(view->itemDelegate()))
     848                    break;
     849            }
     850        } // fall through
     851
    816852    case PE_PanelItemViewItem:
    817853        if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) {
    818             if (vopt->state & State_Selected) {
    819                 QLinearGradient gradient;
    820                 gradient.setStart(option->rect.left(), option->rect.top());
    821                 gradient.setFinalStop(option->rect.left(), option->rect.bottom());
    822                 gradient.setColorAt(0, option->palette.highlight().color().lighter(105));
    823                 gradient.setColorAt(0.5, option->palette.highlight().color().lighter(101));
    824                 gradient.setColorAt(0.51, option->palette.highlight().color().darker(101));
    825                 gradient.setColorAt(1, option->palette.highlight().color().darker(105));
    826                 painter->fillRect(option->rect, gradient);
    827             } else {
    828                 if (vopt->backgroundBrush.style() != Qt::NoBrush) {
    829                     QPointF oldBO = painter->brushOrigin();
    830                     painter->setBrushOrigin(vopt->rect.topLeft());
    831                     painter->fillRect(vopt->rect, vopt->backgroundBrush);
    832                     painter->setBrushOrigin(oldBO);
     854            uint resolve_mask = vopt->palette.resolve();
     855            if (vopt->backgroundBrush.style() != Qt::NoBrush
     856                    || (resolve_mask & (1 << QPalette::Base)))
     857            {
     858                QPointF oldBO = painter->brushOrigin();
     859                painter->setBrushOrigin(vopt->rect.topLeft());
     860                painter->fillRect(vopt->rect, vopt->backgroundBrush);
     861                painter->setBrushOrigin(oldBO);
     862                if (!(option->state & State_Selected))
     863                    break;
     864            }
     865            if (GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView")) {
     866                const char *detail = "cell_even_ruled";
     867                if (vopt && vopt->features & QStyleOptionViewItemV2::Alternate)
     868                    detail = "cell_odd_ruled";
     869                bool isActive = option->state & State_Active;
     870                QString key;
     871                if (isActive ) {
     872                    // Required for active/non-active window appearance
     873                    key = QLS("a");
     874                    GTK_WIDGET_SET_FLAGS(gtkTreeView, GTK_HAS_FOCUS);
    833875                }
     876                bool isEnabled = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled));
     877                gtkPainter.paintFlatBox(gtkTreeView, detail, option->rect,
     878                                        option->state & State_Selected ? GTK_STATE_SELECTED :
     879                                        isEnabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
     880                                        GTK_SHADOW_OUT, gtkTreeView->style, key);
     881                if (isActive )
     882                    GTK_WIDGET_UNSET_FLAGS(gtkTreeView, GTK_HAS_FOCUS);
    834883            }
    835884        }
     
    838887        {
    839888            const int margin = 6;
    840             GtkWidget *gtkSeparator = d->gtkWidget(QLS("GtkToolbar.GtkSeparatorToolItem"));
     889            GtkWidget *gtkSeparator = d->gtkWidget("GtkToolbar.GtkSeparatorToolItem");
    841890            if (option->state & State_Horizontal) {
    842891                const int offset = option->rect.width()/2;
     
    858907
    859908    case PE_IndicatorToolBarHandle: {
    860         GtkWidget *gtkToolbar = d->gtkWidget(QLS("GtkToolbar"));
     909        GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar");
    861910        GtkShadowType shadow_type;
    862911        d->gtk_widget_style_get(gtkToolbar, "shadow-type", &shadow_type, NULL);
     
    906955
    907956        QColor arrowColor = option->palette.buttonText().color();
    908         GtkWidget *gtkArrow = d->gtkWidget(QLS("GtkArrow"));
     957        GtkWidget *gtkArrow = d->gtkWidget("GtkArrow");
    909958        GdkColor color = fromQColor(arrowColor);
    910959        d->gtk_widget_modify_fg (gtkArrow, state, &color);
     
    922971
    923972    case PE_PanelMenu: {
    924             GtkWidget *gtkMenu = d->gtkWidget(QLS("GtkMenu"));
     973            GtkWidget *gtkMenu = d->gtkWidget("GtkMenu");
    925974            gtkPainter.setAlphaSupport(false); // Note, alpha disabled for performance reasons
    926975            gtkPainter.paintBox(gtkMenu, "menu", option->rect, GTK_STATE_NORMAL, GTK_SHADOW_OUT, gtkMenu->style, QString());
     
    934983        // This is only used by floating tool bars
    935984        if (qobject_cast<const QToolBar *>(widget)) {
    936             GtkWidget *gtkMenubar = d->gtkWidget(QLS("GtkMenuBar"));
     985            GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar");
    937986            gtkPainter.paintBox( gtkMenubar, "toolbar",  option->rect,
    938987                                 GTK_STATE_NORMAL, GTK_SHADOW_OUT, style);
     
    943992
    944993    case PE_FrameLineEdit: {
    945         GtkWidget *gtkEntry = d->gtkWidget(QLS("GtkEntry"));
     994        GtkWidget *gtkEntry = d->gtkWidget("GtkEntry");
    946995
    947996
     
    9771026    case PE_PanelLineEdit:
    9781027        if (const QStyleOptionFrame *panel = qstyleoption_cast<const QStyleOptionFrame *>(option)) {
    979             GtkWidget *gtkEntry = d->gtkWidget(QLS("GtkEntry"));
     1028            GtkWidget *gtkEntry = d->gtkWidget("GtkEntry");
    9801029            if (panel->lineWidth > 0)
    9811030                proxy()->drawPrimitive(PE_FrameLineEdit, option, painter, widget);
     
    9951044    case PE_FrameTabWidget:
    9961045        if (const QStyleOptionTabWidgetFrame *frame = qstyleoption_cast<const QStyleOptionTabWidgetFrame*>(option)) {
    997             GtkWidget *gtkNotebook = d->gtkWidget(QLS("GtkNotebook"));
     1046            GtkWidget *gtkNotebook = d->gtkWidget("GtkNotebook");
    9981047            style = gtkPainter.getStyle(gtkNotebook);
    9991048            gtkPainter.setAlphaSupport(false);
     
    10431092        if (option->state & State_On || option->state & State_Sunken)
    10441093            state = GTK_STATE_ACTIVE;
    1045         GtkWidget *gtkButton = d->gtkWidget(isTool ? QLS("GtkToolButton.GtkButton") : QLS("GtkButton"));
     1094        GtkWidget *gtkButton = isTool ? d->gtkWidget("GtkToolButton.GtkButton") : d->gtkWidget("GtkButton");
    10461095        gint focusWidth, focusPad;
    10471096        gboolean interiorFocus = false;
     
    10991148            shadow = GTK_SHADOW_OUT;
    11001149
    1101         GtkWidget *gtkRadioButton = d->gtkWidget(QLS("GtkRadioButton"));
     1150        GtkWidget *gtkRadioButton = d->gtkWidget("GtkRadioButton");
    11021151        gint spacing;
    11031152        d->gtk_widget_style_get(gtkRadioButton, "indicator-spacing", &spacing, NULL);
     
    11061155        // ### Note: Ubuntulooks breaks when the proper widget is passed
    11071156        //           Murrine engine requires a widget not to get RGBA check - warnings
    1108         GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton"));
     1157        GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton");
    11091158        QString key(QLS("radiobutton"));
    11101159        if (option->state & State_HasFocus) { // Themes such as Nodoka check this flag
     
    11341183        int spacing;
    11351184
    1136         GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton"));
     1185        GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton");
    11371186        QString key(QLS("checkbutton"));
    11381187        if (option->state & State_HasFocus) { // Themes such as Nodoka checks this flag
     
    11621211                = qstyleoption_cast<const QStyleOptionTabBarBase *>(option)) {
    11631212            QRect tabRect = tbb->rect;
    1164             QRegion region(tabRect);
    11651213            painter->save();
    11661214            painter->setPen(QPen(option->palette.dark().color().dark(110), 0));
     
    12441292        alphaCornerColor = mergedColors(option->palette.background().color(), darkOutline);
    12451293
    1246     QPalette palette = option->palette;
    1247 
    12481294    switch (control) {
    12491295
     
    12761322            if ((groupBox->subControls & QStyle::SC_GroupBoxLabel) && !groupBox->text.isEmpty()) {
    12771323                // Draw prelight background
    1278                 GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton"));
     1324                GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton");
    12791325
    12801326                if (option->state & State_MouseOver) {
     
    13321378            bool isEnabled = (comboBox->state & State_Enabled);
    13331379            bool focus = isEnabled && (comboBox->state & State_HasFocus);
    1334             QColor buttonShadow = option->palette.dark().color();
    13351380            GtkStateType state = gtkPainter.gtkState(option);
    13361381            int appears_as_list = !proxy()->styleHint(QStyle::SH_ComboBox_Popup, comboBox, widget);
    1337             QPixmap cache;
    1338             QString pixmapName;
    13391382            QStyleOptionComboBox comboBoxCopy = *comboBox;
    13401383            comboBoxCopy.rect = option->rect;
     
    13441387            QRect arrowButtonRect = proxy()->subControlRect(CC_ComboBox, &comboBoxCopy,
    13451388                                                   SC_ComboBoxArrow, widget);
    1346             QRect editRect = proxy()->subControlRect(CC_ComboBox, &comboBoxCopy,
    1347                                             SC_ComboBoxEditField, widget);
    13481389
    13491390            GtkShadowType shadow = (option->state & State_Sunken || option->state & State_On ) ?
    13501391                                   GTK_SHADOW_IN : GTK_SHADOW_OUT;
    1351             QString comboBoxPath = QLS(comboBox->editable ? "GtkComboBoxEntry" : "GtkComboBox");
     1392            const QHashableLatin1Literal comboBoxPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry") : QHashableLatin1Literal("GtkComboBox");
    13521393
    13531394            // We use the gtk widget to position arrows and separators for us
     
    13571398            d->gtk_widget_size_allocate(gtkCombo, &geometry);
    13581399
    1359             QString buttonPath = comboBoxPath + QLS(".GtkToggleButton");
     1400            QHashableLatin1Literal buttonPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton")
     1401                                : QHashableLatin1Literal("GtkComboBox.GtkToggleButton");
    13601402            GtkWidget *gtkToggleButton = d->gtkWidget(buttonPath);
    13611403            d->gtk_widget_set_direction(gtkToggleButton, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
     
    13661408                if (comboBox->editable || appears_as_list) {
    13671409                    GtkStateType frameState = (state == GTK_STATE_PRELIGHT) ? GTK_STATE_NORMAL : state;
    1368                     QString entryPath = QLS(comboBox->editable ? "GtkComboBoxEntry.GtkEntry" : "GtkComboBox.GtkFrame");
     1410                    QHashableLatin1Literal entryPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkEntry") : QHashableLatin1Literal("GtkComboBox.GtkFrame");
    13691411                    GtkWidget *gtkEntry = d->gtkWidget(entryPath);
    13701412                    d->gtk_widget_set_direction(gtkEntry, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
     
    13921434                        gtkCachedPainter.paintFlatBox(gtkEntry, "entry_bg", contentRect,
    13931435                                                option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
    1394                                                 GTK_SHADOW_NONE, gtkEntry->style, entryPath + QString::number(focus));
     1436                                                GTK_SHADOW_NONE, gtkEntry->style, entryPath.toString() + QString::number(focus));
    13951437                    }
    13961438
    13971439                    gtkCachedPainter.paintShadow(gtkEntry, comboBox->editable ? "entry" : "frame", frameRect, frameState,
    1398                                            GTK_SHADOW_IN, gtkEntry->style, entryPath +
     1440                                           GTK_SHADOW_IN, gtkEntry->style, entryPath.toString() +
    13991441                                           QString::number(focus) + QString::number(comboBox->editable) +
    14001442                                           QString::number(option->direction));
     
    14121454                    buttonState = GTK_STATE_PRELIGHT;
    14131455
    1414                 QRect buttonrect = QRect(gtkToggleButton->allocation.x, gtkToggleButton->allocation.y,
    1415                                          gtkToggleButton->allocation.width, gtkToggleButton->allocation.height);
    1416 
    14171456                Q_ASSERT(gtkToggleButton);
    14181457                gtkCachedPainter.paintBox( gtkToggleButton, "button", arrowButtonRect, buttonState,
    1419                                      shadow, gtkToggleButton->style, buttonPath +
     1458                                     shadow, gtkToggleButton->style, buttonPath.toString() +
    14201459                                     QString::number(focus) + QString::number(option->direction));
    14211460                if (focus)
     
    14301469                                    buttonRect, state,
    14311470                                    shadow, gtkToggleButton->style,
    1432                                     buttonPath + QString::number(focus));
     1471                                    buttonPath.toString() + QString::number(focus));
    14331472                if (focus)
    14341473                    GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS);
    14351474
     1475
    14361476                // Draw the separator between label and arrows
    1437                 QString vSeparatorPath = buttonPath + QLS(".GtkHBox.GtkVSeparator");
     1477                QHashableLatin1Literal vSeparatorPath = comboBox->editable
     1478                    ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton.GtkHBox.GtkVSeparator")
     1479                    : QHashableLatin1Literal("GtkComboBox.GtkToggleButton.GtkHBox.GtkVSeparator");
    14381480
    14391481                if (GtkWidget *gtkVSeparator = d->gtkWidget(vSeparatorPath)) {
     
    14451487                    gtkCachedPainter.paintVline( gtkVSeparator, "vseparator",
    14461488                                           vLineRect, state, gtkVSeparator->style,
    1447                                            0, vLineRect.height(), 0,  vSeparatorPath);
     1489                                           0, vLineRect.height(), 0,  vSeparatorPath.toString());
    14481490
    14491491
     
    14701512                    state = GTK_STATE_NORMAL;
    14711513
    1472                 QString arrowPath = comboBoxPath + QLS(appears_as_list ? ".GtkToggleButton.GtkArrow"
    1473                                                     : ".GtkToggleButton.GtkHBox.GtkArrow");
     1514                QHashableLatin1Literal arrowPath("");
     1515                if (comboBox->editable) {
     1516                    if (appears_as_list)
     1517                        arrowPath = QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton.GtkArrow");
     1518                    else
     1519                        arrowPath = QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton.GtkHBox.GtkArrow");
     1520                } else {
     1521                    if (appears_as_list)
     1522                        arrowPath = QHashableLatin1Literal("GtkComboBox.GtkToggleButton.GtkArrow");
     1523                    else
     1524                        arrowPath = QHashableLatin1Literal("GtkComboBox.GtkToggleButton.GtkHBox.GtkArrow");
     1525                }
    14741526
    14751527                GtkWidget *gtkArrow = d->gtkWidget(arrowPath);
     
    14981550                if (sunken) {
    14991551                    int xoff, yoff;
    1500                     GtkWidget *gtkButton = d->gtkWidget(comboBoxPath + QLS(".GtkToggleButton"));
     1552                    const QHashableLatin1Literal toggleButtonPath = comboBox->editable
     1553                            ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton")
     1554                            : QHashableLatin1Literal("GtkComboBox.GtkToggleButton");
     1555
     1556                    GtkWidget *gtkButton = d->gtkWidget(toggleButtonPath);
    15011557                    d->gtk_widget_style_get(gtkButton, "child-displacement-x", &xoff, NULL);
    15021558                    d->gtk_widget_style_get(gtkButton, "child-displacement-y", &yoff, NULL);
     
    15101566                    gtkCachedPainter.paintArrow( gtkArrow, "arrow", arrowRect,
    15111567                                           GTK_ARROW_DOWN, state, GTK_SHADOW_NONE, TRUE,
    1512                                            style, arrowPath + QString::number(option->direction));
     1568                                           style, arrowPath.toString() + QString::number(option->direction));
    15131569                }
    15141570            }
     
    15711627            QStyleOptionToolButton label = *toolbutton;
    15721628            label.state = bflags;
    1573             GtkWidget *gtkButton = d->gtkWidget(QLS("GtkToolButton.GtkButton"));
     1629            GtkWidget *gtkButton = d->gtkWidget("GtkToolButton.GtkButton");
    15741630            QPalette pal = toolbutton->palette;
    15751631            if (option->state & State_Enabled &&
     
    16061662    case CC_ScrollBar:
    16071663        if (const QStyleOptionSlider *scrollBar = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
    1608             GtkWidget *gtkHScrollBar = d->gtkWidget(QLS("GtkHScrollbar"));
    1609             GtkWidget *gtkVScrollBar = d->gtkWidget(QLS("GtkVScrollbar"));
     1664            GtkWidget *gtkHScrollBar = d->gtkWidget("GtkHScrollbar");
     1665            GtkWidget *gtkVScrollBar = d->gtkWidget("GtkVScrollbar");
    16101666
    16111667            // Fill background in case the scrollbar is partially transparent
     
    16221678            gboolean trough_under_steppers = true;
    16231679            gboolean trough_side_details = false;
     1680            gboolean activate_slider = false;
    16241681            gboolean stepper_size = 14;
    16251682            gint trough_border = 1;
     
    16291686                                           "trough-side-details",   &trough_side_details,
    16301687                                           "trough-under-steppers", &trough_under_steppers,
     1688                                           "activate-slider",       &activate_slider,
    16311689                                           "stepper-size",          &stepper_size, NULL);
    16321690            }
     
    16741732                if (!(option->state & State_Enabled))
    16751733                    state = GTK_STATE_INSENSITIVE;
     1734                else if (activate_slider &&
     1735                         option->state & State_Sunken && (scrollBar->activeSubControls & SC_ScrollBarSlider))
     1736                    state = GTK_STATE_ACTIVE;
    16761737                else if (option->state & State_MouseOver && (scrollBar->activeSubControls & SC_ScrollBarSlider))
    16771738                    state = GTK_STATE_PRELIGHT;
     
    17521813        if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
    17531814
    1754             GtkWidget *gtkSpinButton = d->gtkWidget(
    1755                     spinBox->buttonSymbols == QAbstractSpinBox::NoButtons ?
    1756                     QLS("GtkEntry") :
    1757                     QLS("GtkSpinButton"));
     1815            GtkWidget *gtkSpinButton = spinBox->buttonSymbols == QAbstractSpinBox::NoButtons
     1816                        ? d->gtkWidget("GtkEntry")
     1817                        : d->gtkWidget("GtkSpinButton");
    17581818            bool isEnabled = (spinBox->state & State_Enabled);
    17591819            bool hover = isEnabled && (spinBox->state & State_MouseOver);
     
    19071967    case CC_Slider:
    19081968        if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
    1909             GtkWidget *hScaleWidget = d->gtkWidget(QLS("GtkHScale"));
    1910             GtkWidget *vScaleWidget = d->gtkWidget(QLS("GtkVScale"));
     1969            GtkWidget *hScaleWidget = d->gtkWidget("GtkHScale");
     1970            GtkWidget *vScaleWidget = d->gtkWidget("GtkVScale");
    19111971
    19121972            QRect groove = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget);
    19131973            QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget);
    1914             QRect ticks = proxy()->subControlRect(CC_Slider, option, SC_SliderTickmarks, widget);
    19151974
    19161975            bool horizontal = slider->orientation == Qt::Horizontal;
    19171976            bool ticksAbove = slider->tickPosition & QSlider::TicksAbove;
    19181977            bool ticksBelow = slider->tickPosition & QSlider::TicksBelow;
    1919             QColor activeHighlight = option->palette.color(QPalette::Normal, QPalette::Highlight);
    1920 
    1921             QPixmap cache;
     1978
    19221979            QBrush oldBrush = painter->brush();
    19231980            QPen oldPen = painter->pen();
     
    19281985            highlightAlpha.setAlpha(80);
    19291986
     1987            QGtkStylePrivate::gtk_widget_set_direction(hScaleWidget, slider->upsideDown ?
     1988                                                       GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
    19301989            GtkWidget *scaleWidget = horizontal ? hScaleWidget : vScaleWidget;
    19311990            style = scaleWidget->style;
     
    19612020
    19622021                    if (horizontal) {
    1963                         upperGroove.setLeft(handle.center().x());
    1964                         lowerGroove.setRight(handle.center().x());
     2022                        if (slider->upsideDown) {
     2023                            lowerGroove.setLeft(handle.center().x());
     2024                            upperGroove.setRight(handle.center().x());
     2025                        } else {
     2026                            upperGroove.setLeft(handle.center().x());
     2027                            lowerGroove.setRight(handle.center().x());
     2028                        }
    19652029                    } else {
    1966                         upperGroove.setBottom(handle.center().y());
    1967                         lowerGroove.setTop(handle.center().y());
     2030                        if (!slider->upsideDown) {
     2031                            lowerGroove.setBottom(handle.center().y());
     2032                            upperGroove.setTop(handle.center().y());
     2033                        } else {
     2034                            upperGroove.setBottom(handle.center().y());
     2035                            lowerGroove.setTop(handle.center().y());
     2036                        }
    19682037                    }
    19692038
     
    20982167    case CE_ProgressBarLabel:
    20992168        if (const QStyleOptionProgressBar *bar = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) {
    2100             GtkWidget *gtkProgressBar = d->gtkWidget(QLS("GtkProgressBar"));
     2169            GtkWidget *gtkProgressBar = d->gtkWidget("GtkProgressBar");
    21012170            if (!gtkProgressBar)
    21022171                return;
     
    22012270                ir = ir.adjusted(0, 0, -pixelMetric(PM_MenuButtonIndicator, button, widget), 0);
    22022271
    2203             GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
     2272            GtkWidget *gtkButton = d->gtkWidget("GtkButton");
    22042273            QPalette pal = button->palette;
    22052274            int labelState = GTK_STATE_INSENSITIVE;
     
    22222291
    22232292            // Draw prelight background
    2224             GtkWidget *gtkRadioButton = d->gtkWidget(QLS("GtkRadioButton"));
     2293            GtkWidget *gtkRadioButton = d->gtkWidget("GtkRadioButton");
    22252294
    22262295            if (option->state & State_MouseOver) {
     
    22902359
    22912360            if (!cb->currentText.isEmpty() && !cb->editable) {
    2292                 GtkWidget *gtkCombo = d->gtkWidget(QLS("GtkComboBox"));
     2361                GtkWidget *gtkCombo = d->gtkWidget("GtkComboBox");
    22932362                QPalette pal = cb->palette;
    22942363                int labelState = GTK_STATE_INSENSITIVE;
     
    23672436        if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
    23682437            Q_UNUSED(header);
    2369             GtkWidget *gtkTreeView = d->gtkWidget(QLS("GtkTreeView"));
     2438            GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView");
    23702439            // Get the middle column
    23712440            GtkTreeViewColumn *column = d->gtk_tree_view_get_column((GtkTreeView*)gtkTreeView, 1);
     
    23882457
    23892458    case CE_SizeGrip: {
    2390         GtkWidget *gtkStatusbar = d->gtkWidget(QLS("GtkStatusbar.GtkFrame"));
     2459        GtkWidget *gtkStatusbar = d->gtkWidget("GtkStatusbar.GtkFrame");
    23912460        QRect gripRect = option->rect.adjusted(0, 0, -gtkStatusbar->style->xthickness, -gtkStatusbar->style->ythickness);
    23922461        gtkPainter.paintResizeGrip( gtkStatusbar, "statusbar", gripRect, GTK_STATE_NORMAL,
     
    24002469
    24012470    case CE_MenuBarEmptyArea: {
    2402         GtkWidget *gtkMenubar = d->gtkWidget(QLS("GtkMenuBar"));
     2471        GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar");
    24032472        GdkColor gdkBg = gtkMenubar->style->bg[GTK_STATE_NORMAL]; // Theme can depend on transparency
    24042473        painter->fillRect(option->rect, QColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8));
     
    24232492
    24242493        if (const QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
    2425             GtkWidget *gtkMenubarItem = d->gtkWidget(QLS("GtkMenuBar.GtkMenuItem"));
    2426             GtkWidget *gtkMenubar = d->gtkWidget(QLS("GtkMenuBar"));
     2494            GtkWidget *gtkMenubarItem = d->gtkWidget("GtkMenuBar.GtkMenuItem");
     2495            GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar");
    24272496
    24282497            style = gtkMenubarItem->style;
     
    24802549
    24812550    case CE_Splitter: {
    2482         GtkWidget *gtkWindow = d->gtkWidget(QLS("GtkWindow")); // The Murrine Engine currently assumes a widget is passed
     2551        GtkWidget *gtkWindow = d->gtkWidget("GtkWindow"); // The Murrine Engine currently assumes a widget is passed
    24832552        gtkPainter.paintHandle(gtkWindow, "splitter", option->rect, gtkPainter.gtkState(option), GTK_SHADOW_NONE,
    24842553                                !(option->state & State_Horizontal) ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL,
     
    25002569                rect.adjust(0, 0, 1, 0);
    25012570
    2502             GtkWidget *gtkToolbar = d->gtkWidget(QLS("GtkToolbar"));
     2571            GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar");
    25032572            GtkShadowType shadow_type = GTK_SHADOW_NONE;
    25042573            d->gtk_widget_style_get(gtkToolbar, "shadow-type", &shadow_type, NULL);
     
    25192588            const int windowsItemVMargin      = 26; // menu item ver text margin
    25202589            const int windowsRightBorder      = 15; // right border on windows
    2521             GtkWidget *gtkMenuItem = menuItem->checked ? d->gtkWidget(QLS("GtkMenu.GtkCheckMenuItem")) :
    2522                                      d->gtkWidget(QLS("GtkMenu.GtkMenuItem"));
     2590            GtkWidget *gtkMenuItem = menuItem->checked ? d->gtkWidget("GtkMenu.GtkCheckMenuItem") :
     2591                                     d->gtkWidget("GtkMenu.GtkMenuItem");
    25232592
    25242593            style = gtkPainter.getStyle(gtkMenuItem);
    2525             QColor borderColor = option->palette.background().color().darker(160);
    25262594            QColor shadow = option->palette.dark().color();
    25272595
    25282596            if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
    2529                 GtkWidget *gtkMenuSeparator = d->gtkWidget(QLS("GtkMenu.GtkSeparatorMenuItem"));
     2597                GtkWidget *gtkMenuSeparator = d->gtkWidget("GtkMenu.GtkSeparatorMenuItem");
    25302598                painter->setPen(shadow.lighter(106));
    25312599                gboolean wide_separators = 0;
     
    25712639
    25722640            gint checkSize;
    2573             d->gtk_widget_style_get(d->gtkWidget(QLS("GtkMenu.GtkCheckMenuItem")), "indicator-size", &checkSize, NULL);
     2641            d->gtk_widget_style_get(d->gtkWidget("GtkMenu.GtkCheckMenuItem"), "indicator-size", &checkSize, NULL);
    25742642
    25752643            int checkcol = qMax(menuItem->maxIconWidth, qMax(20, checkSize));
     
    27482816            // Arrow
    27492817            if (menuItem->menuItemType == QStyleOptionMenuItem::SubMenu) {// draw sub menu arrow
    2750                 QPoint buttonShift(pixelMetric(PM_ButtonShiftHorizontal, option, widget),
    2751                                    proxy()->pixelMetric(PM_ButtonShiftVertical, option, widget));
    27522818
    27532819                QFontMetrics fm(menuitem->font);
     
    27822848    case CE_PushButton:
    27832849        if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(option)) {
    2784             GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
     2850            GtkWidget *gtkButton = d->gtkWidget("GtkButton");
    27852851            proxy()->drawControl(CE_PushButtonBevel, btn, painter, widget);
    27862852            QStyleOptionButton subopt = *btn;
     
    28082874    case CE_TabBarTabShape:
    28092875        if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) {
    2810             GtkWidget *gtkNotebook = d->gtkWidget(QLS("GtkNotebook"));
     2876            GtkWidget *gtkNotebook = d->gtkWidget("GtkNotebook");
    28112877            style = gtkPainter.getStyle(gtkNotebook);
    28122878
     
    28752941        if (const QStyleOptionProgressBar *bar = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) {
    28762942            Q_UNUSED(bar);
    2877             GtkWidget *gtkProgressBar = d->gtkWidget(QLS("GtkProgressBar"));
     2943            GtkWidget *gtkProgressBar = d->gtkWidget("GtkProgressBar");
    28782944            GtkStateType state = gtkPainter.gtkState(option);
    28792945            gtkPainter.paintBox( gtkProgressBar, "trough",  option->rect, state, GTK_SHADOW_IN, gtkProgressBar->style);
     
    28852951        if (const QStyleOptionProgressBar *bar = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) {
    28862952            GtkStateType state = option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE;
    2887             GtkWidget *gtkProgressBar = d->gtkWidget(QLS("GtkProgressBar"));
     2953            GtkWidget *gtkProgressBar = d->gtkWidget("GtkProgressBar");
    28882954            style = gtkProgressBar->style;
    28892955            gtkPainter.paintBox( gtkProgressBar, "trough",  option->rect, state, GTK_SHADOW_IN, style);
     
    30433109    case CC_SpinBox:
    30443110        if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
    3045             GtkWidget *gtkSpinButton = d->gtkWidget(QLS("GtkSpinButton"));
     3111            GtkWidget *gtkSpinButton = d->gtkWidget("GtkSpinButton");
    30463112            int center = spinbox->rect.height() / 2;
    30473113            int xt = spinbox->frame ? gtkSpinButton->style->xthickness : 0;
     
    30963162        if (const QStyleOptionComboBox *box = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
    30973163            // We employ the gtk widget to position arrows and separators for us
    3098             QString comboBoxPath = box->editable ? QLS("GtkComboBoxEntry") : QLS("GtkComboBox");
    3099             GtkWidget *gtkCombo = d->gtkWidget(comboBoxPath);
     3164            GtkWidget *gtkCombo = box->editable ? d->gtkWidget("GtkComboBoxEntry")
     3165                                                : d->gtkWidget("GtkComboBox");
    31003166            d->gtk_widget_set_direction(gtkCombo, (option->direction == Qt::RightToLeft) ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
    31013167            GtkAllocation geometry = {0, 0, qMax(0, option->rect.width()), qMax(0, option->rect.height())};
    31023168            d->gtk_widget_size_allocate(gtkCombo, &geometry);
    31033169            int appears_as_list = !proxy()->styleHint(QStyle::SH_ComboBox_Popup, option, widget);
    3104             QString arrowPath = comboBoxPath + QLS(".GtkToggleButton");
    3105 
    3106             if (!box->editable && !appears_as_list)
    3107                 arrowPath += QLS(".GtkHBox.GtkArrow");
     3170            QHashableLatin1Literal arrowPath("GtkComboBoxEntry.GtkToggleButton");
     3171            if (!box->editable) {
     3172                if (appears_as_list)
     3173                    arrowPath = "GtkComboBox.GtkToggleButton";
     3174                else
     3175                    arrowPath = "GtkComboBox.GtkToggleButton.GtkHBox.GtkArrow";
     3176            }
    31083177
    31093178            GtkWidget *arrowWidget = d->gtkWidget(arrowPath);
     
    31643233    case CT_ToolButton:
    31653234        if (const QStyleOptionToolButton *toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(option)) {
    3166             GtkWidget *gtkButton = d->gtkWidget(QLS("GtkToolButton.GtkButton"));
     3235            GtkWidget *gtkButton = d->gtkWidget("GtkToolButton.GtkButton");
    31673236            newSize = size + QSize(2 * gtkButton->style->xthickness, 2 + 2 * gtkButton->style->ythickness);
    31683237            if (widget && qobject_cast<QToolBar *>(widget->parentWidget())) {
     
    31823251
    31833252            if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
    3184                 GtkWidget *gtkMenuSeparator = d->gtkWidget(QLS("GtkMenu.GtkSeparatorMenuItem"));
     3253                GtkWidget *gtkMenuSeparator = d->gtkWidget("GtkMenu.GtkSeparatorMenuItem");
    31853254                GtkRequisition sizeReq = {0, 0};
    31863255                d->gtk_widget_size_request(gtkMenuSeparator, &sizeReq);
     
    31893258            }
    31903259
    3191             GtkWidget *gtkMenuItem = d->gtkWidget(QLS("GtkMenu.GtkCheckMenuItem"));
     3260            GtkWidget *gtkMenuItem = d->gtkWidget("GtkMenu.GtkCheckMenuItem");
    31923261            GtkStyle* style = gtkMenuItem->style;
    31933262
     
    32113280    case CT_SpinBox:
    32123281        // QSpinBox does some nasty things that depends on CT_LineEdit
    3213         newSize = size + QSize(0, -d->gtkWidget(QLS("GtkSpinButton"))->style->ythickness * 2);
     3282        newSize = size + QSize(0, -d->gtkWidget("GtkSpinButton")->style->ythickness * 2);
    32143283        break;
    32153284
    32163285    case CT_PushButton:
    32173286        if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(option)) {
    3218             GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
     3287            GtkWidget *gtkButton = d->gtkWidget("GtkButton");
    32193288            gint focusPadding, focusWidth;
    32203289            d->gtk_widget_style_get(gtkButton, "focus-padding", &focusPadding, NULL);
     
    32243293            newSize += QSize(2*(focusWidth + focusPadding + 2), 2*(focusWidth + focusPadding));
    32253294
    3226             GtkWidget *gtkButtonBox = d->gtkWidget(QLS("GtkHButtonBox"));
     3295            GtkWidget *gtkButtonBox = d->gtkWidget("GtkHButtonBox");
    32273296            gint minWidth = 85, minHeight = 0;
    32283297            d->gtk_widget_style_get(gtkButtonBox, "child-min-width", &minWidth,
     
    32373306
    32383307    case CT_Slider: {
    3239         GtkWidget *gtkSlider = d->gtkWidget(QLS("GtkHScale"));
     3308        GtkWidget *gtkSlider = d->gtkWidget("GtkHScale");
    32403309        newSize = size + QSize(2*gtkSlider->style->xthickness, 2*gtkSlider->style->ythickness);
    32413310    }
     
    32433312
    32443313    case CT_LineEdit: {
    3245         GtkWidget *gtkEntry = d->gtkWidget(QLS("GtkEntry"));
     3314        GtkWidget *gtkEntry = d->gtkWidget("GtkEntry");
    32463315        newSize = size + QSize(2*gtkEntry->style->xthickness, 2 + 2*gtkEntry->style->ythickness);
    32473316    }
     
    32543323    case CT_ComboBox:
    32553324        if (const QStyleOptionComboBox *combo = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
    3256             GtkWidget *gtkCombo = d->gtkWidget(QLS("GtkComboBox"));
     3325            GtkWidget *gtkCombo = d->gtkWidget("GtkComboBox");
    32573326            QRect arrowButtonRect = proxy()->subControlRect(CC_ComboBox, combo, SC_ComboBoxArrow, widget);
    32583327            newSize = size + QSize(12 + arrowButtonRect.width() + 2*gtkCombo->style->xthickness, 4 + 2*gtkCombo->style->ythickness);
     
    34093478    case SE_PushButtonContents:
    34103479        if (!d->gtk_check_version(2, 10, 0)) {
    3411             GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
     3480            GtkWidget *gtkButton = d->gtkWidget("GtkButton");
    34123481            GtkBorder *border = 0;
    34133482            d->gtk_widget_style_get(gtkButton, "inner-border", &border, NULL);
Note: See TracChangeset for help on using the changeset viewer.