summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authormerttumer <mert.tumer@collabora.com>2021-05-07 10:19:05 +0000
committerAndras Timar <andras.timar@collabora.com>2021-05-12 10:51:52 +0200
commitda5f0de49c34cde024a3c640a66961ebc4749897 (patch)
treec6f9b81737bf168bf21154e2f3deefb71d289062 /vcl
parentd84b9631c8a39d0c25c5900d3d47b624d7449c8a (diff)
android: Fix DrawingArea inside CsvTableBox is shrinked
Change-Id: Ia722297051eb3413b9db17024173c9eb596d8e7a Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115235 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/layout.cxx9
1 files changed, 9 insertions, 0 deletions
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