Commit 33e64795 authored by Benjamin Otte's avatar Benjamin Otte

label: Compute label offset properly for wrapped justified labels

label offsets were computed wrong for wrapped or ellipsized labels that
were right- or center-justified and had excess space available.
parent 278260a3
......@@ -3949,12 +3949,7 @@ get_layout_location (GtkLabel *label,
gtk_widget_get_allocation (widget, &allocation);
x = floor (allocation.x + xpad + xalign * (allocation.width - req_width));
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
x = MAX (x, allocation.x + xpad);
else
x = MIN (x, allocation.x + allocation.width - xpad);
x = floor (allocation.x + xpad + xalign * (allocation.width - req_width) - logical.x);
/* bgo#315462 - For single-line labels, *do* align the requisition with
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment