mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 22:13:27 +02:00
change in topmenu and some fixes
This commit is contained in:
@@ -84,6 +84,9 @@ void UIAnchorLayout::removeWidget(const UIWidgetPtr& widget)
|
||||
void UIAnchorLayout::updateWidget(const UIWidgetPtr& widget, UIAnchorGroup& anchorGroup)
|
||||
{
|
||||
UIWidgetPtr parentWidget = getParentWidget();
|
||||
if(!parentWidget)
|
||||
return;
|
||||
|
||||
Rect newRect = widget->getRect();
|
||||
bool verticalMoved = false;
|
||||
bool horizontalMoved = false;
|
||||
|
@@ -38,6 +38,8 @@ void UIHorizontalLayout::applyStyle(const OTMLNodePtr& styleNode)
|
||||
void UIHorizontalLayout::internalUpdate()
|
||||
{
|
||||
UIWidgetPtr parentWidget = getParentWidget();
|
||||
if(!parentWidget)
|
||||
return;
|
||||
UIWidgetList widgets = parentWidget->getChildren();
|
||||
|
||||
if(m_alignRight)
|
||||
|
@@ -37,6 +37,9 @@ void UIVerticalLayout::applyStyle(const OTMLNodePtr& styleNode)
|
||||
void UIVerticalLayout::internalUpdate()
|
||||
{
|
||||
UIWidgetPtr parentWidget = getParentWidget();
|
||||
if(!parentWidget)
|
||||
return;
|
||||
|
||||
UIWidgetList widgets = parentWidget->getChildren();
|
||||
|
||||
if(m_alignBottom)
|
||||
|
@@ -639,6 +639,9 @@ void UIWidget::setVisible(bool visible)
|
||||
parent->focusPreviousChild(Fw::ActiveFocusReason);
|
||||
}
|
||||
|
||||
// visibility can change can change parent layout
|
||||
updateParentLayout();
|
||||
|
||||
updateState(Fw::ActiveState);
|
||||
updateState(Fw::HoverState);
|
||||
}
|
||||
|
Reference in New Issue
Block a user