mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 14:03:26 +02:00
non relevant changes
This commit is contained in:
@@ -83,7 +83,7 @@ void UIHorizontalLayout::internalUpdate()
|
||||
|
||||
if(m_fitChildren && prefferedWidth != parentWidget->getWidth()) {
|
||||
// must set the preffered width later
|
||||
g_dispatcher.addEvent([=] {
|
||||
g_eventDispatcher.addEvent([=] {
|
||||
parentWidget->setWidth(prefferedWidth);
|
||||
});
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ void UILayout::updateLater()
|
||||
return;
|
||||
|
||||
auto self = asUILayout();
|
||||
g_dispatcher.addEvent([self] {
|
||||
g_eventDispatcher.addEvent([self] {
|
||||
self->m_updateScheduled = false;
|
||||
self->update();
|
||||
});
|
||||
|
@@ -147,7 +147,7 @@ void UIManager::updateHoveredWidget()
|
||||
if(m_hoverUpdateScheduled)
|
||||
return;
|
||||
|
||||
g_dispatcher.addEvent([this] {
|
||||
g_eventDispatcher.addEvent([this] {
|
||||
if(!m_rootWidget)
|
||||
return;
|
||||
|
||||
|
@@ -83,7 +83,7 @@ void UIVerticalLayout::internalUpdate()
|
||||
|
||||
if(m_fitChildren && prefferedHeight != parentWidget->getHeight()) {
|
||||
// must set the preffered width later
|
||||
g_dispatcher.addEvent([=] {
|
||||
g_eventDispatcher.addEvent([=] {
|
||||
parentWidget->setHeight(prefferedHeight);
|
||||
});
|
||||
}
|
||||
|
@@ -650,7 +650,7 @@ void UIWidget::destroy()
|
||||
#ifdef DEBUG
|
||||
auto self = asUIWidget();
|
||||
if(self != g_ui.getRootWidget()) {
|
||||
g_dispatcher.scheduleEvent([self] {
|
||||
g_eventDispatcher.scheduleEvent([self] {
|
||||
g_lua.collectGarbage();
|
||||
if(self->getUseCount() != 1)
|
||||
logWarning("widget '", self->getId(), "' destroyed but still have ", self->getUseCount()-1, " reference(s) left");
|
||||
@@ -735,7 +735,7 @@ void UIWidget::setRect(const Rect& rect)
|
||||
// avoid massive update events
|
||||
if(!m_updateEventScheduled) {
|
||||
UIWidgetPtr self = asUIWidget();
|
||||
g_dispatcher.addEvent([self, oldRect]() {
|
||||
g_eventDispatcher.addEvent([self, oldRect]() {
|
||||
self->m_updateEventScheduled = false;
|
||||
if(oldRect != self->getRect())
|
||||
self->onGeometryChange(oldRect, self->getRect());
|
||||
@@ -1110,9 +1110,9 @@ void UIWidget::updateState(Fw::WidgetState state)
|
||||
|
||||
if(setState(state, newStatus)) {
|
||||
if(state == Fw::FocusState) {
|
||||
g_dispatcher.addEvent(std::bind(&UIWidget::onFocusChange, asUIWidget(), newStatus, m_lastFocusReason));
|
||||
g_eventDispatcher.addEvent(std::bind(&UIWidget::onFocusChange, asUIWidget(), newStatus, m_lastFocusReason));
|
||||
} else if(state == Fw::HoverState)
|
||||
g_dispatcher.addEvent(std::bind(&UIWidget::onHoverChange, asUIWidget(), newStatus));
|
||||
g_eventDispatcher.addEvent(std::bind(&UIWidget::onHoverChange, asUIWidget(), newStatus));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1145,7 +1145,7 @@ void UIWidget::updateStyle()
|
||||
|
||||
if(m_loadingStyle && !m_updateStyleScheduled) {
|
||||
UIWidgetPtr self = asUIWidget();
|
||||
g_dispatcher.addEvent([self] {
|
||||
g_eventDispatcher.addEvent([self] {
|
||||
self->m_updateStyleScheduled = false;
|
||||
self->updateStyle();
|
||||
});
|
||||
|
Reference in New Issue
Block a user