[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/source

merttumer (via logerrit) logerrit at kemper.freedesktop.org
Wed May 12 03:56:29 UTC 2021


 vcl/source/window/layout.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 0a0d19f8d604ea9560484817948f690978c8489a
Author:     merttumer <mert.tumer at collabora.com>
AuthorDate: Fri May 7 10:19:05 2021 +0000
Commit:     Mert Tumer <mert.tumer at collabora.com>
CommitDate: Wed May 12 05:55:56 2021 +0200

    android: Fix DrawingArea inside CsvTableBox is shrinked
    
    Change-Id: Ia722297051eb3413b9db17024173c9eb596d8e7a
    Signed-off-by: merttumer <mert.tumer at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115235
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 110ffa6b4f87..edebff002f8f 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -7,6 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include <config_features.h>
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
 #include <o3tl/enumarray.hxx>
 #include <o3tl/enumrange.hxx>
@@ -262,6 +263,14 @@ void VclBox::setAllocation(const Size &rAllocation)
     {
         Size aRequisition = calculateRequisition();
         nExtraSpace = (getPrimaryDimension(rAllocation) - getPrimaryDimension(aRequisition)) / nExpandChildren;
+// In mobile, the screen size is small and extraSpace can become negative
+// Though the dialogs are rendered in javascript for LOK Android some widgets like weld::DrawingArea
+// is sent as bitmap but it is rendered from only the visible part
+// when it gets negative, it shrinks instead of expands and it becomes invisible
+#if HAVE_FEATURE_ANDROID_LOK
+        if (nExtraSpace < 0)
+            nExtraSpace = 0;
+#endif
     }
 
     //Split into those we pack from the start onwards, and those we pack from the end backwards


More information about the Libreoffice-commits mailing list