From d52455b200f43c966ff79facc80bce2c5c2853f6 Mon Sep 17 00:00:00 2001 From: David Capello Date: Tue, 11 Jan 2022 10:41:36 -0300 Subject: [PATCH] Fix centering the Console correctly when using UI w/multiple windows --- laf | 2 +- src/ui/fit_bounds.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/laf b/laf index a6e51dcc1..f9149d4b8 160000 --- a/laf +++ b/laf @@ -1 +1 @@ -Subproject commit a6e51dcc134e42e27ce96b0b634de28599ab49b3 +Subproject commit f9149d4b80c6a7bb21dcfbd267ef510816f75abc diff --git a/src/ui/fit_bounds.cpp b/src/ui/fit_bounds.cpp index 5392fa9ed..b1da1e4fd 100644 --- a/src/ui/fit_bounds.cpp +++ b/src/ui/fit_bounds.cpp @@ -1,5 +1,5 @@ // 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 // // 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->loadNativeFrame(frame); - if (window->isVisible()) - window->expandWindow(frame.size() / scale); + if (window->isVisible()) { + if (window->ownDisplay()) + window->display()->nativeWindow()->setFrame(frame); + } } else { const gfx::Rect displayBounds(parentDisplay->size());