summaryrefslogtreecommitdiff
path: root/tests
diff options
authorGord Allott <gord.allott@canonical.com>2011-01-26 13:53:33 +0000
committerGord Allott <gord.allott@canonical.com>2011-01-26 13:53:33 +0000
commite315a2dca3638991eab15a5fbc01c8ea900d97ee (patch)
treece367fc0b9c9d640520e6bce06a3d66fb7fd1fc0 /tests
parent17846065d9a275965fe123d7907789709d291a44 (diff)
nux layouts hate me
(bzr r775.1.5)
Diffstat (limited to 'tests')
-rw-r--r--tests/TestPlacesGroup.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/TestPlacesGroup.cpp b/tests/TestPlacesGroup.cpp
index 0d998b044..0a4f30ce5 100644
--- a/tests/TestPlacesGroup.cpp
+++ b/tests/TestPlacesGroup.cpp
@@ -27,6 +27,7 @@
#include "Nux/TextureArea.h"
#include "Nux/WindowThread.h"
#include "NuxGraphics/GraphicsEngine.h"
+#include "Nux/GridHLayout.h"
#include <gtk/gtk.h>
#include "PlacesGroup.h"
@@ -59,6 +60,29 @@ void TestRunner::Init ()
PlacesGroup *group1 = new PlacesGroup ();
group1->SetTitle ("Hello World!");
group1->SetItemDetail (100, 5);
+
+ nux::GridHLayout *group_content = new nux::GridHLayout (NUX_TRACKER_LOCATION);
+ for (int i = 0; i < 60; i++)
+ {
+ nux::ColorLayer color (nux::Color::RandomColor ());
+ nux::TextureArea* texture_area = new nux::TextureArea ();
+ texture_area->SetPaintLayer (&color);
+
+ group_content->AddView (texture_area, 1, nux::eLeft, nux::eFull);
+ }
+
+ group_content->ForceChildrenSize (true);
+ group_content->SetChildrenSize (64, 42);
+ group_content->EnablePartialVisibility (false);
+
+ group_content->SetVerticalExternalMargin (4);
+ group_content->SetHorizontalExternalMargin (4);
+ group_content->SetVerticalInternalMargin (4);
+ group_content->SetHorizontalInternalMargin (4);
+
+ group1->SetLayout (group_content);
+
+
layout->AddView (group1, 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
nux::GetGraphicsThread()->SetLayout (layout);