diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-04-12 09:08:23 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-04-12 09:08:23 +0300 |
commit | 4a3bcfa1026b0be5a87f6540e61b94241bd91e3b (patch) | |
tree | 82b8318a24a5ae96aedd899d87f46d23bba1171b /release/scripts/startup/bl_ui | |
parent | d683ea4862130b448077de08b2dcebc20418784e (diff) |
Fix T97100: Fix ordering in color attribute list items
The new tab in the properties panel for "Color Attributes" shows the
data type and domain, just like the Attributes tab.
The issue is that the UI does not scale well and can only display the
full names when dragged to an extreme width.
This is due to the inclusion of the render icon in between the
attribute name and attribute type description.
This patch changes the order that items are displayed in the Color
Attributes Panel. Moving the render icon to the very right.
The result is consistent with other parts of the Blender UI and does
not take as much space to display the full text.
Reviewed By: @jbakker
Differential Revision: https://developer.blender.org/D14567
Ref D14567
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_mesh.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index 1bfd82cc790..1ba7a4a5413 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -599,20 +599,21 @@ class MESH_UL_color_attributes(UIList, ColorAttributesListBase): split.emboss = 'NONE' split.prop(attribute, "name", text="") - active_render = _index == data.color_attributes.render_color_index + sub = split.row() + sub.alignment = 'RIGHT' + sub.active = False + sub.label(text="%s ▶ %s" % (domain_name, data_type.name)) - props = split.operator( + active_render = _index == data.color_attributes.render_color_index + + row = layout.row() + row.emboss = 'NONE' + prop = row.operator( "geometry.color_attribute_render_set", text="", icon='RESTRICT_RENDER_OFF' if active_render else 'RESTRICT_RENDER_ON', ) - - props.name = attribute.name - - sub = split.row() - sub.alignment = 'RIGHT' - sub.active = False - sub.label(text="%s ▶ %s" % (domain_name, data_type.name)) + prop.name = attribute.name class MESH_UL_color_attributes_selector(UIList, ColorAttributesListBase): |