diff --git a/ChangeLog b/ChangeLog index 3feb3feba3..ed8392448a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-05-07 Matthias Clasen + * gtk/gtkbutton.c (gtk_button_size_allocate): Don't let the child + draw over the focus rectangle. + * gtk/gtkhsv.c: Draw focus indication in the color wheel using standard focus style. (#63071, Bill Haneman, idea for new style by Owen Taylor) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 3feb3feba3..ed8392448a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,8 @@ 2004-05-07 Matthias Clasen + * gtk/gtkbutton.c (gtk_button_size_allocate): Don't let the child + draw over the focus rectangle. + * gtk/gtkhsv.c: Draw focus indication in the color wheel using standard focus style. (#63071, Bill Haneman, idea for new style by Owen Taylor) diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 3feb3feba3..ed8392448a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,8 @@ 2004-05-07 Matthias Clasen + * gtk/gtkbutton.c (gtk_button_size_allocate): Don't let the child + draw over the focus rectangle. + * gtk/gtkhsv.c: Draw focus indication in the color wheel using standard focus style. (#63071, Bill Haneman, idea for new style by Owen Taylor) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 3feb3feba3..ed8392448a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,8 @@ 2004-05-07 Matthias Clasen + * gtk/gtkbutton.c (gtk_button_size_allocate): Don't let the child + draw over the focus rectangle. + * gtk/gtkhsv.c: Draw focus indication in the color wheel using standard focus style. (#63071, Bill Haneman, idea for new style by Owen Taylor) diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index d1c7c16104..f60fb6820b 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -930,8 +930,15 @@ gtk_button_size_allocate (GtkWidget *widget, gint xthickness = GTK_WIDGET (widget)->style->xthickness; gint ythickness = GTK_WIDGET (widget)->style->ythickness; GtkBorder default_border; + gint focus_width; + gint focus_pad; gtk_button_get_props (button, &default_border, NULL, NULL); + gtk_widget_style_get (GTK_WIDGET (widget), + "focus-line-width", &focus_width, + "focus-padding", &focus_pad, + NULL); + widget->allocation = *allocation; @@ -960,6 +967,11 @@ gtk_button_size_allocate (GtkWidget *widget, child_allocation.height = MAX (1, child_allocation.height - default_border.top - default_border.bottom); } + child_allocation.x += focus_width + focus_pad; + child_allocation.y += focus_width + focus_pad; + child_allocation.width = MAX (1, child_allocation.width - (focus_width + focus_pad) * 2); + child_allocation.height = MAX (1, child_allocation.height - (focus_width + focus_pad) * 2); + if (button->depressed) { gint child_displacement_x;