summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-30 13:46:46 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-12-01 09:42:54 +0100
commit8075514ec40a6c8c119ccb460537e2c3db30c89d (patch)
tree9255707769ffabb0266e8efdce772a8bc5a43476 /vcl/unx
parent8c137ff0e201c2d0ecd1bb567496dbed8e5eced7 (diff)
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/+/126104 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx2
1 files changed, 1 insertions, 1 deletions
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)