@ -918,21 +918,21 @@ draw_centroid_texture (GtkThemingEngine *engine,
gtk_theming_engine_get_property ( engine , " -tdegtk-centroid-texture " , state , & value ) ;
if ( ! G_VALUE_HOLDS_BOXED ( & value ) )
if ( ! G_VALUE_HOLDS_BOXED ( & value ) ) {
return FALSE ;
}
texture = ( cairo_pattern_t * ) g_value_dup_boxed ( & value ) ;
g_value_unset ( & value ) ;
if ( texture ! = NULL )
if ( texture ! = NULL ) {
cairo_pattern_get_surface ( texture , & surface ) ;
}
if ( surface ! = NULL )
{
if ( surface ! = NULL ) {
cairo_save ( cr ) ;
cairo_set_source_surface ( cr , surface , ( gint ) ( x + width / 2 - cairo_image_surface_get_width ( surface ) / 2 ) ,
( gint ) ( y + height / 2 - cairo_image_surface_get_height ( surface ) / 2 ) ) ;
cairo_set_source_surface ( cr , surface , ( gint ) ( x + width / 2 - cairo_image_surface_get_width ( surface ) / 2 ) , ( gint ) ( y + height / 2 - cairo_image_surface_get_height ( surface ) / 2 ) ) ;
cairo_paint ( cr ) ;
cairo_restore ( cr ) ;
@ -940,8 +940,9 @@ draw_centroid_texture (GtkThemingEngine *engine,
retval = TRUE ;
}
if ( texture ! = NULL )
if ( texture ! = NULL ) {
cairo_pattern_destroy ( texture ) ;
}
return retval ;
}
@ -1226,8 +1227,8 @@ tdegtk_draw_cell_frame (DRAW_ARGS,
state = gtk_theming_engine_get_state ( engine ) ;
widget = m_widgetLookup . find ( cr , path ) ;
#if 0
if ( gtk_widget_path_is_type ( path , GTK_TYPE_TREE_VIEW ) ) {
#if 0
TQStringList objectTypes ;
objectTypes . append ( TQLISTVIEW_OBJECT_NAME_STRING ) ;
TQPalette objectPalette = tqApp - > palette ( objectTypes ) ;
@ -1251,13 +1252,13 @@ tdegtk_draw_cell_frame (DRAW_ARGS,
// Draw item
tqApp - > style ( ) . drawComplexControl ( TQStyle : : CC_ListView , & p , ceData , elementFlags , boundingRect , gtkToTQtColorGroup ( engine , state ) , gtkToTQtStyleFlags ( engine , state , TQT3WT_NONE , widget ) , TQStyle : : SC_ListView , TQStyle : : SC_All , listViewItemOpt ) ;
# endif
}
else {
DEBUG_FILL_BACKGROUND_WITH_COLOR ( p , 255 , 64 , 64 ) ;
printf ( " [WARNING] tdegtk_draw_cell_background() nonfunctional for widget with path '%s' \n \r " , gtk_widget_path_to_string ( gtk_theming_engine_get_path ( engine ) ) ) ; fflush ( stdout ) ;
}
# endif
p . end ( ) ;
}
@ -1294,6 +1295,7 @@ tdegtk_draw_common (DRAW_ARGS)
TQPainter p ( & pd ) ;
DEBUG_FILL_BACKGROUND_WITH_COLOR ( p , 0 , 255 , 255 ) ;
printf ( " [WARNING] tdegtk_draw_common() nonfunctional for widget with path '%s' \n \r " , gtk_widget_path_to_string ( gtk_theming_engine_get_path ( engine ) ) ) ; fflush ( stdout ) ;
GtkStateFlags state ;
state = gtk_theming_engine_get_state ( engine ) ;
@ -1632,8 +1634,11 @@ tdegtk_draw_common_background (DRAW_ARGS)
// 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 ) )
else if ( gtk_theming_engine_has_class ( engine , GTK_STYLE_CLASS_BACKGROUND ) ) {
// Do nothing
}
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 ) )
| | ( gtk_widget_path_is_type ( path , GTK_TYPE_SCROLLED_WINDOW ) )
@ -1890,7 +1895,6 @@ tdegtk_draw_common_frame (DRAW_ARGS)
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 ) )
| | ( Gtk : : gtk_widget_path_has_type ( path , GTK_TYPE_BOX ) )
| | ( Gtk : : gtk_widget_path_has_type ( path , GTK_TYPE_VIEWPORT ) )
| | ( Gtk : : gtk_widget_path_has_type ( path , GTK_TYPE_SCROLLED_WINDOW ) )
| | ( Gtk : : gtk_widget_path_has_type ( path , GTK_TYPE_PANED ) )
@ -1912,6 +1916,25 @@ tdegtk_draw_common_frame (DRAW_ARGS)
static void
tdegtk_draw_expander ( DRAW_ARGS )
{
#if 0
// FIXME
TQRect boundingRect ( 0 , 0 , width , height ) ;
TQt3CairoPaintDevice pd ( NULL , x , y , width , height , cr ) ;
TQPainter p ( & pd ) ;
const GtkWidgetPath * path ;
GtkStateFlags state ;
GtkWidget * widget ;
path = gtk_theming_engine_get_path ( engine ) ;
state = gtk_theming_engine_get_state ( engine ) ;
widget = m_widgetLookup . find ( cr , path ) ;
DEBUG_FILL_BACKGROUND_WITH_COLOR ( p , 255 , 255 , 0 ) ;
printf ( " [WARNING] tdegtk_draw_expander() nonfunctional for widget with path '%s' \n \r " , gtk_widget_path_to_string ( gtk_theming_engine_get_path ( engine ) ) ) ; fflush ( stdout ) ;
p . end ( ) ;
# else
GtkStateFlags state ;
GdkRGBA color ;
gint size ;
@ -1950,6 +1973,7 @@ tdegtk_draw_expander (DRAW_ARGS)
cairo_stroke ( cr ) ;
cairo_restore ( cr ) ;
# endif
}
static void