Add a button to the collections dialog. Fix close button.

This commit is contained in:
Adam Treat 2023-11-22 09:10:44 -05:00
parent e4ff972522
commit a328f9ed3f
4 changed files with 28 additions and 1 deletions

View File

@ -431,6 +431,10 @@ Window {
CollectionsDialog {
id: collectionsDialog
anchors.centerIn: parent
onAddRemoveClicked: {
settingsDialog.pageToDisplay = 2;
settingsDialog.open();
}
}
MyToolButton {

View File

@ -15,6 +15,7 @@ MyDialog {
width: 480
height: 640
signal addRemoveClicked
property var currentChat: ChatListModel.currentChat
Label {
@ -30,7 +31,8 @@ MyDialog {
id: scrollView
anchors.top: listLabel.bottom
anchors.topMargin: 20
anchors.bottom: parent.bottom
anchors.bottom: collectionSettings.top
anchors.bottomMargin: 20
anchors.left: parent.left
anchors.right: parent.right
clip: true
@ -120,4 +122,15 @@ MyDialog {
}
}
}
MyButton {
id: collectionSettings
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Add & Remove")
font.pixelSize: theme.fontSizeLarger
onClicked: {
addRemoveClicked()
}
}
}

View File

@ -17,6 +17,15 @@ Dialog {
radius: 10
}
Rectangle {
id: closeBackground
z: 299
anchors.centerIn: myCloseButton
width: myCloseButton.width + 10
height: myCloseButton.height + 10
color: theme.backgroundDarkest
}
MyToolButton {
id: myCloseButton
x: 0 + myDialog.width - myDialog.padding - width - 15

View File

@ -20,6 +20,7 @@ MyDialog {
}
signal downloadClicked
property alias pageToDisplay: listView.currentIndex
Item {
Accessible.role: Accessible.Dialog