gpt4all/gpt4all-chat/qml/MyDialog.qml

36 lines
865 B
QML
Raw Normal View History

2023-07-06 10:53:43 -04:00
import QtCore
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import QtQuick.Dialogs
import QtQuick.Layouts
Dialog {
id: myDialog
2023-07-09 14:56:54 -04:00
property alias closeButtonVisible: myCloseButton.visible
2023-07-06 10:53:43 -04:00
background: Rectangle {
width: parent.width
height: parent.height
color: theme.backgroundDarkest
border.width: 1
border.color: theme.dialogBorder
radius: 10
}
MyToolButton {
2023-07-09 14:56:54 -04:00
id: myCloseButton
2023-07-06 10:53:43 -04:00
x: 0 + myDialog.width - myDialog.padding - width - 15
y: 0 - myDialog.padding + 15
z: 300
visible: myDialog.closePolicy != Popup.NoAutoClose
width: 30
height: 30
padding: 0
source: "qrc:/gpt4all/icons/close.svg"
fillMode: Image.PreserveAspectFit
onClicked: {
myDialog.close();
}
}
}