added a new feature to delete existing version\profile
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user