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.cpp60
1 files changed, 59 insertions, 1 deletions
diff --git a/tdegtk/tdegtk-draw.cpp b/tdegtk/tdegtk-draw.cpp
index 2bd54e8..741eb1c 100644
--- a/tdegtk/tdegtk-draw.cpp
+++ b/tdegtk/tdegtk-draw.cpp
@@ -1320,6 +1320,9 @@ tdegtk_draw_common_background (DRAW_ARGS)
state = gtk_theming_engine_get_state(engine);
widget = m_widgetLookup.find(cr, path);
+ //TQString widgetPath(Gtk::gtk_widget_path(widget));
+ TQString widgetThemingEnginePath(gtk_widget_path_to_string(gtk_theming_engine_get_path(engine)));
+
if (gtk_theming_engine_has_class(engine, GTK_STYLE_CLASS_SCROLLBAR)) {
#ifdef DRAW_SCROLLBAR_PIECES_INSTEAD_OF_ENTIRE_BAR
TQStringList objectTypes;
@@ -1602,6 +1605,33 @@ tdegtk_draw_common_background (DRAW_ARGS)
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_widget_path_is_type(path, GTK_TYPE_LEVEL_BAR)) {
+ TQStringList objectTypes;
+ objectTypes.append(TQPROGRESSBAR_OBJECT_NAME_STRING);
+ TQPalette objectPalette = tqApp->palette(objectTypes);
+
+ if (gtk_theming_engine_has_class(engine, "fill-block")) {
+ // Draw background
+ TQBrush brush = objectPalette.brush(gtkToTQPaletteColorGroup(engine, state), TQColorGroup::Highlight);
+ DRAW_FILLED_RECTANGLE_OVER_ENTIRE_AREA(p, brush)
+ }
+ if (gtk_theming_engine_has_class(engine, "empty-fill-block")) {
+ // 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_COMBO_BOX)) {
+ // Do nothing
+ }
+
+ else if (widgetThemingEnginePath.endsWith("GtkTextHandle")) {
+ // Do nothing
+ // FIXME
+ // Where is this widget actually used?
+ }
+
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))
@@ -1830,6 +1860,33 @@ tdegtk_draw_common_frame (DRAW_ARGS)
tqApp->style().drawPrimitive(TQStyle::PE_PanelTabWidget, &p, boundingRect, gtkToTQtColorGroup(engine, state), gtkToTQtStyleFlags(engine, state, TQT3WT_NONE, widget));
}
+ else if (gtk_widget_path_is_type(path, GTK_TYPE_LEVEL_BAR)) {
+ const GtkAllocation allocation = Gtk::gtk_widget_get_allocation(widget);
+
+ boundingRect = TQRect(0, 0, allocation.width, allocation.height);
+ TQt3CairoPaintDevice pd2(NULL, 0, 0, allocation.width, allocation.height, cr);
+ TQPainter p2(&pd2);
+
+ TQStringList objectTypes;
+ objectTypes.append(TQPROGRESSBAR_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;
+
+ if (gtk_theming_engine_has_class(engine, "fill-block")) {
+ // Do nothing
+ }
+ if (gtk_theming_engine_has_class(engine, "empty-fill-block")) {
+ // Draw frame
+ p2.setClipRect(TQRect(x, y, width, height));
+ tqApp->style().drawPrimitive(TQStyle::PE_PanelLineEdit, &p2, 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::gtk_widget_path_has_type(path, GTK_TYPE_BOX))
|| (Gtk::gtk_widget_path_has_type(path, GTK_TYPE_EXPANDER))
@@ -2544,7 +2601,8 @@ tdegtk_draw_slider (DRAW_ARGS,
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));
+ //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));
+ tqApp->style().drawPrimitive(TQStyle::PE_ButtonBevel, &p, boundingRect, gtkToTQtColorGroup(engine, state), gtkToTQtStyleFlags(engine, state, TQT3WT_NONE, widget) | ((ceData.orientation == TQt::Horizontal)?TQStyle::Style_Horizontal:TQStyle::Style_Default));
}
else {