Layouts (#189)
* Layout WIP * Widgets/BoxLayout: Fix layout algorithm * Widgets/BoxLayout: Fix box layout algorithm for good * SDK/Widgets: Remove padding * Sdk/Widgets: Make use of minimum/preferred size * Sdk/TextAreaWidget: Add Minimum/PreferredSize to TextArea * Sdk/Widgets: Add height/width variants of get/set fixed, maximum, minimum and preferred size methods * Sdk/BoxLayout: Remove useless code * Sdk/TextAreaWidget: Fix compilation * Widgets/TextAreaWidget: Fix cursor position
This commit is contained in:
@@ -93,6 +93,10 @@ namespace Ndk
|
||||
{
|
||||
m_textSprite->Update(drawer);
|
||||
|
||||
Nz::Vector2f textSize = Nz::Vector2f(m_textSprite->GetBoundingVolume().obb.localBox.GetLengths());
|
||||
SetMinimumSize(textSize);
|
||||
SetPreferredSize(textSize + Nz::Vector2f(20.f, 10.f));
|
||||
|
||||
Layout();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user