diff options
author | Jacques Lucke <jacques@blender.org> | 2021-11-23 11:35:47 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-11-23 11:35:47 +0300 |
commit | 84be741329bc7b98ed4db36a2fc7d093088d825e (patch) | |
tree | 1d52d15d009843342102ed89f425cc64fa0b2464 /source/blender/editors | |
parent | 6987060f7082e77cfc4ead7db3e7c9d6aaf349b1 (diff) |
Fix T92654: missing padding in spreadsheet cells
This was probably broken by rB5c2330203e11e0d916960218b07d88d2193bf526.
For now just add the padding back in a spreadsheet specific way.
Differential Revision: https://developer.blender.org/D13315
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_spreadsheet/spreadsheet_draw.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_draw.cc b/source/blender/editors/space_spreadsheet/spreadsheet_draw.cc index b911c80fa63..857aa20da92 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_draw.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_draw.cc @@ -27,6 +27,8 @@ #include "spreadsheet_draw.hh" +#define CELL_RIGHT_PADDING (2.0f * UI_DPI_FAC) + namespace blender::ed::spreadsheet { SpreadsheetDrawer::SpreadsheetDrawer() @@ -159,7 +161,7 @@ static void draw_left_column_content(const int scroll_offset_y, params.xmin = 0; params.ymin = region->winy - drawer.top_row_height - (row_index + 1) * drawer.row_height - scroll_offset_y; - params.width = drawer.left_column_width; + params.width = drawer.left_column_width - CELL_RIGHT_PADDING; params.height = drawer.row_height; drawer.draw_left_column_cell(row_index, params); } @@ -194,7 +196,7 @@ static void draw_top_row_content(const bContext *C, params.block = first_row_block; params.xmin = left_x; params.ymin = region->winy - drawer.top_row_height; - params.width = column_width; + params.width = column_width - CELL_RIGHT_PADDING; params.height = drawer.top_row_height; drawer.draw_top_row_cell(column_index, params); @@ -242,7 +244,7 @@ static void draw_cell_contents(const bContext *C, params.xmin = left_x; params.ymin = region->winy - drawer.top_row_height - (row_index + 1) * drawer.row_height - scroll_offset_y; - params.width = column_width; + params.width = column_width - CELL_RIGHT_PADDING; params.height = drawer.row_height; drawer.draw_content_cell(row_index, column_index, params); } |