- hypr/apps.lua - hypr/autostart.lua - hypr/envs.lua - hypr/hyprland.lua - hypr/hyprsunset.conf - hypr/input.lua - hypr/looknfeel.lua - hypr/omasettings.lua - hypr/xdph.conf - omarchy/branding/about.txt - omarchy/branding/screensaver.txt - omarchy/extensions/omarchy-menu.jsonc - omarchy/hooks/battery-low.d/play-warning-sound.sample - omarchy/hooks/font-set.d/show-font-notification.sample - omarchy/hooks/post-boot.d/weather.sample - omarchy/hooks/post-update.d/install-voxtype.hook - omarchy/hooks/post-update.d/setup-agent.hook - omarchy/hooks/post-update.d/setup-fingerprint.hook - omarchy/hooks/post-update.d/show-update-notification.sample - omarchy/hooks/pre-refresh-pacman.d/add-custom-repo.sample - omarchy/hooks/theme-set.d/show-theme-notification.sample - omarchy/shell.json - omarchy/shell.toml - omarchy/theme.name - omarchy/themes/azure-glow/README.md - omarchy/themes/azure-glow/alacritty.toml - omarchy/themes/azure-glow/btop.theme - omarchy/themes/azure-glow/hyprland.conf - omarchy/themes/azure-glow/hyprlock.conf - omarchy/themes/azure-glow/icons.theme - … 269 more
116 lines
2.9 KiB
QML
116 lines
2.9 KiB
QML
pragma ComponentBehavior: Bound
|
|
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import qs.Commons
|
|
import qs.Ui
|
|
|
|
Rectangle {
|
|
id: dialog
|
|
|
|
required property bool open
|
|
required property string title
|
|
required property string message
|
|
required property string confirmText
|
|
required property color foreground
|
|
required property string fontFamily
|
|
required property color panelBackground
|
|
|
|
property bool dismissEnabled: true
|
|
property real maximumWidth: Style.space(360)
|
|
property color borderColor: Style.selectedStateColor(foreground, Color.accent)
|
|
property color confirmForeground: foreground
|
|
property color confirmAccent: Color.accent
|
|
property bool confirmBordered: false
|
|
property int titleWrapMode: Text.NoWrap
|
|
|
|
signal cancelRequested
|
|
signal confirmRequested
|
|
|
|
visible: open
|
|
color: Util.alpha(panelBackground, 0.7)
|
|
focus: true
|
|
Keys.priority: Keys.BeforeItem
|
|
Keys.onEscapePressed: {
|
|
if (dialog.dismissEnabled) dialog.cancelRequested()
|
|
}
|
|
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
onClicked: {
|
|
if (dialog.dismissEnabled) dialog.cancelRequested()
|
|
}
|
|
}
|
|
|
|
Rectangle {
|
|
id: card
|
|
|
|
anchors.centerIn: parent
|
|
width: Math.min(parent.width - Style.space(32), dialog.maximumWidth)
|
|
height: content.implicitHeight + Style.space(36)
|
|
color: dialog.panelBackground
|
|
radius: Style.cornerRadius
|
|
border.color: dialog.borderColor
|
|
border.width: 1
|
|
|
|
ColumnLayout {
|
|
id: content
|
|
|
|
anchors.fill: parent
|
|
anchors.margins: Style.space(18)
|
|
spacing: Style.space(12)
|
|
|
|
Text {
|
|
text: dialog.title
|
|
textFormat: Text.PlainText
|
|
color: dialog.foreground
|
|
font.family: dialog.fontFamily
|
|
font.pixelSize: Style.font.title
|
|
font.bold: true
|
|
Layout.fillWidth: true
|
|
wrapMode: dialog.titleWrapMode
|
|
}
|
|
|
|
Text {
|
|
text: dialog.message
|
|
textFormat: Text.PlainText
|
|
color: Qt.darker(dialog.foreground, 1.6)
|
|
font.family: dialog.fontFamily
|
|
font.pixelSize: Style.font.bodySmall
|
|
Layout.fillWidth: true
|
|
wrapMode: Text.WordWrap
|
|
}
|
|
|
|
RowLayout {
|
|
Layout.fillWidth: true
|
|
|
|
Item { Layout.fillWidth: true }
|
|
|
|
Button {
|
|
text: "Cancel"
|
|
foreground: dialog.foreground
|
|
accent: Color.accent
|
|
fontFamily: dialog.fontFamily
|
|
fontSize: Style.font.bodySmall
|
|
horizontalPadding: Style.space(12)
|
|
verticalPadding: Style.space(6)
|
|
onClicked: dialog.cancelRequested()
|
|
}
|
|
|
|
Button {
|
|
text: dialog.confirmText
|
|
bordered: dialog.confirmBordered
|
|
foreground: dialog.confirmForeground
|
|
accent: dialog.confirmAccent
|
|
fontFamily: dialog.fontFamily
|
|
fontSize: Style.font.bodySmall
|
|
horizontalPadding: Style.space(12)
|
|
verticalPadding: Style.space(6)
|
|
onClicked: dialog.confirmRequested()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|