Draw the focus around the arrow if there is no label widget. (#124045,

2007-03-07  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkexpander.c (gtk_expander_paint_focus): Draw the
        focus around the arrow if there is no label widget.
        (#124045, Cody Russell)



svn path=/trunk/; revision=17419
This commit is contained in:
Matthias Clasen 2007-03-07 21:34:43 +00:00 committed by Matthias Clasen
parent c0c2ac8e38
commit 9aad97770a
2 changed files with 39 additions and 20 deletions

View File

@ -1,3 +1,9 @@
2007-03-07 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkexpander.c (gtk_expander_paint_focus): Draw the
focus around the arrow if there is no label widget.
(#124045, Cody Russell)
2007-03-07 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombo.c: (gtk_combo_init):

View File

@ -789,6 +789,7 @@ gtk_expander_paint_focus (GtkExpander *expander,
{
GtkWidget *widget;
GtkExpanderPrivate *priv;
GdkRectangle rect;
gint x, y, width, height;
gboolean interior_focus;
gint border_width;
@ -815,7 +816,9 @@ gtk_expander_paint_focus (GtkExpander *expander,
width = height = 0;
if (priv->label_widget && GTK_WIDGET_VISIBLE (priv->label_widget))
if (priv->label_widget)
{
if (GTK_WIDGET_VISIBLE (priv->label_widget))
{
GtkAllocation label_allocation = priv->label_widget->allocation;
@ -845,6 +848,16 @@ gtk_expander_paint_focus (GtkExpander *expander,
width += expander_size + 2 * expander_spacing;
height = MAX (height, expander_size + 2 * expander_spacing);
}
}
else
{
get_expander_bounds (expander, &rect);
x = rect.x - focus_pad;
y = rect.y - focus_pad;
width = rect.width + 2 * focus_pad;
height = rect.height + 2 * focus_pad;
}
gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget),
area, widget, "expander",