]> Pileus Git - ~andy/gtk/commitdiff
Merge from stable.
authorKristian Rietveld <kris@gtk.org>
Wed, 20 Aug 2003 23:47:19 +0000 (23:47 +0000)
committerKristian Rietveld <kristian@src.gnome.org>
Wed, 20 Aug 2003 23:47:19 +0000 (23:47 +0000)
Thu Aug 21 01:33:51 2003  Kristian Rietveld  <kris@gtk.org>

Merge from stable.

* gtk/gtkspinbutton.c (gtk_spin_button_size_request): always round
approximate digit widths up, to avoid truncation, convert to
pango pixels when we have the full string width instead of converting
the approx digit width to pango pixels, take inner border and
interior focus into account correctly. (Fixes #116368, patch from
Morten Welinder).

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkspinbutton.c

index fa0adb6d28dcb102eae8e5a203ac0a8854ef7a0a..5f58d8f8f2f2aa8f3af4e3421f86869847d1083d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Thu Aug 21 01:33:51 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Merge from stable.
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_size_request): always round
+       approximate digit widths up, to avoid truncation, convert to
+       pango pixels when we have the full string width instead of converting
+       the approx digit width to pango pixels, take inner border and
+       interior focus into account correctly. (Fixes #116368, patch from
+       Morten Welinder).
+
 2003-08-20  Noah Levitt  <nlevitt@columbia.edu>
 
        * gtk/queryimmodules.c: Don't look at the same directory twice (in
index fa0adb6d28dcb102eae8e5a203ac0a8854ef7a0a..5f58d8f8f2f2aa8f3af4e3421f86869847d1083d 100644 (file)
@@ -1,3 +1,14 @@
+Thu Aug 21 01:33:51 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Merge from stable.
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_size_request): always round
+       approximate digit widths up, to avoid truncation, convert to
+       pango pixels when we have the full string width instead of converting
+       the approx digit width to pango pixels, take inner border and
+       interior focus into account correctly. (Fixes #116368, patch from
+       Morten Welinder).
+
 2003-08-20  Noah Levitt  <nlevitt@columbia.edu>
 
        * gtk/queryimmodules.c: Don't look at the same directory twice (in
index fa0adb6d28dcb102eae8e5a203ac0a8854ef7a0a..5f58d8f8f2f2aa8f3af4e3421f86869847d1083d 100644 (file)
@@ -1,3 +1,14 @@
+Thu Aug 21 01:33:51 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Merge from stable.
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_size_request): always round
+       approximate digit widths up, to avoid truncation, convert to
+       pango pixels when we have the full string width instead of converting
+       the approx digit width to pango pixels, take inner border and
+       interior focus into account correctly. (Fixes #116368, patch from
+       Morten Welinder).
+
 2003-08-20  Noah Levitt  <nlevitt@columbia.edu>
 
        * gtk/queryimmodules.c: Don't look at the same directory twice (in
index fa0adb6d28dcb102eae8e5a203ac0a8854ef7a0a..5f58d8f8f2f2aa8f3af4e3421f86869847d1083d 100644 (file)
@@ -1,3 +1,14 @@
+Thu Aug 21 01:33:51 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Merge from stable.
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_size_request): always round
+       approximate digit widths up, to avoid truncation, convert to
+       pango pixels when we have the full string width instead of converting
+       the approx digit width to pango pixels, take inner border and
+       interior focus into account correctly. (Fixes #116368, patch from
+       Morten Welinder).
+
 2003-08-20  Noah Levitt  <nlevitt@columbia.edu>
 
        * gtk/queryimmodules.c: Don't look at the same directory twice (in
index fa0adb6d28dcb102eae8e5a203ac0a8854ef7a0a..5f58d8f8f2f2aa8f3af4e3421f86869847d1083d 100644 (file)
@@ -1,3 +1,14 @@
+Thu Aug 21 01:33:51 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Merge from stable.
+
+       * gtk/gtkspinbutton.c (gtk_spin_button_size_request): always round
+       approximate digit widths up, to avoid truncation, convert to
+       pango pixels when we have the full string width instead of converting
+       the approx digit width to pango pixels, take inner border and
+       interior focus into account correctly. (Fixes #116368, patch from
+       Morten Welinder).
+
 2003-08-20  Noah Levitt  <nlevitt@columbia.edu>
 
        * gtk/queryimmodules.c: Don't look at the same directory twice (in
index 67de310d10f1551e9486da7246694897ef4b46bd..cf4565ecf543ffdc1acac0ab0641dfd0e4cbd48a 100644 (file)
@@ -652,7 +652,8 @@ gtk_spin_button_size_request (GtkWidget      *widget,
                                           pango_context_get_language (context));
 
       digit_width = pango_font_metrics_get_approximate_digit_width (metrics);
-      digit_width = PANGO_PIXELS (digit_width);
+      digit_width = PANGO_SCALE *
+        ((digit_width + PANGO_SCALE - 1) / PANGO_SCALE);
 
       pango_font_metrics_unref (metrics);
       
@@ -664,15 +665,15 @@ gtk_spin_button_size_request (GtkWidget      *widget,
 
       string_len = compute_double_length (spin_button->adjustment->upper,
                                           spin_button->digits);
-      w = MIN (string_len, max_string_len) * digit_width;
+      w = PANGO_PIXELS (MIN (string_len, max_string_len) * digit_width);
       width = MAX (width, w);
       string_len = compute_double_length (spin_button->adjustment->lower,
                                          spin_button->digits);
-      w = MIN (string_len, max_string_len) * digit_width;
+      w = PANGO_PIXELS (MIN (string_len, max_string_len) * digit_width);
       width = MAX (width, w);
       
-      requisition->width = width;
-      if (interior_focus)
+      requisition->width = width + /* INNER_BORDER */ 2 * 2;
+      if (!interior_focus)
        requisition->width += 2 * focus_width;
     }