diff options
author | Owen Taylor <otaylor@redhat.com> | 1999-01-27 18:21:20 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1999-01-27 18:21:20 +0000 |
commit | 14724626395882260fc73ae008a9df4fe7cbd877 (patch) | |
tree | d16769df30f0409e3faacd27a94b4a22a2be332d /gtk/testgtk.c | |
parent | 90c7ea0b9138bb94bef9b01f37c7d3faffcbc6b7 (diff) | |
download | gdk-pixbuf-14724626395882260fc73ae008a9df4fe7cbd877.tar.gz |
Use floor() instead of truncating to integer values so we get translation
Wed Jan 20 11:19:00 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c: Use floor() instead of truncating
to integer values so we get translation invariance.
* gtk/gtklayout.c (gtk_layout_size_allocate): Set upper
and lower values for adjustments in size_allocate().
* gdk/gdkwindow.c gdk/gdk.h gdk/gdkprivate.h: New
function gdk_window_set_static_gravities() to set
up a window for guffaw scrolling.
* gdk/gdkwindow.c (gdk_window_internal_destroy): Set flags
indicating destroyed state before cleanup.
* gtk/gtkprivate.h gtk/gtkwidget.c: Add a new
private flag IS_OFFSCREEN. If set, this indicates
to GTK+ that the widget is not to be considered
viewable regardless of its map state. Queued draws
on offscreen widgets are suppressed.
Added new function static gtk_widget_is_offscreen() to
check this flag on a widget and its ancestors.
* gtk/gtklayout.[ch]: Major revisions.
- Use gdk_window_set_static_gravities to set static gravity
on all child windows, and thus avoid having to create a window
for NO_WINDOW children.
- Adjust allocations of children as we scroll them
so queued draws work correctly.
- Don't allocate our children directly in a put()
or move(); just queue a resize() like every other
widget.
* gtk/testgtk.c: Make the arrows on the scrollbars
work, create a larger and more demanding test.
Diffstat (limited to 'gtk/testgtk.c')
-rw-r--r-- | gtk/testgtk.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk/testgtk.c b/gtk/testgtk.c index 2c14f8079..d76e0666a 100644 --- a/gtk/testgtk.c +++ b/gtk/testgtk.c @@ -8284,12 +8284,18 @@ void create_layout (void) layout = gtk_layout_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (scrolledwindow), layout); + + /* We set step sizes here since GtkLayout does not set + * them itself. + */ + GTK_LAYOUT (layout)->hadjustment->step_increment = 10.0; + GTK_LAYOUT (layout)->vadjustment->step_increment = 10.0; gtk_widget_set_events (layout, GDK_EXPOSURE_MASK); gtk_signal_connect (GTK_OBJECT (layout), "expose_event", GTK_SIGNAL_FUNC (layout_expose_handler), NULL); - gtk_layout_set_size (GTK_LAYOUT (layout), 1600, 64000); + gtk_layout_set_size (GTK_LAYOUT (layout), 1600, 128000); for (i=0 ; i < 16 ; i++) for (j=0 ; j < 16 ; j++) @@ -8304,7 +8310,7 @@ void create_layout (void) j*100, i*100); } - for (i=16; i < 640; i++) + for (i=16; i < 1280; i++) { sprintf(buf, "Button %d, %d", i, 0); if (i % 2) |