Bugzilla – Attachment 187976 Details for
Bug 310710
cropped gnome-main-menu icon and label
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
gtk2-bnc310710-underallocated-gtklabel-position.diff
gtk2-bnc310710-underallocated-gtklabel-position.diff (text/plain), 1.37 KB, created by
Federico Mena Quintero
on 2007-12-18 02:40:58 UTC
(
hide
)
Description:
gtk2-bnc310710-underallocated-gtklabel-position.diff
Filename:
MIME Type:
Creator:
Federico Mena Quintero
Created:
2007-12-18 02:40:58 UTC
Size:
1.37 KB
patch
obsolete
>2007-12-17 Federico Mena Quintero <federico@novell.com> > > * gtk/gtklabel.c (get_layout_location): For single-line labels, > align the requisition to the allocation unconditionally, even if > we are under-allocated. For multi-line labels, try to show the > top of the text as before. Fixes > https://bugzilla.novell.com/show_bug.cgi?id=310710 > >diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c >index cd6c5ac..6e38a7d 100644 >--- a/gtk/gtklabel.c >+++ b/gtk/gtklabel.c >@@ -2362,9 +2362,17 @@ get_layout_location (GtkLabel *label, > else > x = MIN (x, widget->allocation.x + widget->allocation.width - misc->xpad); > >- y = floor (widget->allocation.y + (gint)misc->ypad >- + MAX (((widget->allocation.height - widget->requisition.height) * misc->yalign), >- 0)); >+ /* For single-line labels, *do* align the requisition with respect to the allocation, even >+ * if we are under-allocated. For multi-line labels, always show the top of the text when >+ * they are under-allocated. >+ */ >+ if (pango_layout_get_line_count (label->layout) == 1) >+ y = floor (widget->allocation.y + (gint)misc->ypad >+ + (widget->allocation.height - widget->requisition.height) * misc->yalign); >+ else >+ y = floor (widget->allocation.y + (gint)misc->ypad >+ + MAX (((widget->allocation.height - widget->requisition.height) * misc->yalign), >+ 0)); > > if (xp) > *xp = x;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 310710
:
164151
| 187976 |
188166
|
190321