Modify all of the GtkMisc widgets to round down on centering calculations
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)
This commit is contained in:

committed by
Matthias Clasen

parent
50807a616b
commit
2ef6d354d1
@ -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>
|
2005-06-21 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkdnd.c (gtk_drag_source_set): Connect to
|
* gtk/gtkdnd.c (gtk_drag_source_set): Connect to
|
||||||
|
@ -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>
|
2005-06-21 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkdnd.c (gtk_drag_source_set): Connect to
|
* gtk/gtkdnd.c (gtk_drag_source_set): Connect to
|
||||||
|
@ -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>
|
2005-06-21 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkdnd.c (gtk_drag_source_set): Connect to
|
* gtk/gtkdnd.c (gtk_drag_source_set): Connect to
|
||||||
|
@ -260,11 +260,9 @@ gtk_arrow_expose (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
x = floor (widget->allocation.x + misc->xpad
|
x = floor (widget->allocation.x + misc->xpad
|
||||||
+ ((widget->allocation.width - extent) * xalign)
|
+ ((widget->allocation.width - extent) * xalign));
|
||||||
+ 0.5);
|
|
||||||
y = floor (widget->allocation.y + misc->ypad
|
y = floor (widget->allocation.y + misc->ypad
|
||||||
+ ((widget->allocation.height - extent) * misc->yalign)
|
+ ((widget->allocation.height - extent) * misc->yalign));
|
||||||
+ 0.5);
|
|
||||||
|
|
||||||
shadow_type = arrow->shadow_type;
|
shadow_type = arrow->shadow_type;
|
||||||
|
|
||||||
|
@ -1576,11 +1576,9 @@ gtk_image_expose (GtkWidget *widget,
|
|||||||
xalign = 1.0 - misc->xalign;
|
xalign = 1.0 - misc->xalign;
|
||||||
|
|
||||||
x = floor (widget->allocation.x + misc->xpad
|
x = floor (widget->allocation.x + misc->xpad
|
||||||
+ ((widget->allocation.width - widget->requisition.width) * xalign)
|
+ ((widget->allocation.width - widget->requisition.width) * xalign));
|
||||||
+ 0.5);
|
|
||||||
y = floor (widget->allocation.y + misc->ypad
|
y = floor (widget->allocation.y + misc->ypad
|
||||||
+ ((widget->allocation.height - widget->requisition.height) * misc->yalign)
|
+ ((widget->allocation.height - widget->requisition.height) * misc->yalign));
|
||||||
+ 0.5);
|
|
||||||
mask_x = x;
|
mask_x = x;
|
||||||
mask_y = y;
|
mask_y = y;
|
||||||
|
|
||||||
|
@ -2177,8 +2177,7 @@ get_layout_location (GtkLabel *label,
|
|||||||
req_width = widget->requisition.width;
|
req_width = widget->requisition.width;
|
||||||
|
|
||||||
x = floor (widget->allocation.x + (gint)misc->xpad +
|
x = floor (widget->allocation.x + (gint)misc->xpad +
|
||||||
xalign * (widget->allocation.width - req_width)
|
xalign * (widget->allocation.width - req_width));
|
||||||
+ 0.5);
|
|
||||||
|
|
||||||
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
|
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
|
||||||
x = MAX (x, widget->allocation.x + misc->xpad);
|
x = MAX (x, widget->allocation.x + misc->xpad);
|
||||||
@ -2188,8 +2187,8 @@ get_layout_location (GtkLabel *label,
|
|||||||
req_width - misc->xpad);
|
req_width - misc->xpad);
|
||||||
|
|
||||||
y = floor (widget->allocation.y + (gint)misc->ypad
|
y = floor (widget->allocation.y + (gint)misc->ypad
|
||||||
+ MAX (((widget->allocation.height - widget->requisition.height) * misc->yalign)
|
+ MAX (((widget->allocation.height - widget->requisition.height) * misc->yalign),
|
||||||
+ 0.5, 0));
|
0));
|
||||||
|
|
||||||
if (xp)
|
if (xp)
|
||||||
*xp = x;
|
*xp = x;
|
||||||
|
@ -212,11 +212,9 @@ gtk_pixmap_expose (GtkWidget *widget,
|
|||||||
xalign = 1.0 - misc->xalign;
|
xalign = 1.0 - misc->xalign;
|
||||||
|
|
||||||
x = floor (widget->allocation.x + misc->xpad
|
x = floor (widget->allocation.x + misc->xpad
|
||||||
+ ((widget->allocation.width - widget->requisition.width) * xalign)
|
+ ((widget->allocation.width - widget->requisition.width) * xalign));
|
||||||
+ 0.5);
|
|
||||||
y = floor (widget->allocation.y + misc->ypad
|
y = floor (widget->allocation.y + misc->ypad
|
||||||
+ ((widget->allocation.height - widget->requisition.height) * misc->yalign)
|
+ ((widget->allocation.height - widget->requisition.height) * misc->yalign));
|
||||||
+ 0.5);
|
|
||||||
|
|
||||||
if (pixmap->mask)
|
if (pixmap->mask)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user