Chain up before drawing the scale values so that the number is drawn in

Tue Feb 26 19:32:42 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtk[hv]vscale.c (gtk_[hv]scale_expose): Chain
        up before drawing the scale values so that the number
        is drawn in the right place instead of one step
        back. (#61743, patch from Satyajit Kanungo)
This commit is contained in:
Owen Taylor 2002-02-27 00:37:35 +00:00 committed by Owen Taylor
parent fad2f1f37f
commit 2b33da526b
9 changed files with 65 additions and 4 deletions

View File

@ -1,3 +1,10 @@
Tue Feb 26 19:32:42 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]vscale.c (gtk_[hv]scale_expose): Chain
up before drawing the scale values so that the number
is drawn in the right place instead of one step
back. (#61743, patch from Satyajit Kanungo)
Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com> Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/win32/gdkkeys-win32.c (gdk_keyval_name): * gdk/win32/gdkkeys-win32.c (gdk_keyval_name):

View File

@ -1,3 +1,10 @@
Tue Feb 26 19:32:42 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]vscale.c (gtk_[hv]scale_expose): Chain
up before drawing the scale values so that the number
is drawn in the right place instead of one step
back. (#61743, patch from Satyajit Kanungo)
Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com> Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/win32/gdkkeys-win32.c (gdk_keyval_name): * gdk/win32/gdkkeys-win32.c (gdk_keyval_name):

View File

@ -1,3 +1,10 @@
Tue Feb 26 19:32:42 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]vscale.c (gtk_[hv]scale_expose): Chain
up before drawing the scale values so that the number
is drawn in the right place instead of one step
back. (#61743, patch from Satyajit Kanungo)
Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com> Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/win32/gdkkeys-win32.c (gdk_keyval_name): * gdk/win32/gdkkeys-win32.c (gdk_keyval_name):

View File

@ -1,3 +1,10 @@
Tue Feb 26 19:32:42 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]vscale.c (gtk_[hv]scale_expose): Chain
up before drawing the scale values so that the number
is drawn in the right place instead of one step
back. (#61743, patch from Satyajit Kanungo)
Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com> Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/win32/gdkkeys-win32.c (gdk_keyval_name): * gdk/win32/gdkkeys-win32.c (gdk_keyval_name):

View File

@ -1,3 +1,10 @@
Tue Feb 26 19:32:42 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]vscale.c (gtk_[hv]scale_expose): Chain
up before drawing the scale values so that the number
is drawn in the right place instead of one step
back. (#61743, patch from Satyajit Kanungo)
Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com> Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/win32/gdkkeys-win32.c (gdk_keyval_name): * gdk/win32/gdkkeys-win32.c (gdk_keyval_name):

View File

@ -1,3 +1,10 @@
Tue Feb 26 19:32:42 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]vscale.c (gtk_[hv]scale_expose): Chain
up before drawing the scale values so that the number
is drawn in the right place instead of one step
back. (#61743, patch from Satyajit Kanungo)
Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com> Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/win32/gdkkeys-win32.c (gdk_keyval_name): * gdk/win32/gdkkeys-win32.c (gdk_keyval_name):

View File

@ -1,3 +1,10 @@
Tue Feb 26 19:32:42 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]vscale.c (gtk_[hv]scale_expose): Chain
up before drawing the scale values so that the number
is drawn in the right place instead of one step
back. (#61743, patch from Satyajit Kanungo)
Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com> Tue Feb 26 19:16:28 2002 Owen Taylor <otaylor@redhat.com>
* gdk/win32/gdkkeys-win32.c (gdk_keyval_name): * gdk/win32/gdkkeys-win32.c (gdk_keyval_name):

View File

@ -160,6 +160,12 @@ gtk_hscale_expose (GtkWidget *widget,
scale = GTK_SCALE (widget); scale = GTK_SCALE (widget);
hscale = GTK_HSCALE (widget); hscale = GTK_HSCALE (widget);
/* We need to chain up _first_ so the various geometry members of
* GtkRange struct are updated.
*/
if (GTK_WIDGET_CLASS (parent_class)->expose_event)
GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
if (scale->draw_value) if (scale->draw_value)
{ {
PangoLayout *layout; PangoLayout *layout;
@ -232,5 +238,5 @@ gtk_hscale_expose (GtkWidget *widget,
g_object_unref (G_OBJECT (layout)); g_object_unref (G_OBJECT (layout));
} }
return (* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event); return FALSE;
} }

View File

@ -162,6 +162,12 @@ gtk_vscale_expose (GtkWidget *widget,
scale = GTK_SCALE (widget); scale = GTK_SCALE (widget);
vscale = GTK_VSCALE (widget); vscale = GTK_VSCALE (widget);
/* We need to chain up _first_ so the various geometry members of
* GtkRange struct are updated.
*/
if (GTK_WIDGET_CLASS (parent_class)->expose_event)
GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
if (scale->draw_value) if (scale->draw_value)
{ {
PangoLayout *layout; PangoLayout *layout;
@ -232,5 +238,5 @@ gtk_vscale_expose (GtkWidget *widget,
g_object_unref (G_OBJECT (layout)); g_object_unref (G_OBJECT (layout));
} }
return (* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event); return FALSE;
} }