Skip to content

Label: Avoid changing alignment on linecount changes

David Edmundson requested to merge work/d_ed/label_alignment into master

This was the cause of one of the binding loop warnings in DefaultToolTip. If text is wrapped and constrained it would change the alignment which would can cause size hints tochange.

This code dates from before layouts. Modern code would be in a layout that would align centre align the label within the layout rather than position within the label. It also comes from a time where implicitHeight was also based on the lineCount, something we removed years ago.

Leaving it to the caller to handle alignment seems safer than having text potentially jump based on the string length.

This is a behavioural change, and needs some QA though I haven't seen any issues.

Edited by David Edmundson

Merge request reports