[Bf-blender-cvs] [478ba532700] master: UI: Fix text padding in some list widgets

Yevgeny Makarov noreply at git.blender.org
Sun Dec 20 18:28:19 CET 2020


Commit: 478ba532700fa4c2bbcccfd821d1386653729fb5
Author: Yevgeny Makarov
Date:   Sun Dec 20 11:27:02 2020 -0600
Branches: master
https://developer.blender.org/rB478ba532700fa4c2bbcccfd821d1386653729fb5

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

===================================================================

M	release/scripts/startup/bl_ui/properties_data_hair.py
M	release/scripts/startup/bl_ui/properties_data_pointcloud.py
M	release/scripts/startup/bl_ui/properties_data_volume.py

===================================================================

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'



More information about the Bf-blender-cvs mailing list