diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-07-17 20:43:43 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-07-17 20:43:43 +0200 |
commit | 203ec7760d255d9f92950c8779ddfc587d7896e0 (patch) | |
tree | e793725ed09467a01a1012bcfe1effea44fe7c39 /src/gui_w32.c | |
parent | f5be8cdb77786f93c23237d7d8162feca92067e2 (diff) | |
download | vim-git-203ec7760d255d9f92950c8779ddfc587d7896e0.tar.gz |
patch 8.2.1228: scrollbars not flush against the window edges when maximisedv8.2.1228
Problem: Scrollbars not flush against the window edges when maximised.
Solution: Add padding. (Ken Takata, closes #5602, closes #6466)
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r-- | src/gui_w32.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c index c46cb4769..30ce3eab0 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -1412,6 +1412,34 @@ gui_mch_set_scrollbar_pos( SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW); } + int +gui_mch_get_scrollbar_xpadding(void) +{ + RECT rcTxt, rcWnd; + int xpad; + + GetWindowRect(s_textArea, &rcTxt); + GetWindowRect(s_hwnd, &rcWnd); + xpad = rcWnd.right - rcTxt.right - gui.scrollbar_width + - GetSystemMetrics(SM_CXFRAME) + - GetSystemMetrics(SM_CXPADDEDBORDER); + return (xpad < 0) ? 0 : xpad; +} + + int +gui_mch_get_scrollbar_ypadding(void) +{ + RECT rcTxt, rcWnd; + int ypad; + + GetWindowRect(s_textArea, &rcTxt); + GetWindowRect(s_hwnd, &rcWnd); + ypad = rcWnd.bottom - rcTxt.bottom - gui.scrollbar_height + - GetSystemMetrics(SM_CYFRAME) + - GetSystemMetrics(SM_CXPADDEDBORDER); + return (ypad < 0) ? 0 : ypad; +} + void gui_mch_create_scrollbar( scrollbar_T *sb, |