diff --git a/imports/NeoChat/Settings/AccountsPage.qml b/imports/NeoChat/Settings/AccountsPage.qml index 4d26a7d1f..918a8f8d6 100644 --- a/imports/NeoChat/Settings/AccountsPage.qml +++ b/imports/NeoChat/Settings/AccountsPage.qml @@ -23,42 +23,42 @@ Kirigami.ScrollablePage { ListView { model: AccountRegistry - delegate: Kirigami.SwipeListItem { - leftPadding: 0 - rightPadding: 0 - Kirigami.BasicListItem { - anchors.top: parent.top - anchors.bottom: parent.bottom + delegate: Kirigami.BasicListItem { + text: model.connection.localUser.displayName + labelItem.textFormat: Text.PlainText + subtitle: model.connection.localUserId + icon: model.connection.localUser.avatarMediaId ? ("image://mxc/" + model.connection.localUser.avatarMediaId) : "im-user" - text: model.connection.localUser.displayName - labelItem.textFormat: Text.PlainText - subtitle: model.connection.localUserId - icon: model.connection.localUser.avatarMediaId ? ("image://mxc/" + model.connection.localUser.avatarMediaId) : "im-user" + onClicked: { + Controller.activeConnection = model.connection + pageStack.layers.pop() + } - onClicked: { - Controller.activeConnection = model.connection - pageStack.layers.pop() + trailing: RowLayout { + Controls.ToolButton { + display: Controls.AbstractButton.IconOnly + action: Kirigami.Action { + text: i18n("Edit this account") + iconName: "document-edit" + onTriggered: { + userEditSheet.connection = model.connection + userEditSheet.open() + } + } + } + Controls.ToolButton { + display: Controls.AbstractButton.IconOnly + action: Kirigami.Action { + text: i18n("Logout") + iconName: "im-kick-user" + onTriggered: { + Controller.logout(model.connection, true) + if(Controller.accountCount === 1) + pageStack.layers.pop() + } + } } } - actions: [ - Kirigami.Action { - text: i18n("Edit this account") - iconName: "document-edit" - onTriggered: { - userEditSheet.connection = model.connection - userEditSheet.open() - } - }, - Kirigami.Action { - text: i18n("Logout") - iconName: "im-kick-user" - onTriggered: { - Controller.logout(model.connection, true) - if(Controller.accountCount === 1) - pageStack.layers.pop() - } - } - ] } } diff --git a/imports/NeoChat/Settings/DevicesPage.qml b/imports/NeoChat/Settings/DevicesPage.qml index b6b1eb580..1999dba7b 100644 --- a/imports/NeoChat/Settings/DevicesPage.qml +++ b/imports/NeoChat/Settings/DevicesPage.qml @@ -26,36 +26,35 @@ Kirigami.ScrollablePage { } } - delegate: Kirigami.SwipeListItem { - leftPadding: 0 - rightPadding: 0 - Kirigami.BasicListItem { - anchors.top: parent.top - anchors.bottom: parent.bottom - - text: model.displayName - subtitle: model.id - icon: "network-connect" - } - actions: [ - Kirigami.Action { - text: i18n("Edit device name") - iconName: "document-edit" - onTriggered: { - renameSheet.index = model.index - renameSheet.name = model.displayName - renameSheet.open() - } - }, - Kirigami.Action { - text: i18n("Logout device") - iconName: "edit-delete-remove" - onTriggered: { - passwordSheet.index = index - passwordSheet.open() + delegate: Kirigami.BasicListItem { + text: model.displayName + subtitle: model.id + icon: "network-connect" + trailing: RowLayout { + Controls.ToolButton { + display: Controls.AbstractButton.IconOnly + action: Kirigami.Action { + text: i18n("Edit device name") + iconName: "document-edit" + onTriggered: { + renameSheet.index = model.index + renameSheet.name = model.displayName + renameSheet.open() + } } } - ] + Controls.ToolButton { + display: Controls.AbstractButton.IconOnly + action: Kirigami.Action { + text: i18n("Logout device") + iconName: "edit-delete-remove" + onTriggered: { + passwordSheet.index = index + passwordSheet.open() + } + } + } + } } }