diff options
author | Yevgeny Makarov <jenkm> | 2020-12-20 20:27:02 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-12-20 20:27:02 +0300 |
commit | 478ba532700fa4c2bbcccfd821d1386653729fb5 (patch) | |
tree | 4983fe6173275a1ed86b583a04c59e9d45fc5d42 /release | |
parent | 16527ebabacfe6a625fb12358ee73f0424517c63 (diff) |
UI: Fix text padding in some list widgets
Normally, pure text buttons have no padding at their edges so they
align with edges of buttons, see D9058. However, in several cases
there are labels aligned to the right side of a list widget row,
so they're missing padding against the right edge.
The fix is to use emboss = 'NONE' for such labels, which changes
the drawing style, adding padding on the right edge. (Normally so
labels aligned with the text from non-embossed buttons). This is
not necessarily intended, but it works properly.
For more information, see the revision.
Differential Revision: https://developer.blender.org/D9874
Diffstat (limited to 'release')
3 files changed, 5 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_hair.py b/release/scripts/startup/bl_ui/properties_data_hair.py index 2f52372eaed..4964316ad0f 100644 --- a/release/scripts/startup/bl_ui/properties_data_hair.py +++ b/release/scripts/startup/bl_ui/properties_data_hair.py @@ -86,8 +86,9 @@ class HAIR_UL_attributes(UIList): domain = attribute.bl_rna.properties['domain'].enum_items[attribute.domain] split = layout.split(factor=0.5) + split.emboss = 'NONE' row = split.row() - row.prop(attribute, "name", text="", emboss=False) + row.prop(attribute, "name", text="") sub = split.split() sub.alignment = 'RIGHT' sub.active = False diff --git a/release/scripts/startup/bl_ui/properties_data_pointcloud.py b/release/scripts/startup/bl_ui/properties_data_pointcloud.py index f2464fb9765..eca59ea4aaf 100644 --- a/release/scripts/startup/bl_ui/properties_data_pointcloud.py +++ b/release/scripts/startup/bl_ui/properties_data_pointcloud.py @@ -87,7 +87,8 @@ class POINTCLOUD_UL_attributes(UIList): data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type] split = layout.split(factor=0.75) - split.prop(attribute, "name", text="", emboss=False) + split.emboss = 'NONE' + split.prop(attribute, "name", text="") sub = split.row() sub.alignment = 'RIGHT' sub.active = False diff --git a/release/scripts/startup/bl_ui/properties_data_volume.py b/release/scripts/startup/bl_ui/properties_data_volume.py index 0a8bbd19b63..d4f108dcf24 100644 --- a/release/scripts/startup/bl_ui/properties_data_volume.py +++ b/release/scripts/startup/bl_ui/properties_data_volume.py @@ -88,6 +88,7 @@ class VOLUME_UL_grids(UIList): name = grid.name data_type = grid.bl_rna.properties['data_type'].enum_items[grid.data_type] + layout.emboss = 'NONE' layout.label(text=name) row = layout.row() row.alignment = 'RIGHT' |