FluentUI/Gallery/res/qml/component/base/MyDialogWindow.qml
yxdy ff15075c79
Some checks are pending
Gallery App Build / macOS (push) Waiting to run
Gallery App Build / Windows (push) Waiting to run
Gallery App Build / Ubuntu (push) Waiting to run
修改样式
2025-03-07 16:23:09 +08:00

59 lines
1.7 KiB
QML

import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import FluentUI.Controls
import FluentUI.impl
Window {
id: control
default property alias content: content_dialog.contentData
property alias dialog: content_dialog
property alias standardButtons: content_dialog.standardButtons
flags: Qt.FramelessWindowHint | Qt.Window
visible: dialog.visible
width: content_dialog.implicitWidth
height: content_dialog.implicitHeight
FluentUI.radius: 8
FluentUI.theme: Theme.of(control)
FluentUI.dark: Theme.dark
FluentUI.primaryColor: Theme.primaryColor
color: Colors.transparent
MyContentDialog{
id: content_dialog
title: control.title
background: Rectangle {
color: "#191919"
radius: 8
Rectangle{
anchors.fill: parent
anchors.leftMargin: 10
anchors.rightMargin: 10
anchors.topMargin: 10
anchors.bottomMargin: 10
color: "#282828"
border.color: control.FluentUI.theme.res.dividerStrokeColorDefault
radius: 8
Rectangle{
width: parent.width
height: 50
color: "transparent"
MouseArea{
anchors.fill: parent
cursorShape: Qt.SizeAllCursor
onPositionChanged: {
control.startSystemMove()
}
}
}
}
}
}
function close(){
content_dialog.close()
}
function open(){
content_dialog.open()
}
}