Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYevgeny Makarov <jenkm>2022-03-14 00:38:06 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2022-03-14 00:38:55 +0300
commit301fac5ded7de3ec8e43fa789a526c4d324f2e23 (patch)
tree4dad83513d5a53fb1786fdcdbb618a204604151b
parenta6b5d5bfe83e9d692a268cfbc979df8906391e34 (diff)
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
-rw-r--r--source/blender/editors/interface/interface_layout.c6
1 files changed, 3 insertions, 3 deletions
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;