fix(src/windows): 修改划出动画接口

This commit is contained in:
youdiansaodongxi 2024-06-27 17:42:31 +08:00
parent c1c77d38e1
commit 231b67a4f9
1 changed files with 7 additions and 0 deletions

View File

@ -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<int>(fullRect.width() - margin*2, width), qMin<int>(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<int>(fullRect.width() - margin*2, width), qMin<int>(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<int>(fullRect.width() - margin*2, width), qMin<int>(fullRect.height() - margin*2, height)});
slideFromEdge = UkuiQuick::WindowProxy::LeftEdge;
break;
}
case 3: {
@ -453,6 +457,7 @@ void MenuWindow::updateCurrentScreenGeometry()
QSize normalSize(qMin<int>(fullRect.width() - margin*2, width), qMin<int>(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();
}