[Libreoffice-commits] core.git: vcl/unx

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 3 07:51:28 UTC 2018


 vcl/unx/gtk3/gtk3gtkinst.cxx |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit e3993341d041f6f2a72f4fc697bd1f6f94c40439
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Oct 2 16:08:07 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Oct 3 09:51:01 2018 +0200

    when gtk3 >= 3.22.0 set natural size propagate
    
    so 1-10 in format numbering etc isn't slightly clipped
    with a scrollbar on top of it
    
    Change-Id: I55909993d4b4c846ca0aeff2f2cd458dfa59d860
    Reviewed-on: https://gerrit.libreoffice.org/61262
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index eac52843af19..6ca6886e83d6 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -5387,6 +5387,17 @@ private:
             if (gtk_label_get_use_underline(pLabel))
                 m_aMnemonicLabels.push_back(pLabel);
         }
+        else if (GTK_IS_SCROLLED_WINDOW(pWidget))
+        {
+#if GTK_CHECK_VERSION(3, 22, 0)
+            // while the .ui version is 3.18, do this in code when possible
+            if (gtk_check_version(3, 22, 0) == nullptr)
+            {
+                gtk_scrolled_window_set_propagate_natural_width(GTK_SCROLLED_WINDOW(pWidget), true);
+                gtk_scrolled_window_set_propagate_natural_height(GTK_SCROLLED_WINDOW(pWidget), true);
+            }
+#endif
+        }
         else if (GTK_IS_WINDOW(pWidget))
         {
             if (m_pStringReplace != nullptr) {


More information about the Libreoffice-commits mailing list