mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-19 14:16:46 -06:00
CtrlCore: Fixed issues with Layout
git-svn-id: svn://ultimatepp.org/upp/trunk@12744 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ae76caac74
commit
d19c2ef021
3 changed files with 4 additions and 3 deletions
|
|
@ -544,7 +544,6 @@ void SetLayout_Size(Ctrl& ctrl, Size sz)
|
|||
{
|
||||
sz = ctrl.AddFrameSize(sz);
|
||||
ctrl.SetMinSize(sz);
|
||||
ctrl.SetRect(sz);
|
||||
}
|
||||
|
||||
void SetLayout_Size(Ctrl& ctrl, int cx, int cy)
|
||||
|
|
|
|||
|
|
@ -204,7 +204,9 @@ void InitLayout(Ctrl& ctrl, L& layout)
|
|||
template <class T>
|
||||
void CtrlLayout(T& ctrl) {
|
||||
InitLayout(ctrl, ctrl, ctrl, ctrl);
|
||||
SetLayout_Size(ctrl, T::GetLayoutSize());
|
||||
Size sz = T::GetLayoutSize();
|
||||
SetLayout_Size(ctrl, sz);
|
||||
ctrl.SetRect(sz);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
#undef END_LAYOUT
|
||||
|
||||
#define LAYOUT(nm, x, y) template<class T, class D> inline void SetLayout_##nm(T& ctrl, D& parent, bool add = false, bool show = false) { \
|
||||
SetLayout_Size(parent, Zx(x), Zy(y));
|
||||
SetLayout_Size(ctrl, Zx(x), Zy(y));
|
||||
#define UNTYPED(var, param) parent.var.param; if(add) ctrl.Add(parent.var); if(show) parent.var.Show();
|
||||
#define ITEM(clss, var, param) UNTYPED(var, param);
|
||||
#define END_LAYOUT }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue