[Bf-blender-cvs] [321eef6a0c0] master: UI: Align Spreadsheet Booleans to Center

Harley Acheson noreply at git.blender.org
Fri Apr 2 23:27:01 CEST 2021


Commit: 321eef6a0c0f8ed8671ffa8f9aa9ef2ca9125153
Author: Harley Acheson
Date:   Fri Apr 2 14:26:16 2021 -0700
Branches: master
https://developer.blender.org/rB321eef6a0c0f8ed8671ffa8f9aa9ef2ca9125153

UI: Align Spreadsheet Booleans to Center

Aligning spreadsheet Booleans to the middle of their cells.

Differential Revision: https://developer.blender.org/D10882

Reviewed by Hans Goudey

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

M	source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc

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

diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc b/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc
index 57d329fa710..77c56c02d93 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc
@@ -167,21 +167,22 @@ class ColumnLayoutDrawer : public SpreadsheetDrawer {
     else if (cell_value.value_bool.has_value()) {
       const bool value = *cell_value.value_bool;
       const int icon = value ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
-      uiDefIconTextBut(params.block,
-                       UI_BTYPE_LABEL,
-                       0,
-                       icon,
-                       "",
-                       params.xmin,
-                       params.ymin,
-                       params.width,
-                       params.height,
-                       nullptr,
-                       0,
-                       0,
-                       0,
-                       0,
-                       nullptr);
+      uiBut *but = uiDefIconTextBut(params.block,
+                                    UI_BTYPE_LABEL,
+                                    0,
+                                    icon,
+                                    "",
+                                    params.xmin,
+                                    params.ymin,
+                                    params.width,
+                                    params.height,
+                                    nullptr,
+                                    0,
+                                    0,
+                                    0,
+                                    0,
+                                    nullptr);
+      UI_but_drawflag_disable(but, UI_BUT_ICON_LEFT);
     }
     else if (cell_value.value_object.has_value()) {
       const ObjectCellValue value = *cell_value.value_object;



More information about the Bf-blender-cvs mailing list