Kaydet (Commit) 48a61701 authored tarafından Michael Meeks's avatar Michael Meeks

vcldemo: get the pane layout right.

Change-Id: I0da63fbe6262ed56198f3f049c23637669d554a2
üst 6e690a62
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
#include <math.h>
#include <rtl/math.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/random.hxx> #include <comphelper/random.hxx>
#include <cppuhelper/bootstrap.hxx> #include <cppuhelper/bootstrap.hxx>
...@@ -110,8 +113,8 @@ class DemoRenderer ...@@ -110,8 +113,8 @@ class DemoRenderer
void InitRenderers(); void InitRenderers();
public: public:
DemoRenderer() : mnSegmentsX(4) DemoRenderer() : mnSegmentsX(0)
, mnSegmentsY(4) , mnSegmentsY(0)
, mnSelectedRenderer(-1) , mnSelectedRenderer(-1)
, iterCount(0) , iterCount(0)
#if FIXME_BOUNCE_BUTTON #if FIXME_BOUNCE_BUTTON
...@@ -128,6 +131,11 @@ public: ...@@ -128,6 +131,11 @@ public:
maIntroBW.Filter(BMP_FILTER_EMBOSS_GREY); maIntroBW.Filter(BMP_FILTER_EMBOSS_GREY);
InitRenderers(); InitRenderers();
mnSegmentsX = rtl::math::round(sqrt(maRenderers.size()), 0,
rtl_math_RoundingMode_Up);
mnSegmentsY = rtl::math::round(sqrt(maRenderers.size()), 0,
rtl_math_RoundingMode_Down);
mnSegmentsY = floor(sqrt(maRenderers.size()));
} }
OUString getRendererList(); OUString getRendererList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment