fix: 设置弹框移除底部关闭按钮、禁止拖拽缩放、标题栏可拖动
- 移除底部「关闭」按钮(保留标题栏 × 按钮关闭窗口) - 设置 minimumWidth/maximumWidth/minimumHeight/maximumHeight 固定窗口尺寸 340x450,禁止拖拽改变宽高 - 标题栏 MouseArea 已有 drag.target: settingsWindow 拖动能力
This commit is contained in:
+4
-25
@@ -727,6 +727,10 @@ AppletItem {
|
||||
id: settingsWindow
|
||||
width: 340
|
||||
height: 450
|
||||
minimumWidth: 340
|
||||
maximumWidth: 340
|
||||
minimumHeight: 450
|
||||
maximumHeight: 450
|
||||
visible: false
|
||||
flags: Qt.FramelessWindowHint | Qt.Window
|
||||
// NonModal:不阻塞桌面其他区域,用户可同时操作任务栏
|
||||
@@ -939,32 +943,7 @@ AppletItem {
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭按钮
|
||||
Rectangle {
|
||||
id: bottomCloseButton
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
color: bottomCloseMouse.containsMouse ? root.accentBlueLight : "#ffffff"
|
||||
radius: 10
|
||||
border.width: 1
|
||||
border.color: bottomCloseMouse.containsMouse ? root.accentBlue : "#e0e0e0"
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: qsTr("关闭")
|
||||
font.pixelSize: 13
|
||||
font.weight: Font.Medium
|
||||
color: bottomCloseMouse.containsMouse ? root.accentBlue : "#333333"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: bottomCloseMouse
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: settingsWindow.hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user