mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.2709: the GTK GUI has a gap next to the scrollbar
Problem: The GTK GUI has a gap next to the scrollbar. Solution: Calculate the scrollbar padding for GTK. (closes #8027)
This commit is contained in:
@@ -1011,17 +1011,29 @@ gui_mch_set_scrollbar_pos(scrollbar_T *sb, int x, int y, int w, int h)
|
|||||||
int
|
int
|
||||||
gui_mch_get_scrollbar_xpadding(void)
|
gui_mch_get_scrollbar_xpadding(void)
|
||||||
{
|
{
|
||||||
// TODO: Calculate the padding for adjust scrollbar position when the
|
int xpad;
|
||||||
// Window is maximized.
|
#if GTK_CHECK_VERSION(3,0,0)
|
||||||
return 0;
|
xpad = gtk_widget_get_allocated_width(gui.formwin)
|
||||||
|
- gtk_widget_get_allocated_width(gui.drawarea) - gui.scrollbar_width;
|
||||||
|
#else
|
||||||
|
xpad = gui.formwin->allocation.width - gui.drawarea->allocation.width
|
||||||
|
- gui.scrollbar_width;
|
||||||
|
#endif
|
||||||
|
return (xpad < 0) ? 0 : xpad;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
gui_mch_get_scrollbar_ypadding(void)
|
gui_mch_get_scrollbar_ypadding(void)
|
||||||
{
|
{
|
||||||
// TODO: Calculate the padding for adjust scrollbar position when the
|
int ypad;
|
||||||
// Window is maximized.
|
#if GTK_CHECK_VERSION(3,0,0)
|
||||||
return 0;
|
ypad = gtk_widget_get_allocated_height(gui.formwin)
|
||||||
|
- gtk_widget_get_allocated_height(gui.drawarea) - gui.scrollbar_height;
|
||||||
|
#else
|
||||||
|
ypad = gui.formwin->allocation.height - gui.drawarea->allocation.height
|
||||||
|
- gui.scrollbar_height;
|
||||||
|
#endif
|
||||||
|
return (ypad < 0) ? 0 : ypad;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2709,
|
||||||
/**/
|
/**/
|
||||||
2708,
|
2708,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user