From bf698ad144aea9a0b78b1b7e1f5b61a9d4d220fb Mon Sep 17 00:00:00 2001 From: hebiiro Date: Mon, 5 Feb 2024 13:36:05 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20=E3=83=9A=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E5=8C=96=E6=99=82=E3=81=AB=E3=82=BF=E3=83=96?= =?UTF-8?q?=E3=81=8C=E6=AD=A3=E3=81=97=E3=81=8F=E6=8F=8F=E7=94=BB=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Nest/DockSite.h | 2 +- Nest/Pane/Pane.h | 21 +++++++-------------- Nest/Pane/RootPane.h | 12 +++++------- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/Nest/DockSite.h b/Nest/DockSite.h index a650efc8..cc4c146d 100644 --- a/Nest/DockSite.h +++ b/Nest/DockSite.h @@ -116,7 +116,7 @@ namespace fgo::nest if (root) { RECT rc; ::GetClientRect(hwnd, &rc); - root->recalcLayout(&rc, 0); + root->recalcLayout(&rc); ::InvalidateRect(hwnd, 0, FALSE); } } diff --git a/Nest/Pane/Pane.h b/Nest/Pane/Pane.h index 16060501..a1e47704 100644 --- a/Nest/Pane/Pane.h +++ b/Nest/Pane/Pane.h @@ -620,14 +620,14 @@ namespace fgo::nest // void recalcLayout() { - recalcLayout(&position, 0); + recalcLayout(&position); } // // このペインおよび子孫ペインの位置情報を再計算します。 // rcはこのペインの新しい位置です。 // - virtual void recalcLayout(LPCRECT rc, const std::shared_ptr& limited) + virtual void recalcLayout(LPCRECT rc) { // MY_TRACE_FUNC(""); @@ -640,7 +640,7 @@ namespace fgo::nest int c = getTabCount(); // タブが2個以上あるなら - if (c >= 2 && (!limited || this == limited.get())) + if (c >= 2) { switch (tabMode) { @@ -690,13 +690,6 @@ namespace fgo::nest break; } } - - if (limited) - { - // 最大化モードで再描画を抑制中のときは - // タブコントロールが再描画されないので、手動で再描画します。 - ::InvalidateRect(tab, 0, FALSE); - } } // タブが1個以下なら else @@ -732,14 +725,14 @@ namespace fgo::nest { RECT rc = { position.left, position.top, absBorder, position.bottom }; - children[0]->recalcLayout(&rc, limited); + children[0]->recalcLayout(&rc); } if (children[1]) { RECT rc = { absBorder + borderWidth, position.top, position.right, position.bottom }; - children[1]->recalcLayout(&rc, limited); + children[1]->recalcLayout(&rc); } break; @@ -752,14 +745,14 @@ namespace fgo::nest { RECT rc = { position.left, position.top, position.right, absBorder }; - children[0]->recalcLayout(&rc, limited); + children[0]->recalcLayout(&rc); } if (children[1]) { RECT rc = { position.left, absBorder + borderWidth, position.right, position.bottom }; - children[1]->recalcLayout(&rc, limited); + children[1]->recalcLayout(&rc); } break; diff --git a/Nest/Pane/RootPane.h b/Nest/Pane/RootPane.h index 30b39119..8c7790a9 100644 --- a/Nest/Pane/RootPane.h +++ b/Nest/Pane/RootPane.h @@ -87,21 +87,19 @@ namespace fgo::nest // このペインおよび子孫ペインの位置情報を再計算します。 // rcはこのペインの新しい位置です。 // - void recalcLayout(LPCRECT rc, const std::shared_ptr& limited) override + void recalcLayout(LPCRECT rc) override { MY_TRACE_FUNC(""); if (maximizedPane) { - ::SendMessage(owner, WM_SETREDRAW, FALSE, 0); - __super::recalcLayout(rc, maximizedPane); - ::SendMessage(owner, WM_SETREDRAW, TRUE, 0); - - maximizedPane->recalcLayout(rc, maximizedPane); + // maximizedPaneがルートペインとなるようにレイアウトを再計算します。 + maximizedPane->recalcLayout(rc); } else { - __super::recalcLayout(rc, maximizedPane); + // thisがルートペインとなるようにレイアウトを再計算します。 + __super::recalcLayout(rc); } }