Patch from Soeren Sandmann to improve GtkLabel behavior when it gets a too

Mon Aug  5 17:20:45 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtklabel.c: Patch from Soeren Sandmann
        to improve GtkLabel behavior when it gets
        a too small allocation. (Always display the
        initial portion.) (#71742)
This commit is contained in:
Owen Taylor 2002-08-05 21:22:22 +00:00 committed by Owen Taylor
parent e1826de7e7
commit 9eb97b045c
7 changed files with 56 additions and 8 deletions

View File

@ -1,3 +1,10 @@
Mon Aug 5 17:20:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c: Patch from Soeren Sandmann
to improve GtkLabel behavior when it gets
a too small allocation. (Always display the
initial portion.) (#71742)
Mon Aug 5 17:01:30 2002 Owen Taylor <otaylor@redhat.com>
* gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,

View File

@ -1,3 +1,10 @@
Mon Aug 5 17:20:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c: Patch from Soeren Sandmann
to improve GtkLabel behavior when it gets
a too small allocation. (Always display the
initial portion.) (#71742)
Mon Aug 5 17:01:30 2002 Owen Taylor <otaylor@redhat.com>
* gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,

View File

@ -1,3 +1,10 @@
Mon Aug 5 17:20:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c: Patch from Soeren Sandmann
to improve GtkLabel behavior when it gets
a too small allocation. (Always display the
initial portion.) (#71742)
Mon Aug 5 17:01:30 2002 Owen Taylor <otaylor@redhat.com>
* gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,

View File

@ -1,3 +1,10 @@
Mon Aug 5 17:20:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c: Patch from Soeren Sandmann
to improve GtkLabel behavior when it gets
a too small allocation. (Always display the
initial portion.) (#71742)
Mon Aug 5 17:01:30 2002 Owen Taylor <otaylor@redhat.com>
* gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,

View File

@ -1,3 +1,10 @@
Mon Aug 5 17:20:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c: Patch from Soeren Sandmann
to improve GtkLabel behavior when it gets
a too small allocation. (Always display the
initial portion.) (#71742)
Mon Aug 5 17:01:30 2002 Owen Taylor <otaylor@redhat.com>
* gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,

View File

@ -1,3 +1,10 @@
Mon Aug 5 17:20:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c: Patch from Soeren Sandmann
to improve GtkLabel behavior when it gets
a too small allocation. (Always display the
initial portion.) (#71742)
Mon Aug 5 17:01:30 2002 Owen Taylor <otaylor@redhat.com>
* gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,

View File

@ -1648,15 +1648,21 @@ get_layout_location (GtkLabel *label,
xalign = misc->xalign;
else
xalign = 1.0 - misc->xalign;
x = floor (widget->allocation.x + (gint)misc->xpad
+ ((widget->allocation.width - widget->requisition.width) * xalign)
+ 0.5);
x = floor (widget->allocation.x + (gint)misc->xpad +
xalign * (widget->allocation.width - widget->requisition.width)
+ 0.5);
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
x = MAX (x, widget->allocation.x + misc->xpad);
else
x = MIN (x,
widget->allocation.x + widget->allocation.width -
widget->requisition.width - misc->xpad);
y = floor (widget->allocation.y + (gint)misc->ypad
+ ((widget->allocation.height - widget->requisition.height) * misc->yalign)
+ 0.5);
+ MAX (((widget->allocation.height - widget->requisition.height) * misc->yalign)
+ 0.5, 0));
if (xp)
*xp = x;