|
Lines 2362-2370
get_layout_location (GtkLabel *label,
Link Here
|
| 2362 |
else |
2362 |
else |
| 2363 |
x = MIN (x, widget->allocation.x + widget->allocation.width - misc->xpad); |
2363 |
x = MIN (x, widget->allocation.x + widget->allocation.width - misc->xpad); |
| 2364 |
|
2364 |
|
| 2365 |
y = floor (widget->allocation.y + (gint)misc->ypad |
2365 |
/* For single-line labels, *do* align the requisition with respect to the allocation, even |
| 2366 |
+ MAX (((widget->allocation.height - widget->requisition.height) * misc->yalign), |
2366 |
* if we are under-allocated. For multi-line labels, always show the top of the text when |
| 2367 |
0)); |
2367 |
* they are under-allocated. |
|
|
2368 |
*/ |
| 2369 |
if (pango_layout_get_line_count (label->layout) == 1) |
| 2370 |
y = floor (widget->allocation.y + (gint)misc->ypad |
| 2371 |
+ (widget->allocation.height - widget->requisition.height) * misc->yalign); |
| 2372 |
else |
| 2373 |
y = floor (widget->allocation.y + (gint)misc->ypad |
| 2374 |
+ MAX (((widget->allocation.height - widget->requisition.height) * misc->yalign), |
| 2375 |
0)); |
| 2368 |
|
2376 |
|
| 2369 |
if (xp) |
2377 |
if (xp) |
| 2370 |
*xp = x; |
2378 |
*xp = x; |