[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara
caolanm at redhat.com
Fri Oct 6 07:53:50 UTC 2017
vcl/unx/gtk3/gtk3gtkframe.cxx | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 192a0152ff56890b406fbacfe365c452caba7fc7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 5 17:24:11 2017 +0100
gtk3+hidpi: ScreenSize is in real pixels, scale it down
Change-Id: I867425bfd20ec67f76e570a6e71e11c437af427c
Reviewed-on: https://gerrit.libreoffice.org/43174
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index eacd1d716ef3..4b17e9e3ef89 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1399,7 +1399,13 @@ void GtkSalFrame::Center()
Size GtkSalFrame::calcDefaultSize()
{
- return bestmaxFrameSizeForScreenSize(getDisplay()->GetScreenSize(GetDisplayScreen()));
+ Size aScreenSize(getDisplay()->GetScreenSize(GetDisplayScreen()));
+#if GTK_CHECK_VERSION(3,10,0)
+ int scale = gtk_widget_get_scale_factor(m_pWindow);
+ aScreenSize.Width() /= scale;
+ aScreenSize.Height() /= scale;
+#endif
+ return bestmaxFrameSizeForScreenSize(aScreenSize);
}
void GtkSalFrame::SetDefaultSize()
More information about the Libreoffice-commits
mailing list