From a798a8429f7df10a7194605e5ba8f3172ba537ff Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Mon, 16 Jul 2018 15:56:38 +0900 Subject: [PATCH] lottie/example: fixed layout issue. Change-Id: Id8795b63d13cca081d383f4e1303b990bdb723be --- example/lottieviewtest.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/example/lottieviewtest.cpp b/example/lottieviewtest.cpp index 169da1e..f11e280 100644 --- a/example/lottieviewtest.cpp +++ b/example/lottieviewtest.cpp @@ -51,11 +51,10 @@ public: if (mResource.empty()) return; int count = mResource.size(); - int colums = sqrt(count); - int rows = (count % colums) ? colums+1 : colums; + int colums = (int) ceil(sqrt(count)); int offset = 3; int vw = (mApp->width() - (2 * offset * colums))/colums; - int vh = (mApp->height() - (2 * offset * rows))/rows; + int vh = vw; int posx = offset; int posy = offset; for(auto i : mResource) { -- 2.34.1