diff --git a/src/qml/ActiveChat.qml b/src/qml/ActiveChat.qml --- a/src/qml/ActiveChat.qml +++ b/src/qml/ActiveChat.qml @@ -26,6 +26,7 @@ ListView { id: activeChat + clip: true signal openDirectChannel(string userName) signal jitsiCallConfActivated() diff --git a/src/qml/MainComponent.qml b/src/qml/MainComponent.qml --- a/src/qml/MainComponent.qml +++ b/src/qml/MainComponent.qml @@ -73,13 +73,18 @@ Item { Layout.fillWidth: true } + ToolButton { + id: showUsersButton + text: i18n("Users") + checkable: true + } ToolButton { iconName: "settings-configure" onClicked: menu.open(); QQC2.Menu { id: menu y: parent.height - + QQC2.MenuItem { text: i18n("Create New Channel") onTriggered: { @@ -173,6 +178,43 @@ opacity: .5 visible: appid.selectedRoom } + Flow { + id: topBarUserList + readonly property bool isActive: showUsersButton.checked + anchors { + left: parent.left + right: parent.right + margins: Kirigami.Units.smallSpacing + } + opacity: topBarUserList.isActive ? 1 : 0 + Behavior on opacity { NumberAnimation { duration: 650; easing.type: Easing.InOutQuad } } + + Repeater { + model: parent.opacity > 0.5 ? appid.userModel : 0 + RowLayout { + Kirigami.Icon { + source: model.iconstatus + //FIXME + height: 22 + width: 22 + } + Text { + text: model.username === "" ? model.name : model.username + } + } + } + Item { + width: parent.width + height: topBarUserList.isActive ? 1 : 0 + Rectangle { + height: parent.height + width: height > 0 ? parent.width : 0 + anchors.centerIn: parent + Behavior on width { NumberAnimation { duration: 650; easing.type: Easing.InOutQuad } } + color: Kirigami.Theme.textColor + } + } + } } Clipboard { id: clipboard