remake widgets's anchor layouts

This commit is contained in:
Eduardo Bart
2011-08-21 16:43:05 -03:00
parent b410921e32
commit f266b9fbc6
23 changed files with 365 additions and 364 deletions

View File

@@ -1,6 +1,5 @@
#include "uimanager.h"
#include "ui.h"
#include "uianchorlayout.h"
#include <framework/otml/otml.h>
#include <framework/graphics/graphics.h>
@@ -13,9 +12,6 @@ void UIManager::init()
m_rootWidget = UIWidgetPtr(new UIWidget);
m_rootWidget->setId("root");
m_rootWidget->setHovered(true);
UIAnchorLayoutPtr anchorLayout(new UIAnchorLayout);
m_rootWidget->setLayout(anchorLayout);
m_rootWidget->resize(g_graphics.getScreenSize());
}
@@ -187,7 +183,7 @@ UIWidgetPtr UIManager::loadWidgetFromOTML(const OTMLNodePtr& widgetNode)
throw OTMLException(styleNode, "cannot determine widget type");
widget->loadStyleFromOTML(styleNode);
widget->updateGeometry();
widget->updateLayout();
for(const OTMLNodePtr& childNode : widgetNode->children()) {
if(!childNode->isUnique())