Reorganize code in widgets
This commit is contained in:
parent
1508a51cde
commit
7cf3328a40
31 changed files with 652 additions and 481 deletions
17
WidgetsNew/private/managers/LayoutManager.cpp
Normal file
17
WidgetsNew/private/managers/LayoutManager.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include "LayoutManager.hpp"
|
||||
|
||||
#include "Widget.hpp"
|
||||
|
||||
using namespace tp;
|
||||
|
||||
void LayoutManager::adjust(Widget* root) {
|
||||
Widget::dfs(
|
||||
root,
|
||||
[](Widget* widget) {
|
||||
widget->getLayout()->pickRect();
|
||||
},
|
||||
[](Widget* widget) {
|
||||
widget->getLayout()->adjustChildrenRect();
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue