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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 9 18:53:22 UTC 2020


 vcl/unx/gtk3/gtk3gtkobject.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit fcd898c60093eeb5e81f8dc312edc768107c9380
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jun 9 15:08:34 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jun 9 20:52:44 2020 +0200

    tdf#133822 mirror GtkSalObjectWidgetClip location for RTL
    
    Change-Id: I4ab4a0fb8fc343ee9a4c66c58e20583482958f37
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95951
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkobject.cxx b/vcl/unx/gtk3/gtk3gtkobject.cxx
index 219805daed49..cb60406ec0e0 100644
--- a/vcl/unx/gtk3/gtk3gtkobject.cxx
+++ b/vcl/unx/gtk3/gtk3gtkobject.cxx
@@ -359,7 +359,14 @@ void GtkSalObjectWidgetClip::ApplyClipRegion()
             allocation.height = m_aClipRect.GetHeight();
         }
 
-        gtk_fixed_move(pContainer, m_pScrolledWindow, allocation.x, allocation.y);
+        if (AllSettings::GetLayoutRTL())
+        {
+            GtkAllocation aParentAllocation;
+            gtk_widget_get_allocation(GTK_WIDGET(pContainer), &aParentAllocation);
+            gtk_fixed_move(pContainer, m_pScrolledWindow, aParentAllocation.width - allocation.width - 1 - allocation.x, allocation.y);
+        }
+        else
+            gtk_fixed_move(pContainer, m_pScrolledWindow, allocation.x, allocation.y);
         gtk_widget_set_size_request(m_pScrolledWindow, allocation.width, allocation.height);
         gtk_widget_size_allocate(m_pScrolledWindow, &allocation);
 


More information about the Libreoffice-commits mailing list