[Bf-blender-cvs] [409443500b2] master: UI: fix horizontal scrollbar overlapping last row of files
gsr b3d
noreply at git.blender.org
Wed Jan 23 15:36:04 CET 2019
Commit: 409443500b299a2f2112e669e7085d3f16191e8c
Author: gsr b3d
Date: Wed Jan 23 15:31:47 2019 +0100
Branches: master
https://developer.blender.org/rB409443500b299a2f2112e669e7085d3f16191e8c
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
===================================================================
M source/blender/editors/space_file/filesel.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list