diff options
author | Owen Taylor <owt1@cornell.edu> | 1998-04-06 12:59:06 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-04-06 12:59:06 +0000 |
commit | 0f9fe897271c008339b2d3e79a9dc7d0d71d26f9 (patch) | |
tree | 9cc3b5f398da7309b2491db1032ac40bd177c872 /gtk/gtkbutton.c | |
parent | d7aa6a88fbe1a06517f035bb84983a926a490674 (diff) | |
download | gdk-pixbuf-0f9fe897271c008339b2d3e79a9dc7d0d71d26f9.tar.gz |
Take border in account properly.
Mon Apr 6 08:05:23 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkbutton.c (gtk_button_paint): Take border in
account properly.
* gtk/gtktext.c (gtk_text_realize): Don't recompute
geometry when creating with initial 1x1 geometry,
since our calculations can't handle that. Leave
text->line_start_cache NULL as sign we don't have
a real geometry yet.
* gtk/gtkentry.c (gtk_entry_motion_notify): Use the x
value we get from gdk_window_get_pointer, not from
event->x - since we always specify OwnerGrabButtonMask
(why???), event->x can refer to another window.
Diffstat (limited to 'gtk/gtkbutton.c')
-rw-r--r-- | gtk/gtkbutton.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 5ded0987b..884a5a824 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -454,12 +454,12 @@ gtk_button_paint (GtkWidget *widget, if (GTK_WIDGET_DRAWABLE (widget)) { - restrict_area.x = (GTK_WIDGET (widget)->style->klass->xthickness + - GTK_CONTAINER (widget)->border_width); - restrict_area.y = (GTK_WIDGET (widget)->style->klass->ythickness + - GTK_CONTAINER (widget)->border_width); - restrict_area.width = GTK_WIDGET (widget)->allocation.width - restrict_area.x * 2; - restrict_area.height = GTK_WIDGET (widget)->allocation.height - restrict_area.y * 2; + restrict_area.x = GTK_WIDGET (widget)->style->klass->xthickness; + restrict_area.y = GTK_WIDGET (widget)->style->klass->ythickness; + restrict_area.width = GTK_WIDGET (widget)->allocation.width - + restrict_area.x * 2 - GTK_CONTAINER (widget)->border_width * 2; + restrict_area.height = GTK_WIDGET (widget)->allocation.height - + restrict_area.y * 2 - GTK_CONTAINER (widget)->border_width * 2; if (GTK_WIDGET_CAN_DEFAULT (widget)) { |