]> Pileus Git - ~andy/gtk/commitdiff
Modify all of the GtkMisc widgets to round down on centering calculations
authorMatthias Clasen <mclasen@redhat.com>
Tue, 21 Jun 2005 15:38:40 +0000 (15:38 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 21 Jun 2005 15:38:40 +0000 (15:38 +0000)
2005-06-21  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkarrow.c:
* gtk/gtkimage.c:
* gtk/gtklabel.c:
* gtk/gtkpixmap.c: Modify all of the GtkMisc widgets to round down
on centering calculations to match the behaviour of other parts
of GTK+. (#307419, Ryan Lortie)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkarrow.c
gtk/gtkimage.c
gtk/gtklabel.c
gtk/gtkpixmap.c

index f0d8cb3ff503555c4270c8a0835cb25eff692a97..f379b8ba19d7ee34a9d70c232083277dda05241c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-06-21  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkarrow.c:
+       * gtk/gtkimage.c:
+       * gtk/gtklabel.c:
+       * gtk/gtkpixmap.c: Modify all of the GtkMisc widgets to round down
+       on centering calculations to match the behaviour of other parts
+       of GTK+. (#307419, Ryan Lortie)
+
 2005-06-21  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkdnd.c (gtk_drag_source_set): Connect to 
index f0d8cb3ff503555c4270c8a0835cb25eff692a97..f379b8ba19d7ee34a9d70c232083277dda05241c 100644 (file)
@@ -1,3 +1,12 @@
+2005-06-21  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkarrow.c:
+       * gtk/gtkimage.c:
+       * gtk/gtklabel.c:
+       * gtk/gtkpixmap.c: Modify all of the GtkMisc widgets to round down
+       on centering calculations to match the behaviour of other parts
+       of GTK+. (#307419, Ryan Lortie)
+
 2005-06-21  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkdnd.c (gtk_drag_source_set): Connect to 
index f0d8cb3ff503555c4270c8a0835cb25eff692a97..f379b8ba19d7ee34a9d70c232083277dda05241c 100644 (file)
@@ -1,3 +1,12 @@
+2005-06-21  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkarrow.c:
+       * gtk/gtkimage.c:
+       * gtk/gtklabel.c:
+       * gtk/gtkpixmap.c: Modify all of the GtkMisc widgets to round down
+       on centering calculations to match the behaviour of other parts
+       of GTK+. (#307419, Ryan Lortie)
+
 2005-06-21  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkdnd.c (gtk_drag_source_set): Connect to 
index f9568e481f3518cb3bc645c5897e3726cd228c4f..350b404124ccc01391b058364de9a619dc841c9a 100644 (file)
@@ -260,11 +260,9 @@ gtk_arrow_expose (GtkWidget      *widget,
        }
 
       x = floor (widget->allocation.x + misc->xpad
-                + ((widget->allocation.width - extent) * xalign)
-                + 0.5);
+                + ((widget->allocation.width - extent) * xalign));
       y = floor (widget->allocation.y + misc->ypad 
-                + ((widget->allocation.height - extent) * misc->yalign)
-                + 0.5);
+                + ((widget->allocation.height - extent) * misc->yalign));
       
       shadow_type = arrow->shadow_type;
 
index 40f196f29ed57113ce31d480afe161f71b0a61ba..9fabd8e4d7819b4c83da50f92fb8f4e81111b734 100644 (file)
@@ -1576,11 +1576,9 @@ gtk_image_expose (GtkWidget      *widget,
        xalign = 1.0 - misc->xalign;
   
       x = floor (widget->allocation.x + misc->xpad
-                + ((widget->allocation.width - widget->requisition.width) * xalign)
-                + 0.5);
+                + ((widget->allocation.width - widget->requisition.width) * xalign));
       y = floor (widget->allocation.y + misc->ypad 
-                + ((widget->allocation.height - widget->requisition.height) * misc->yalign)
-                + 0.5);
+                + ((widget->allocation.height - widget->requisition.height) * misc->yalign));
       mask_x = x;
       mask_y = y;
       
index 79e9fd89c7eec9ab47fa43f6431ae2953b9f0870..df890c9b8087921410904856c40b35dffd9e1b58 100644 (file)
@@ -2177,8 +2177,7 @@ get_layout_location (GtkLabel  *label,
     req_width = widget->requisition.width;
 
   x = floor (widget->allocation.x + (gint)misc->xpad +
-             xalign * (widget->allocation.width - req_width)
-             + 0.5);
+             xalign * (widget->allocation.width - req_width));
 
   if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
     x = MAX (x, widget->allocation.x + misc->xpad);
@@ -2188,8 +2187,8 @@ get_layout_location (GtkLabel  *label,
             req_width - misc->xpad);
 
   y = floor (widget->allocation.y + (gint)misc->ypad 
-             + MAX (((widget->allocation.height - widget->requisition.height) * misc->yalign)
-                   + 0.5, 0));
+             + MAX (((widget->allocation.height - widget->requisition.height) * misc->yalign),
+            0));
 
   if (xp)
     *xp = x;
index 63caf65d13a1b24f939885f0d1cb9e72345e8117..4768f77f7b96dba7a31773e5ba57e5fbe079a03d 100644 (file)
@@ -212,11 +212,9 @@ gtk_pixmap_expose (GtkWidget      *widget,
        xalign = 1.0 - misc->xalign;
   
       x = floor (widget->allocation.x + misc->xpad
-                + ((widget->allocation.width - widget->requisition.width) * xalign)
-                + 0.5);
+                + ((widget->allocation.width - widget->requisition.width) * xalign));
       y = floor (widget->allocation.y + misc->ypad 
-                + ((widget->allocation.height - widget->requisition.height) * misc->yalign)
-                + 0.5);
+                + ((widget->allocation.height - widget->requisition.height) * misc->yalign));
       
       if (pixmap->mask)
        {