mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-23 09:41:04 +00:00
Fix std::clamp() assert in Manager::onInitTheme()
This commit is contained in:
parent
eea59a58dd
commit
f6db44b81d
@ -1778,8 +1778,8 @@ void Manager::onInitTheme(InitThemeEvent& ev)
|
||||
gfx::Rect bounds = window->bounds();
|
||||
bounds *= newUIScale;
|
||||
bounds /= oldUIScale;
|
||||
bounds.x = std::clamp(bounds.x, 0, displaySize.w - bounds.w);
|
||||
bounds.y = std::clamp(bounds.y, 0, displaySize.h - bounds.h);
|
||||
bounds.x = std::clamp(bounds.x, 0, std::max(0, displaySize.w - bounds.w));
|
||||
bounds.y = std::clamp(bounds.y, 0, std::max(0, displaySize.h - bounds.h));
|
||||
window->setBounds(bounds);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user