add install adn remove completed
This commit is contained in:
121
qml/dialogs/RemoveDialog.qml
Normal file
121
qml/dialogs/RemoveDialog.qml
Normal file
@@ -0,0 +1,121 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Dialog {
|
||||
id: root
|
||||
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
width: 380
|
||||
padding: 16
|
||||
modal: true
|
||||
parent: Overlay.overlay
|
||||
closePolicy: Popup.CloseOnEscape
|
||||
|
||||
property string packageName: ""
|
||||
|
||||
signal confirmed()
|
||||
|
||||
onAccepted: root.confirmed()
|
||||
|
||||
background: Rectangle {
|
||||
color: Theme.color1
|
||||
radius: 3
|
||||
border.width: 1
|
||||
border.color: Theme.color4
|
||||
}
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
spacing: 10
|
||||
|
||||
Label {
|
||||
text: "Удалить пакет?"
|
||||
color: Theme.color2
|
||||
font.pixelSize: 15
|
||||
font.bold: true
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label {
|
||||
text: root.packageName
|
||||
color: Theme.color7
|
||||
font.pixelSize: 13
|
||||
font.family: "monospace"
|
||||
wrapMode: Text.WordWrap
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label {
|
||||
text: "Пакет и его файлы будут удалены. Зависимости останутся."
|
||||
color: Theme.color14
|
||||
font.pixelSize: 12
|
||||
wrapMode: Text.WordWrap
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
implicitHeight: footerRow.implicitHeight + 22
|
||||
|
||||
RowLayout {
|
||||
id: footerRow
|
||||
anchors.fill: parent
|
||||
anchors.rightMargin: 18
|
||||
spacing: 8
|
||||
|
||||
Item { Layout.fillWidth: true }
|
||||
|
||||
Button {
|
||||
id: cancelButton
|
||||
text: "✕ Отмена"
|
||||
leftPadding: 14
|
||||
rightPadding: 14
|
||||
topPadding: 8
|
||||
bottomPadding: 8
|
||||
|
||||
onClicked: root.reject()
|
||||
|
||||
background: Rectangle {
|
||||
radius: 4
|
||||
color: cancelButton.down ? Theme.color4 : cancelButton.hovered ? Theme.color4 : Theme.colorTransparent
|
||||
border.width: 1
|
||||
border.color: Theme.color4
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
text: cancelButton.text
|
||||
font.pixelSize: 13
|
||||
color: Theme.color2
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: removeButton
|
||||
text: "✓ Удалить"
|
||||
leftPadding: 14
|
||||
rightPadding: 14
|
||||
topPadding: 8
|
||||
bottomPadding: 8
|
||||
|
||||
onClicked: root.accept()
|
||||
|
||||
background: Rectangle {
|
||||
radius: 4
|
||||
color: removeButton.down ? Theme.color11 : removeButton.hovered ? Theme.color6 : Theme.color10
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
text: removeButton.text
|
||||
font.pixelSize: 13
|
||||
font.bold: true
|
||||
color: Theme.color8
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user