[Bf-blender-cvs] [301fac5ded7] master: UI: Fix Label alignment in top bar
Yevgeny Makarov
noreply at git.blender.org
Sun Mar 13 22:39:02 CET 2022
Commit: 301fac5ded7de3ec8e43fa789a526c4d324f2e23
Author: Yevgeny Makarov
Date: Sun Mar 13 17:38:06 2022 -0400
Branches: master
https://developer.blender.org/rB301fac5ded7de3ec8e43fa789a526c4d324f2e23
UI: Fix Label alignment in top bar
Label alignment in top bar by using `ui_text_icon_width_ex` instead of `w_hint`
Old:
{F12733743}
New:
{F12733742}
Fixes T61558
Reviewed By: Severin
Maniphest Tasks: T61558
Differential Revision: https://developer.blender.org/D13552
===================================================================
M source/blender/editors/interface/interface_layout.c
===================================================================
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index bd55d2d9d81..da7d902777a 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1026,10 +1026,10 @@ static uiBut *ui_item_with_label(uiLayout *layout,
{
int w_label;
if (ui_layout_variable_size(layout)) {
- /* w_hint is width for label in this case.
- * Use a default width for property button(s) */
+ /* In this case, a pure label without additional padding.
+ * Use a default width for property button(s). */
prop_but_width = UI_UNIT_X * 5;
- w_label = w_hint;
+ w_label = ui_text_icon_width_ex(layout, name, ICON_NONE, &ui_text_pad_none);
}
else {
w_label = w_hint / 3;
More information about the Bf-blender-cvs
mailing list