arrows in buttons



I've recently made several attempts at fixing a bug
where GtkButton allocates too much space for its child,
leading to the child drawing over the focus rectangle.
You can clearly see that bug in testtoolbar, if you put
the following into your .gtkrc-2.0:

style "default" {
   GtkWidget::interior-focus = 0
   GtkWidget::focus-line-width = 5
   GtkWidget::focus-padding = 5
} 
class "GtkWidget" style "default"                    

After fixing the size allocation bug, buttons in arrows
tend to end up with their minimum size of 11, instead of
15 = 11 + 2 * (focus width + focus padding). People seem
to be pretty sensitive to this, so I've tried to compensate
for this by bumping the minimum size of arrows up to 15. 

If you notice problems with arrows being larger than they
used to be due to this, please let us know. A simple fix
is to not rely on the minimal size of the arrow, but 
explicitly set the wanted size using 
gtk_widget_set_size_request().

Matthias






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]