To: vim_dev@googlegroups.com Subject: Patch 8.2.2709 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2709 Problem: The GTK GUI has a gap next to the scrollbar. Solution: Calculate the scrollbar padding for GTK. (closes #8027) Files: src/gui_gtk.c *** ../vim-8.2.2708/src/gui_gtk.c 2020-10-21 16:10:16.382485983 +0200 --- src/gui_gtk.c 2021-04-04 15:47:59.216914915 +0200 *************** *** 1011,1027 **** int gui_mch_get_scrollbar_xpadding(void) { ! // TODO: Calculate the padding for adjust scrollbar position when the ! // Window is maximized. ! return 0; } int gui_mch_get_scrollbar_ypadding(void) { ! // TODO: Calculate the padding for adjust scrollbar position when the ! // Window is maximized. ! return 0; } /* --- 1011,1039 ---- int gui_mch_get_scrollbar_xpadding(void) { ! int xpad; ! #if GTK_CHECK_VERSION(3,0,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 gui_mch_get_scrollbar_ypadding(void) { ! int ypad; ! #if GTK_CHECK_VERSION(3,0,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; } /* *** ../vim-8.2.2708/src/version.c 2021-04-04 15:28:55.509067733 +0200 --- src/version.c 2021-04-04 15:47:13.413069393 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2709, /**/ -- hundred-and-one symptoms of being an internet addict: 56. You leave the modem speaker on after connecting because you think it sounds like the ocean wind...the perfect soundtrack for "surfing the net". /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///