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:
authorgsr b3d <gsr.b3d@infernal-iceberg.com>2019-01-23 17:31:47 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-23 17:33:01 +0300
commit409443500b299a2f2112e669e7085d3f16191e8c (patch)
tree95a1a3282418f615ebaa6b1bcfbafc0f3d618791 /source/blender/editors/space_file
parent93d226952b4eb70a5e5ed4525128ca559b03d349 (diff)
UI: fix horizontal scrollbar overlapping last row of files
Depending on area size, the scrollbar covered the bottom of the text, with the extra it will only cover the padding at worst. Differential Revision: https://developer.blender.org/D4207
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/filesel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index f25d3e25f0b..9a38c16e020 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -76,6 +76,7 @@
#include "UI_interface.h"
#include "UI_interface_icons.h"
+#include "UI_view2d.h"
#include "file_intern.h"
#include "filelist.h"
@@ -547,7 +548,9 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *ar)
layout->prv_border_y = 0;
layout->tile_h = textheight * 3 / 2;
layout->height = (int)(BLI_rctf_size_y(&v2d->cur) - 2 * layout->tile_border_y);
- layout->rows = layout->height / (layout->tile_h + 2 * layout->tile_border_y);
+ /* Padding by full scrollbar H is too much, can overlap tile border Y. */
+ layout->rows = (layout->height - V2D_SCROLL_HEIGHT + layout->tile_border_y) /
+ (layout->tile_h + 2 * layout->tile_border_y);
column_widths(params, layout);