vcl/unx/gtk3/gtkinst.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9ec87a52bd4c72ff9d0048bb9ba3e79d45e87162
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Nov 30 13:46:46 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Nov 30 19:54:12 2021 +0100

    gtk[3|4] calculate row height closer to what gtk appears to do
    
    we're getting slightly more lines than requested visible in f.e. the
    calc autofilter drop down
    
    Change-Id: I9ca16eb5ec6848499997a6fceec1d0ead693efce
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126119
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index f9546a5ebe43..d808d1e478c4 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -13057,7 +13057,7 @@ int get_height_rows(GtkTreeView* pTreeView, GList* 
pColumns, int nRows)
 {
     gint nMaxRowHeight = get_height_row(pTreeView, pColumns);
     gint nVerticalSeparator = get_height_row_separator(pTreeView);
-    return (nMaxRowHeight * nRows) + (nVerticalSeparator * (nRows + 1));
+    return (nMaxRowHeight * nRows) + (nVerticalSeparator * nRows) / 2;
 }
 
 #if !GTK_CHECK_VERSION(4, 0, 0)

Reply via email to