Skip to content

Commit

Permalink
fix: 迷你模式下规避防止窗管菜单可以改变大小
Browse files Browse the repository at this point in the history
迷你模式下规避防止窗管菜单可以改变大小

Bug: https://pms.uniontech.com/bug-view-293145.html
Log: 迷你模式下规避防止窗管菜单可以改变大小
  • Loading branch information
myk1343 committed Jan 7, 2025
1 parent 0777356 commit 520703e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/common/platform/platform_mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4262,13 +4262,15 @@ void Platform_MainWindow::toggleUIMode()
QRect deskGeom = qApp->desktop()->availableGeometry(this);
move((deskGeom.width() - this->width()) / 2, (deskGeom.height() - this->height()) / 2); //迷你模式下窗口居中 by zhuyuliang
resize(geom.width(), geom.height());
setFixedSize(geom.size());

m_pMiniPlayBtn->move(sz.width() - 12 - m_pMiniPlayBtn->width(),
sz.height() - 10 - m_pMiniPlayBtn->height());
m_pMiniCloseBtn->move(sz.width() - 15 - m_pMiniCloseBtn->width(), 10);
m_pMiniQuitMiniBtn->move(14, sz.height() - 10 - m_pMiniQuitMiniBtn->height());
} else {
m_pCommHintWid->setAnchorPoint(QPoint(30, 58));
setMaximumSize(INT_MAX, INT_MAX);
setEnableSystemResize(true);
if (m_nStateBeforeMiniMode & SBEM_Maximized) {
//迷你模式切换最大化时,先恢复原来窗口大小
Expand Down

0 comments on commit 520703e

Please sign in to comment.