added a new feature to delete existing version\profile

This commit is contained in:
2026-06-15 00:22:27 +03:00
parent 4bf16a183f
commit 2d35c613a9
5 changed files with 74 additions and 2 deletions
+46
View File
@@ -190,6 +190,7 @@ Window {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
leftPadding: 8
rightPadding: 36
}
background: Rectangle {
color: (profileBox.currentIndex === profileItem.index || profileItem.hovered)
@@ -200,6 +201,28 @@ Window {
profileBox.currentIndex = profileItem.index
profileBox.popup.close()
}
// ── Корзина — видна при наведении на строку ─────
Image {
id: profileTrash
width: 16; height: 16
anchors.right: parent.right
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
visible: profileItem.hovered
opacity: profileTrashArea.containsMouse ? 1.0 : 0.7
source: "images/Trash.svg"
sourceSize.width: 16; sourceSize.height: 16
fillMode: Image.PreserveAspectFit
MouseArea {
id: profileTrashArea
anchors.fill: parent
anchors.margins: -6
hoverEnabled: true
onClicked: backend.removeProfile(profileItem.index)
}
}
}
ScrollIndicator.vertical: ScrollIndicator {
@@ -331,6 +354,7 @@ Window {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
leftPadding: 8
rightPadding: 36
}
background: Rectangle {
color: (versionBox.currentIndex === versionItem.index || versionItem.hovered)
@@ -341,6 +365,28 @@ Window {
versionBox.currentIndex = versionItem.index
versionBox.popup.close()
}
// ── Корзина — видна при наведении на строку ─────
Image {
id: versionTrash
width: 16; height: 16
anchors.right: parent.right
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
visible: versionItem.hovered
opacity: versionTrashArea.containsMouse ? 1.0 : 0.7
source: "images/Trash.svg"
sourceSize.width: 16; sourceSize.height: 16
fillMode: Image.PreserveAspectFit
MouseArea {
id: versionTrashArea
anchors.fill: parent
anchors.margins: -6
hoverEnabled: true
onClicked: backend.removeVersion(versionItem.index)
}
}
}
ScrollIndicator.vertical: ScrollIndicator {