]> Pileus Git - ~andy/gtk/commit
bgo#315462 - Make GtkLabel deal with too-small height allocations gracefully
authorFederico Mena Quintero <federico@novell.com>
Wed, 13 May 2009 00:12:55 +0000 (19:12 -0500)
committerFederico Mena Quintero <federico@novell.com>
Wed, 13 May 2009 00:12:55 +0000 (19:12 -0500)
commit67e0a44100a288fd3374f932ba976c64e744474f
treef03c8c6078ad68a12003226a42f641e8291a43ea
parente2bce0d630c6f424664e81ee95352c4cbc41fc27
bgo#315462 - Make GtkLabel deal with too-small height allocations gracefully

Previously we would always align the top of the text with the label's allocation-plus-padding.
However, this makes a single-line label inside a GtkButton look badly clipped when the button
has a smaller allocation than its requisition.  So, for single-line labels we respect the
alignment even if it doesn't fit within the label's allocation.  But for multi-line labels, we
give preference to showing the first line, to give the user some context.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
gtk/gtklabel.c