UI: Fix text padding for labels without an icon.
In the screenshots below, first old then new.
Differential D6925
UI: Fix text padding for labels without an icon Authored by Yevgeny Makarov (jenkm) on Feb 24 2020, 8:57 PM.
Details UI: Fix text padding for labels without an icon. In the screenshots below, first old then new.
Diff Detail
Event TimelineComment Actions Makes sense, and looks good in all the places I could find. I am a little worried that there might be cases where this breaks layouts or causes unexpected issues, but couldn't immediately ses any issues. Comment Actions I'd love to have this alignment issue fixed, but I remain a bit leery and suspicious about the text_padding being divided by two. Do we know where the extra comes from? I'd feel better if we were subtracting a value related to some other value, or even a constant scaled by widget_unit. Or if it is doubled somewhere (and therefore makes sense to half it here) then I'd like to see a comment explaining that. However, if this fixes it yet the exact reason is (so far) unknown - I know how hard these things are to track down - then I'd still like a comment explaining such and maybe with a "TODO" comment as well. Comment Actions @Harley Acheson (harley) If you set text_padding to zero, you can easily see what this padding does. It is located in the widget_draw_text_icon function. This padding already depends on U.widget_unit, so just dividing by two should work well. Found the related patch: D4503. |