summaryrefslogtreecommitdiffstats
path: root/tdegtk/tdegtk-draw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdegtk/tdegtk-draw.cpp')
-rw-r--r--tdegtk/tdegtk-draw.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/tdegtk/tdegtk-draw.cpp b/tdegtk/tdegtk-draw.cpp
index 21bd704..2bd54e8 100644
--- a/tdegtk/tdegtk-draw.cpp
+++ b/tdegtk/tdegtk-draw.cpp
@@ -1586,6 +1586,22 @@ tdegtk_draw_common_background (DRAW_ARGS)
// Do nothing
}
+ else if (gtk_widget_path_is_type(path, GTK_TYPE_SWITCH)) {
+ TQStringList objectTypes;
+ objectTypes.append(TQSCROLLBAR_OBJECT_NAME_STRING);
+ TQPalette objectPalette = tqApp->palette(objectTypes);
+
+ TQStyleControlElementData ceData;
+ TQStyle::ControlElementFlags elementFlags = TQStyle::CEF_None;
+ ceData.widgetObjectTypes = objectTypes;
+ ceData.rect = boundingRect;
+ ceData.orientation = (gtk_theming_engine_has_class(engine, GTK_STYLE_CLASS_VERTICAL))?TQt::Vertical:TQt::Horizontal;
+ ceData.startStep = 0;
+
+ // Draw frame
+ tqApp->style().drawPrimitive(TQStyle::PE_PanelLineEdit, &p, boundingRect, gtkToTQtColorGroup(engine, state), gtkToTQtStyleFlags(engine, state, TQT3WT_NONE, widget) | ((ceData.orientation == TQt::Horizontal)?TQStyle::Style_Horizontal:TQStyle::Style_Default));
+ }
+
else if ((gtk_theming_engine_has_class(engine, GTK_STYLE_CLASS_BACKGROUND))
|| (gtk_widget_path_is_type(path, GTK_TYPE_EXPANDER))
|| (gtk_widget_path_is_type(path, GTK_TYPE_BOX))
@@ -2515,6 +2531,22 @@ tdegtk_draw_slider (DRAW_ARGS,
draw_slider_frame(engine, cr, x, y, width, height, path, state, widget);
}
+ else if (gtk_widget_path_is_type(path, GTK_TYPE_SWITCH)) {
+ TQStringList objectTypes;
+ objectTypes.append(TQSCROLLBAR_OBJECT_NAME_STRING);
+ TQPalette objectPalette = tqApp->palette(objectTypes);
+
+ TQStyleControlElementData ceData;
+ TQStyle::ControlElementFlags elementFlags = TQStyle::CEF_None;
+ ceData.widgetObjectTypes = objectTypes;
+ ceData.rect = boundingRect;
+ ceData.orientation = (gtk_theming_engine_has_class(engine, GTK_STYLE_CLASS_VERTICAL))?TQt::Vertical:TQt::Horizontal;
+ ceData.startStep = 0;
+
+ // Draw slider
+ tqApp->style().drawPrimitive(TQStyle::PE_ScrollBarSlider, &p, boundingRect, gtkToTQtColorGroup(engine, state), gtkToTQtStyleFlags(engine, state, TQT3WT_NONE, widget) | ((ceData.orientation == TQt::Horizontal)?TQStyle::Style_Horizontal:TQStyle::Style_Default));
+ }
+
else {
DEBUG_FILL_BACKGROUND_WITH_COLOR(p,255,0,255);
printf("[WARNING] tdegtk_draw_slider() nonfunctional for widget with path '%s'\n\r", gtk_widget_path_to_string (gtk_theming_engine_get_path(engine))); fflush(stdout);