Add button in reduced room pane to go back to chat
This commit is contained in:
parent
3c0f6f60c6
commit
2f46656827
|
@ -14,24 +14,39 @@ MultiviewPane {
|
|||
|
||||
|
||||
buttonRepeater.model: [
|
||||
"members", "files", "notifications", "history", "settings"
|
||||
"back", "members", "files", "notifications", "history", "settings"
|
||||
]
|
||||
|
||||
buttonRepeater.delegate: HButton {
|
||||
visible: width > 0
|
||||
width: modelData === "back" && ! roomPane.collapse ? 0 : implicitWidth
|
||||
height: theme.baseElementsHeight
|
||||
|
||||
backgroundColor: "transparent"
|
||||
icon.name: "room-view-" + modelData
|
||||
toolTip.text: qsTr(
|
||||
modelData.charAt(0).toUpperCase() + modelData.slice(1)
|
||||
)
|
||||
icon.name:
|
||||
modelData === "back" ?
|
||||
"go-back-to-chat-from-room-pane" : "room-view-" + modelData
|
||||
|
||||
toolTip.text:
|
||||
modelData === "back" ?
|
||||
qsTr("Go back to chat") :
|
||||
qsTr(modelData.charAt(0).toUpperCase() + modelData.slice(1))
|
||||
|
||||
autoExclusive: true
|
||||
checked: swipeView.currentIndex === 0 && index === 0 ||
|
||||
swipeView.currentIndex === 1 && index === 4
|
||||
checked: swipeView.currentIndex === 0 && index === 1 ||
|
||||
swipeView.currentIndex === 1 && index === 5
|
||||
|
||||
enabled: ["members", "settings"].includes(modelData)
|
||||
enabled: ["back", "members", "settings"].includes(modelData)
|
||||
|
||||
onClicked: swipeView.currentIndex = Math.min(index, 1)
|
||||
onClicked:
|
||||
modelData === "back" ?
|
||||
roomPane.toggleFocus() :
|
||||
swipeView.currentIndex = Math.min(index, 1)
|
||||
|
||||
Behavior on width {
|
||||
enabled: modelData === "back"
|
||||
HNumberAnimation {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
3
src/icons/thin/go-back-to-chat-from-main-pane.svg
Normal file
3
src/icons/thin/go-back-to-chat-from-main-pane.svg
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m354.88329 264.09364-163.98439 163.9844c-2.34598 2.34598-5.04388 3.51897-8.09365 3.51897-3.04979 0-5.74768-1.17299-8.09364-3.51897l-17.59491-17.59489c-2.34598-2.34599-3.51897-5.04386-3.51897-8.09365 0-3.04981 1.17299-5.74766 3.51897-8.09366l138.29586-138.29584-138.29586-138.29584c-2.34598-2.34599-3.51897-5.04388-3.51897-8.09366s1.17299-5.74766 3.51897-8.09364l17.59491-17.594899c2.34596-2.345973 5.04385-3.518979 8.09364-3.518979 3.04977 0 5.74767 1.173006 8.09365 3.518979l163.98439 163.984399c2.34598 2.34598 3.51898 5.04385 3.51898 8.09364 0 3.0498-1.173 5.74767-3.51898 8.09364z" stroke-width=".351898"/>
|
||||
</svg>
|
After Width: | Height: | Size: 755 B |
3
src/icons/thin/go-back-to-chat-from-room-pane.svg
Normal file
3
src/icons/thin/go-back-to-chat-from-room-pane.svg
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m157.11671 264.09364 163.98439 163.9844c2.34598 2.34598 5.04388 3.51897 8.09365 3.51897 3.04979 0 5.74768-1.17299 8.09364-3.51897l17.59491-17.59489c2.34598-2.34599 3.51897-5.04386 3.51897-8.09365 0-3.04981-1.17299-5.74766-3.51897-8.09366l-138.29586-138.29584 138.29586-138.29584c2.34598-2.34599 3.51897-5.04388 3.51897-8.09366s-1.17299-5.74766-3.51897-8.09364l-17.59491-17.594899c-2.34596-2.345973-5.04385-3.518979-8.09364-3.518979-3.04977 0-5.74767 1.173006-8.09365 3.518979l-163.98439 163.984399c-2.34598 2.34598-3.51898 5.04385-3.51898 8.09364 0 3.0498 1.173 5.74767 3.51898 8.09364z" stroke-width=".351898"/>
|
||||
</svg>
|
After Width: | Height: | Size: 757 B |
Loading…
Reference in New Issue
Block a user