Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit e78173d

Browse files
committed
fix: the movement of btn will now be synced with resizeEvent.
1 parent ad0c01a commit e78173d

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Plain_Craft_Launcher_2/FormMain.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ def resizeEvent(self, a0: QResizeEvent):
9292
title_height = Setup().get_settings('title_height')
9393
self.ui.PanTitle.setGeometry(0, 0, self.container.width(), title_height)
9494
self.ui.PanMain.setGeometry(0, title_height, self.container.width(), self.container.height() - title_height)
95+
96+
self.ui.BtnMin.setGeometry(QRect((self.container.width() - 120), 8, 36, title_height))
97+
self.ui.BtnExit.setGeometry(QRect((self.container.width() - 72), 8, 36, title_height))
9598

9699
# 不需要单独更新页面大小,QStackedWidget 会自动调整子组件大小
97100

Plain_Craft_Launcher_2/FormMain_ui.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ def setupUi(self, FormMain: QtWidgets.QWidget):
100100
# 默认显示第一个页面
101101
self.PanMain.setCurrentIndex(0)
102102

103-
104103
self.retranslateUi(FormMain)
105104
QtCore.QMetaObject.connectSlotsByName(FormMain)
106105

0 commit comments

Comments
 (0)