From 0f9fe897271c008339b2d3e79a9dc7d0d71d26f9 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Mon, 6 Apr 1998 12:59:06 +0000 Subject: Take border in account properly. Mon Apr 6 08:05:23 1998 Owen Taylor * 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. --- gtk/gtkbutton.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gtk/gtkbutton.c') 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)) { -- cgit v1.2.1