gpt4all/gpt4all-chat/qml/MyDialog.qml
Adam Treat 697a5f5d2a New lightmode and darkmode themes with UI revamp.
Signed-off-by: Adam Treat <treat.adam@gmail.com>
2024-01-29 12:02:51 -06:00

45 lines
1.1 KiB
QML

import QtCore
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import QtQuick.Dialogs
import QtQuick.Layouts
Dialog {
id: myDialog
property alias closeButtonVisible: myCloseButton.visible
background: Rectangle {
width: parent.width
height: parent.height
color: theme.containerBackground
border.width: 1
border.color: theme.dialogBorder
radius: 10
}
Rectangle {
id: closeBackground
z: 299
anchors.centerIn: myCloseButton
width: myCloseButton.width + 10
height: myCloseButton.height + 10
color: theme.containerBackground
}
MyToolButton {
id: myCloseButton
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();
}
}
}