[Bf-blender-cvs] [c5712c6795e] master: Fix T99373: add some padding in spreadsheet vector columns

Jacques Lucke noreply at git.blender.org
Tue Jul 26 12:36:58 CEST 2022


Commit: c5712c6795e761c16666aeeb611be05990d3f734
Author: Jacques Lucke
Date:   Tue Jul 26 12:35:55 2022 +0200
Branches: master
https://developer.blender.org/rBc5712c6795e761c16666aeeb611be05990d3f734

Fix T99373: add some padding in spreadsheet vector columns

This improves readability in some cases (e.g. in T99373).

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

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

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

diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc b/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc
index 780dd0303cd..3fe4c7c8ee0 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc
@@ -287,7 +287,7 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
     for (const int i : values.index_range()) {
       std::stringstream ss;
       const float value = values[i];
-      ss << std::fixed << std::setprecision(3) << value;
+      ss << " " << std::fixed << std::setprecision(3) << value;
       const std::string value_str = ss.str();
       uiBut *but = uiDefIconTextBut(params.block,
                                     UI_BTYPE_LABEL,
@@ -318,7 +318,7 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
     for (const int i : values.index_range()) {
       std::stringstream ss;
       const float value = values[i];
-      ss << std::fixed << std::setprecision(3) << value;
+      ss << " " << std::fixed << std::setprecision(3) << value;
       const std::string value_str = ss.str();
       uiBut *but = uiDefIconTextBut(params.block,
                                     UI_BTYPE_LABEL,



More information about the Bf-blender-cvs mailing list