From 0014b99626818f82389cc2b824eb334c232bcb50 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Thu, 16 Apr 2009 21:06:31 +0800 Subject: [PATCH] Improve the style handling of the column/row title buttons. It seems that the style of the button wasn't `attached' before it was used. Further, use of the "buttondefault" detail on gtk_paint_box made wierd looking buttons with some themes. I don't pretend to fully understand all this, but these changes seem to be an improvement. --- lib/gtk-contrib/psppire-sheet.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/gtk-contrib/psppire-sheet.c b/lib/gtk-contrib/psppire-sheet.c index 3db8fd5b..bb99d1e3 100644 --- a/lib/gtk-contrib/psppire-sheet.c +++ b/lib/gtk-contrib/psppire-sheet.c @@ -1981,6 +1981,9 @@ psppire_sheet_realize (GtkWidget *widget) gtk_widget_set_parent_window (sheet->button, sheet->sheet_window); gtk_widget_set_parent (sheet->button, GTK_WIDGET (sheet)); + sheet->button->style = gtk_style_attach (sheet->button->style, + sheet->sheet_window); + sheet->cursor_drag = gdk_cursor_new_for_display (display, GDK_PLUS); @@ -4796,8 +4799,9 @@ draw_button (PsppireSheet *sheet, GdkWindow *window, gtk_paint_box (sheet->button->style, window, GTK_STATE_NORMAL, GTK_SHADOW_OUT, - &allocation, GTK_WIDGET (sheet->button), - "buttondefault", + &allocation, + GTK_WIDGET (sheet->button), + NULL, allocation.x, allocation.y, allocation.width, allocation.height); @@ -4813,7 +4817,7 @@ draw_button (PsppireSheet *sheet, GdkWindow *window, gtk_paint_box (sheet->button->style, window, button->state, shadow_type, &allocation, GTK_WIDGET (sheet->button), - "button", + NULL, allocation.x, allocation.y, allocation.width, allocation.height); @@ -4831,7 +4835,7 @@ draw_button (PsppireSheet *sheet, GdkWindow *window, shadow_type, NULL, GTK_WIDGET (sheet), - "button", + NULL, points, 2, TRUE); -- 2.30.2