summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-05 17:24:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-06 09:53:25 +0200
commit192a0152ff56890b406fbacfe365c452caba7fc7 (patch)
tree7e9690cc64a02e0824e84af713a18d059d72914c /vcl/unx
parenteed96773b4adf7fdec74502ee89bca63b9018a80 (diff)
gtk3+hidpi: ScreenSize is in real pixels, scale it down
Change-Id: I867425bfd20ec67f76e570a6e71e11c437af427c Reviewed-on: https://gerrit.libreoffice.org/43174 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx8
1 files changed, 7 insertions, 1 deletions
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()