GNOME Bugzilla – Bug 553585
Add orientation API to GtkRuler
Last modified: 2010-07-10 03:50:19 UTC
See bug #541009. Here are the patches for GtkRuler, GtkHRuler and GtkVRuler.
Created attachment 119302 [details] [review] Patch implementing the above Add orientation API to GtkRuler, move all of GtkHRuler's and GtkVRuler's code to GtkRuler. Will do deprecations in separate commits because they imply lots of related changes.
+ text_width = strlen (unit_str) * digit_height + 1; Shouldn't this be digit_width ?
There is a comment in the code explaining why we use digit_height here (the text layout should look the same for a hruler that comes with a vruler in the same window).
ok then
Committed a modified patch which uses the new GtkOrientable API. Leaving the bug open since deprecation needs to be discussed. 2008-10-02 Michael Natterer <mitch@imendio.com> Bug 553585 – Add orientation API to GtkRuler * gtk/gtkruler.[ch]: implement the GtkOrientable interface and swallow all code from GtkHRuler and GtkVRuler. Add gtk_ruler_new() which takes a GtkOrientation argument. * gtk/gtkhruler.c * gtk/gtkvruler.c: remove all code except the constructor and call gtk_orientable_set_orientation() in init(). * gtk/gtk.symbols: add gtk_ruler_new().
Closing