feat(StatusQ/Controls): introducing StatusBackButton

Closes: https://github.com/status-im/status-desktop/issues/6727
This commit is contained in:
Alexandra Betouni 2022-08-02 13:40:18 +03:00 committed by Michał Cieślak
parent d999cb5d88
commit de6ac27fc7
9 changed files with 19 additions and 39 deletions

View File

@ -174,9 +174,7 @@ Rectangle {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.name: "arrow-left"
type: StatusMenuItem.Type.Danger
}
}

View File

@ -223,9 +223,7 @@ Column {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.name: "arrow-left"
type: StatusMenuItem.Type.Danger
}
}
@ -308,9 +306,7 @@ Column {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.name: "arrow-left"
type: StatusMenuItem.Type.Danger
}
}
@ -398,9 +394,7 @@ Column {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.name: "arrow-left"
type: StatusMenuItem.Type.Danger
}
}
@ -493,9 +487,7 @@ Column {
StatusMenuItem {
text: qsTr("Leave Community")
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.name: "arrow-left"
type: StatusMenuItem.Type.Danger
}
}

View File

@ -119,10 +119,7 @@ Column {
header.subTitle: "Subtitle"
header.image.source: "qrc:/demoapp/data/profile-image-1.jpeg"
leftButtons: [
StatusRoundButton {
icon.name: "arrow-right"
rotation: 180
}
StatusBackButton { }
]
rightButtons: [
StatusButton {
@ -152,10 +149,7 @@ Column {
}
leftButtons: [
StatusRoundButton {
icon.name: "arrow-right"
rotation: 180
}
StatusBackButton { }
]
rightButtons: [
StatusButton {
@ -183,10 +177,7 @@ Column {
]
leftButtons: [
StatusRoundButton {
icon.name: "arrow-right"
rotation: 180
}
StatusBackButton { }
]
contentItem: StatusBaseText {

View File

@ -103,8 +103,7 @@ StatusModal {
anchors.horizontalCenter: parent.horizontalCenter
statusListItemTitle.font.pixelSize: 17
title: "Leave community"
icon.name: "arrow-right"
icon.rotation: 180
icon.name: "arrow-left"
type: StatusListItem.Type.Secondary
}
}

View File

@ -199,9 +199,7 @@ StatusAppThreePanelLayout {
StatusMenuItem {
text: "Leave Chat"
icon.name: "arrow-right"
icon.width: 14
iconRotation: 180
icon.name: "arrow-left"
type: StatusMenuItem.Type.Danger
}
}

View File

@ -0,0 +1,6 @@
import QtQuick 2.14
import StatusQ.Controls 0.1
StatusRoundButton {
icon.name: "arrow-left"
}

View File

@ -50,3 +50,4 @@ StatusScrollBar 0.1 StatusScrollBar.qml
StatusComboBox 0.1 StatusComboBox.qml
StatusItemDelegate 0.1 StatusItemDelegate.qml
StatusTextArea 0.1 StatusTextArea.qml
StatusBackButton 0.1 StatusBackButton.qml

View File

@ -33,8 +33,7 @@ import "statusModal" as Spares
leftButtons: [
StatusRoundButton {
icon.name: "arrow-right"
rotation: 180
icon.name: "arrow-left"
}
]
rightButtons: [

View File

@ -52,12 +52,8 @@ StatusModal {
? replaceLoader.item.title : stackTitle
padding: 16
leftButtons: StatusRoundButton {
leftButtons: StatusBackButton {
id: backButton
icon.name: "arrow-right"
icon.width: 20
icon.height: 16
rotation: 180
visible: replaceItem || stackLayout.currentIndex > 0
onClicked: {
if (replaceItem) {