From 4a9ef2722b9e89206708b5889838ff8541badaab Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 1 Dec 2012 02:40:06 -0600 Subject: Fix checkbox drawing Fix tree view background drawing --- tdegtk/tdegtk-draw.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'tdegtk') diff --git a/tdegtk/tdegtk-draw.cpp b/tdegtk/tdegtk-draw.cpp index 1829289..8767c5f 100644 --- a/tdegtk/tdegtk-draw.cpp +++ b/tdegtk/tdegtk-draw.cpp @@ -152,9 +152,9 @@ static TQStyle::SFlags gtkToTQtStyleFlags(GtkThemingEngine* engine, GtkStateFlag } } if (mousedown) { - sflags |= TQStyle::Style_Down; - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkButton))) { - sflags |= TQStyle::Style_On; + sflags |= TQStyle::Style_On; + if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkButton))) { + sflags |= TQStyle::Style_Down; } } if (prelight) { @@ -1661,10 +1661,24 @@ tdegtk_draw_common_background (DRAW_ARGS) // Where is this widget actually used? } + else if (widgetThemingEnginePath.endsWith("GtkEventBox")) { + // Do nothing + } + else if (gtk_theming_engine_has_class(engine, GTK_STYLE_CLASS_BACKGROUND)) { // Do nothing } + else if (widgetThemingEnginePath.endsWith("GtkTreeView.view")) { + TQStringList objectTypes; + objectTypes.append(TQLISTVIEW_OBJECT_NAME_STRING); + TQPalette objectPalette = tqApp->palette(objectTypes); + + // Draw background + TQBrush brush = objectPalette.brush(gtkToTQPaletteColorGroup(engine, state), TQColorGroup::Base); + DRAW_FILLED_RECTANGLE_OVER_ENTIRE_AREA(p, brush) + } + else if ((gtk_widget_path_is_type(path, GTK_TYPE_EXPANDER)) || (gtk_widget_path_is_type(path, GTK_TYPE_BOX)) || (gtk_widget_path_is_type(path, GTK_TYPE_VIEWPORT)) -- cgit v1.2.3