r3010 - in trunk/src/target/OM-2007.2/libraries/libmokoui2: . libmokoui
chris at sita.openmoko.org
chris at sita.openmoko.org
Wed Sep 19 11:47:50 CEST 2007
Author: chris
Date: 2007-09-19 11:47:48 +0200 (Wed, 19 Sep 2007)
New Revision: 3010
Modified:
trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog
trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-finger-scroll.c
Log:
* libmokoui/moko-finger-scroll.c: (moko_finger_scroll_refresh):
Take the border-width property of the container into account when
calculating if scroll-indicators should be visible
Modified: trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog 2007-09-19 08:56:18 UTC (rev 3009)
+++ trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog 2007-09-19 09:47:48 UTC (rev 3010)
@@ -1,3 +1,9 @@
+2007-09-19 Chris Lord <chris at openedhand.com>
+
+ * libmokoui/moko-finger-scroll.c: (moko_finger_scroll_refresh):
+ Take the border-width property of the container into account when
+ calculating if scroll-indicators should be visible
+
2007-09-17 Thomas Wood <thomas at openedhand.com>
* configure.ac:
Modified: trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-finger-scroll.c
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-finger-scroll.c 2007-09-19 08:56:18 UTC (rev 3009)
+++ trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-finger-scroll.c 2007-09-19 09:47:48 UTC (rev 3010)
@@ -119,14 +119,16 @@
GtkWidget *widget = GTK_BIN (priv->align)->child;
gboolean vscroll, hscroll;
GtkRequisition req;
+ guint border;
if (!widget) return;
- /* Calculate if we need scroll indicators */
+ /* Calculate if we need scroll indicators */
+ border = gtk_container_get_border_width (GTK_CONTAINER (scroll));
gtk_widget_size_request (widget, &req);
- if (req.width > allocation->width) hscroll = TRUE;
+ if (req.width + (border * 2) > allocation->width) hscroll = TRUE;
else hscroll = FALSE;
- if (req.height > allocation->height) vscroll = TRUE;
+ if (req.height + (border * 2) > allocation->height) vscroll = TRUE;
else vscroll = FALSE;
/* TODO: Read ltr settings to decide which corner gets scroll
More information about the commitlog
mailing list