mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 06:58:15 +00:00
Fix centering the Console correctly when using UI w/multiple windows
This commit is contained in:
parent
efd8a71b9f
commit
d52455b200
2
laf
2
laf
@ -1 +1 @@
|
|||||||
Subproject commit a6e51dcc134e42e27ce96b0b634de28599ab49b3
|
Subproject commit f9149d4b80c6a7bb21dcfbd267ef510816f75abc
|
@ -1,5 +1,5 @@
|
|||||||
// Aseprite UI Library
|
// Aseprite UI Library
|
||||||
// Copyright (C) 2019-2021 Igara Studio S.A.
|
// Copyright (C) 2019-2022 Igara Studio S.A.
|
||||||
// Copyright (C) 2001-2016 David Capello
|
// Copyright (C) 2001-2016 David Capello
|
||||||
//
|
//
|
||||||
// This file is released under the terms of the MIT license.
|
// This file is released under the terms of the MIT license.
|
||||||
@ -134,8 +134,10 @@ void fit_bounds(const Display* parentDisplay,
|
|||||||
window->setBounds(gfx::Rect(0, 0, frame.w / scale, frame.h / scale));
|
window->setBounds(gfx::Rect(0, 0, frame.w / scale, frame.h / scale));
|
||||||
window->loadNativeFrame(frame);
|
window->loadNativeFrame(frame);
|
||||||
|
|
||||||
if (window->isVisible())
|
if (window->isVisible()) {
|
||||||
window->expandWindow(frame.size() / scale);
|
if (window->ownDisplay())
|
||||||
|
window->display()->nativeWindow()->setFrame(frame);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const gfx::Rect displayBounds(parentDisplay->size());
|
const gfx::Rect displayBounds(parentDisplay->size());
|
||||||
|
Loading…
Reference in New Issue
Block a user