From 231b67a4f94129e3e74a786bb8989e52f1dd6a52 Mon Sep 17 00:00:00 2001 From: youdiansaodongxi Date: Thu, 27 Jun 2024 17:42:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(src/windows):=20=E4=BF=AE=E6=94=B9=E5=88=92?= =?UTF-8?q?=E5=87=BA=E5=8A=A8=E7=94=BB=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/windows/menu-main-window.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/windows/menu-main-window.cpp b/src/windows/menu-main-window.cpp index 68d6f55..6eff5c8 100644 --- a/src/windows/menu-main-window.cpp +++ b/src/windows/menu-main-window.cpp @@ -421,6 +421,7 @@ void MenuWindow::updateCurrentScreenGeometry() int width = MenuSetting::instance()->get(MENU_WIDTH).toInt(); int height = MenuSetting::instance()->get(MENU_HEIGHT).toInt(); int margin = MenuSetting::instance()->get(MENU_MARGIN).toInt(); + UkuiQuick::WindowProxy::SlideFromEdge slideFromEdge; //上: 1, 下: 0, 左: 2, 右: 3 switch (m_panelPos) { @@ -431,6 +432,7 @@ void MenuWindow::updateCurrentScreenGeometry() QSize normalSize(qMin(fullRect.width() - margin*2, width), qMin(fullRect.height() - margin*2, height)); normalMaskRect.setTopLeft({margin, fullRect.height() - normalSize.height() - margin}); normalMaskRect.setSize(normalSize); + slideFromEdge = UkuiQuick::WindowProxy::BottomEdge; break; } case 1: { @@ -438,6 +440,7 @@ void MenuWindow::updateCurrentScreenGeometry() normalMaskRect.setTopLeft({margin, margin}); normalMaskRect.setSize({qMin(fullRect.width() - margin*2, width), qMin(fullRect.height() - margin*2, height)}); + slideFromEdge = UkuiQuick::WindowProxy::TopEdge; break; } case 2: { @@ -445,6 +448,7 @@ void MenuWindow::updateCurrentScreenGeometry() normalMaskRect.setTopLeft({margin, margin}); normalMaskRect.setSize({qMin(fullRect.width() - margin*2, width), qMin(fullRect.height() - margin*2, height)}); + slideFromEdge = UkuiQuick::WindowProxy::LeftEdge; break; } case 3: { @@ -453,6 +457,7 @@ void MenuWindow::updateCurrentScreenGeometry() QSize normalSize(qMin(fullRect.width() - margin*2, width), qMin(fullRect.height() - margin*2, height)); normalMaskRect.setTopLeft({fullRect.width() - normalSize.width() - margin, margin}); normalMaskRect.setSize(normalSize); + slideFromEdge = UkuiQuick::WindowProxy::RightEdge; break; } } @@ -460,6 +465,8 @@ void MenuWindow::updateCurrentScreenGeometry() m_normalGeometry = normalMaskRect; m_fullScreenGeometry = fullRect; + m_windowProxy->setSlideWindowArgs(slideFromEdge, 0); + Q_EMIT panelPosChanged(); Q_EMIT normalRectChanged(); }