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:
authorHarley Acheson <harley.acheson@gmail.com>2021-04-03 00:26:16 +0300
committerHarley Acheson <harley.acheson@gmail.com>2021-04-03 00:26:16 +0300
commit321eef6a0c0f8ed8671ffa8f9aa9ef2ca9125153 (patch)
tree68c34c016231b73a10e95437246800685ce42c78 /source/blender/editors/space_spreadsheet
parent46d75052eb08cd904a42882030ca5c8718ee04ee (diff)
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
Diffstat (limited to 'source/blender/editors/space_spreadsheet')
-rw-r--r--source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc31
1 files changed, 16 insertions, 15 deletions
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;