fix: remove possibility to click through the top bar on messages
Fixes #1942 Also cleans up a little the ChatColumn abuse of rows
This commit is contained in:
parent
4cb6a5b01d
commit
90d7f65369
|
@ -123,24 +123,20 @@ StackLayout {
|
|||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: timer
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 0
|
||||
|
||||
RowLayout {
|
||||
id: chatTopBar
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
z: 60
|
||||
spacing: 0
|
||||
TopBar {
|
||||
id: topBar
|
||||
}
|
||||
z: 60
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
z: 60
|
||||
Rectangle {
|
||||
Component.onCompleted: {
|
||||
isConnected = chatsModel.isOnline
|
||||
|
@ -150,8 +146,10 @@ StackLayout {
|
|||
}
|
||||
|
||||
id: connectedStatusRect
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
height: 40;
|
||||
z: 60
|
||||
height: 40
|
||||
color: isConnected ? Style.current.green : Style.current.darkGrey
|
||||
visible: false
|
||||
Text {
|
||||
|
@ -165,11 +163,6 @@ StackLayout {
|
|||
//% "Disconnected"
|
||||
qsTrId("disconnected")
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: timer
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: chatsModel
|
||||
|
@ -187,26 +180,11 @@ StackLayout {
|
|||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: chatContainer
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
spacing: 0
|
||||
|
||||
Connections {
|
||||
target: chatsModel
|
||||
onActiveChannelChanged: {
|
||||
stackLayoutChatMessages.currentIndex = chatsModel.getMessageListIndex(chatsModel.activeChannelIndex)
|
||||
if(stackLayoutChatMessages.currentIndex > -1 && !stackLayoutChatMessages.children[stackLayoutChatMessages.currentIndex].active){
|
||||
stackLayoutChatMessages.children[stackLayoutChatMessages.currentIndex].active = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
StackLayout {
|
||||
id: stackLayoutChatMessages
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
clip: true
|
||||
Repeater {
|
||||
model: chatsModel
|
||||
Loader {
|
||||
|
@ -217,9 +195,16 @@ StackLayout {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: chatsModel
|
||||
onActiveChannelChanged: {
|
||||
stackLayoutChatMessages.currentIndex = chatsModel.getMessageListIndex(chatsModel.activeChannelIndex)
|
||||
if(stackLayoutChatMessages.currentIndex > -1 && !stackLayoutChatMessages.children[stackLayoutChatMessages.currentIndex].active){
|
||||
stackLayoutChatMessages.children[stackLayoutChatMessages.currentIndex].active = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
StatusImageModal {
|
||||
|
|
Loading…
Reference in New Issue