app/commands.c app/layers_dialog.c behave like a widget: removed
2000-04-06 Michael Natterer <mitch@gimp.org> * app/commands.c * app/layers_dialog.c * app/resize.[ch]: behave like a widget: removed resize_widget_free() and call gtk_widget_destroy(resize->resize_shell) instead. * app/interface.c: s/0/FALSE/ * app/color_area.c * libgimp/gimpchainbutton.c: show the correct background also for engine driven themes. The chainbutton's lines still don't draw with the pixmap theme, which is probably a bug of the theme's draw_polygon method.
This commit is contained in:

committed by
Michael Natterer

parent
56f1372519
commit
61184c16c9
@ -53,7 +53,7 @@ static void gimp_chain_button_realize (GtkWidget *widget);
|
||||
static void gimp_chain_button_clicked_callback (GtkWidget *widget,
|
||||
GimpChainButton *gcb);
|
||||
static gint gimp_chain_button_draw_lines (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
GdkEventExpose *eevent,
|
||||
GimpChainButton *gcb);
|
||||
|
||||
static GtkTableClass *parent_class = NULL;
|
||||
@ -278,6 +278,14 @@ gimp_chain_button_realize (GtkWidget *widget)
|
||||
gtk_pixmap_set (GTK_PIXMAP (gcb->pixmap), gcb->chain, gcb->chain_mask);
|
||||
else
|
||||
gtk_pixmap_set (GTK_PIXMAP (gcb->pixmap), gcb->broken, gcb->broken_mask);
|
||||
|
||||
gtk_widget_realize (gcb->line1);
|
||||
gtk_style_set_background (widget->style, gcb->line1->window, GTK_STATE_NORMAL);
|
||||
gdk_window_set_back_pixmap (gcb->line1->window, NULL, TRUE);
|
||||
|
||||
gtk_widget_realize (gcb->line2);
|
||||
gtk_style_set_background (widget->style, gcb->line2->window, GTK_STATE_NORMAL);
|
||||
gdk_window_set_back_pixmap (gcb->line2->window, NULL, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -299,7 +307,7 @@ gimp_chain_button_clicked_callback (GtkWidget *widget,
|
||||
|
||||
static gint
|
||||
gimp_chain_button_draw_lines (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
GdkEventExpose *eevent,
|
||||
GimpChainButton *gcb)
|
||||
{
|
||||
GdkPoint points[3];
|
||||
@ -313,13 +321,6 @@ gimp_chain_button_draw_lines (GtkWidget *widget,
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_CHAIN_BUTTON (gcb), FALSE);
|
||||
|
||||
/*
|
||||
gdk_window_clear_area (widget->window,
|
||||
0, 0,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height);
|
||||
*/
|
||||
|
||||
points[0].x = widget->allocation.width / 2;
|
||||
points[0].y = widget->allocation.height / 2;
|
||||
|
||||
@ -371,13 +372,16 @@ gimp_chain_button_draw_lines (GtkWidget *widget,
|
||||
points[2] = buf;
|
||||
}
|
||||
|
||||
gtk_draw_polygon (widget->style,
|
||||
widget->window,
|
||||
GTK_STATE_NORMAL,
|
||||
shadow,
|
||||
points,
|
||||
3,
|
||||
FALSE);
|
||||
gtk_paint_polygon (widget->style,
|
||||
widget->window,
|
||||
GTK_STATE_NORMAL,
|
||||
shadow,
|
||||
&eevent->area,
|
||||
widget,
|
||||
"chainbutton",
|
||||
points,
|
||||
3,
|
||||
FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user