mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-04-29 04:04:22 +00:00
Signed-off-by: Jared Van Bortel <jared@nomic.ai> Signed-off-by: Adam Treat <treat.adam@gmail.com> Co-authored-by: Adam Treat <treat.adam@gmail.com>
60 lines
1.6 KiB
QML
60 lines
1.6 KiB
QML
import QtCore
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Controls.Basic
|
|
import QtQuick.Layouts
|
|
|
|
MyDialog {
|
|
id: confirmationDialog
|
|
anchors.centerIn: parent
|
|
modal: true
|
|
padding: 20
|
|
property alias dialogTitle: titleText.text
|
|
property alias description: descriptionText.text
|
|
|
|
Theme { id: theme }
|
|
|
|
contentItem: ColumnLayout {
|
|
Text {
|
|
id: titleText
|
|
Layout.alignment: Qt.AlignHCenter
|
|
textFormat: Text.StyledText
|
|
color: theme.textColor
|
|
font.pixelSize: theme.fontSizeLarger
|
|
font.bold: true
|
|
}
|
|
|
|
Text {
|
|
id: descriptionText
|
|
Layout.alignment: Qt.AlignHCenter
|
|
textFormat: Text.StyledText
|
|
color: theme.textColor
|
|
font.pixelSize: theme.fontSizeMedium
|
|
}
|
|
}
|
|
|
|
footer: DialogButtonBox {
|
|
id: dialogBox
|
|
padding: 20
|
|
alignment: Qt.AlignRight
|
|
spacing: 10
|
|
MySettingsButton {
|
|
text: qsTr("OK")
|
|
textColor: theme.mediumButtonText
|
|
backgroundColor: theme.mediumButtonBackground
|
|
backgroundColorHovered: theme.mediumButtonBackgroundHovered
|
|
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
|
}
|
|
MySettingsButton {
|
|
text: qsTr("Cancel")
|
|
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
|
}
|
|
background: Rectangle {
|
|
color: "transparent"
|
|
}
|
|
Keys.onEnterPressed: confirmationDialog.accept()
|
|
Keys.onReturnPressed: confirmationDialog.accept()
|
|
}
|
|
Component.onCompleted: dialogBox.forceActiveFocus()
|
|
}
|