[Bf-blender-cvs] [64ddb1c8f2e] temp-spreadsheet-editor: right align indices

Jacques Lucke noreply at git.blender.org
Tue Feb 23 17:08:34 CET 2021


Commit: 64ddb1c8f2eaaf9309a888f706ee4242e00de080
Author: Jacques Lucke
Date:   Tue Feb 23 17:03:22 2021 +0100
Branches: temp-spreadsheet-editor
https://developer.blender.org/rB64ddb1c8f2eaaf9309a888f706ee4242e00de080

right align indices

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

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

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

diff --git a/source/blender/editors/space_spreadsheet/space_spreadsheet.cc b/source/blender/editors/space_spreadsheet/space_spreadsheet.cc
index 3ab1160ec35..946d8747427 100644
--- a/source/blender/editors/space_spreadsheet/space_spreadsheet.cc
+++ b/source/blender/editors/space_spreadsheet/space_spreadsheet.cc
@@ -125,21 +125,23 @@ static void draw_row_indices(uiBlock *block,
     const int x = left_x;
     const int y = top_y - (i + 1) * row_height;
     const std::string number_string = std::to_string(i);
-    uiDefIconTextBut(block,
-                     UI_BTYPE_LABEL,
-                     0,
-                     ICON_NONE,
-                     number_string.c_str(),
-                     x,
-                     y,
-                     column_width,
-                     row_height,
-                     nullptr,
-                     0,
-                     0,
-                     0,
-                     0,
-                     nullptr);
+    uiBut *but = uiDefIconTextBut(block,
+                                  UI_BTYPE_LABEL,
+                                  0,
+                                  ICON_NONE,
+                                  number_string.c_str(),
+                                  x,
+                                  y,
+                                  column_width,
+                                  row_height,
+                                  nullptr,
+                                  0,
+                                  0,
+                                  0,
+                                  0,
+                                  nullptr);
+    UI_but_drawflag_enable(but, UI_BUT_TEXT_RIGHT);
+    UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
   }
 }



More information about the Bf-blender-cvs mailing list