summaryrefslogtreecommitdiff
path: root/gtk/gtkadjustment.c
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2008-08-11 21:07:36 +0000
committerMichael Natterer <mitch@src.gnome.org>2008-08-11 21:07:36 +0000
commit74bc87842f0c8c6874ddcc547d86644583e6a2cd (patch)
treee0acc1896ace436647c9ad5b7f8960db340f7867 /gtk/gtkadjustment.c
parent6f789132c529933f76b84b9de1d137bda6dd90f1 (diff)
downloadgtk+-74bc87842f0c8c6874ddcc547d86644583e6a2cd.tar.gz
Bug 546754 – 2.13.6 update create rendering issue in the evolution
2008-08-11 Michael Natterer <mitch@imendio.com> Bug 546754 – 2.13.6 update create rendering issue in the evolution composer * gtk/gtkadjustment.c: instead of CLAMP(), use value = MIN (value, upper - page_size); value = MAX (value, lower); so we don't end up below lower if upper - page_size is smaller than lower. svn path=/trunk/; revision=21080
Diffstat (limited to 'gtk/gtkadjustment.c')
-rw-r--r--gtk/gtkadjustment.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk/gtkadjustment.c b/gtk/gtkadjustment.c
index 16e76ede8e..dd1b3f609d 100644
--- a/gtk/gtkadjustment.c
+++ b/gtk/gtkadjustment.c
@@ -359,7 +359,11 @@ gtk_adjustment_set_value (GtkAdjustment *adjustment,
{
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
- value = CLAMP (value, adjustment->lower, adjustment->upper - adjustment->page_size);
+ /* don't use CLAMP() so we don't end up below lower if upper - page_size
+ * is smaller than lower
+ */
+ value = MIN (value, adjustment->upper - adjustment->page_size);
+ value = MAX (value, adjustment->lower);
if (value != adjustment->value)
{
@@ -628,7 +632,11 @@ gtk_adjustment_configure (GtkAdjustment *adjustment,
"page-size", page_size,
NULL);
- value = CLAMP (value, lower, upper - page_size);
+ /* don't use CLAMP() so we don't end up below lower if upper - page_size
+ * is smaller than lower
+ */
+ value = MIN (value, upper - page_size);
+ value = MAX (value, lower);
if (value != adjustment->value)
{