Make UserInfo work in compact mode. This includes showing the account switch popup in a dialog BUG: 482261
42 lines
941 B
QML
42 lines
941 B
QML
// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
|
|
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
|
|
import QtQuick
|
|
import QtQuick.Controls as QQC2
|
|
import QtQuick.Layouts
|
|
|
|
import org.kde.kirigami as Kirigami
|
|
|
|
import org.kde.neochat
|
|
|
|
QQC2.ToolBar {
|
|
id: root
|
|
|
|
/**
|
|
* @brief The connection for the current user.
|
|
*/
|
|
required property NeoChatConnection connection
|
|
|
|
property bool collapsed: false
|
|
|
|
padding: 0
|
|
|
|
background: Rectangle {
|
|
color: Kirigami.Theme.backgroundColor
|
|
Kirigami.Theme.colorSet: Kirigami.Theme.Window
|
|
Kirigami.Theme.inherit: false
|
|
}
|
|
|
|
contentItem: ColumnLayout {
|
|
spacing: 0
|
|
Kirigami.Separator {
|
|
Layout.fillWidth: true
|
|
}
|
|
UserInfo {
|
|
collapsed: root.collapsed
|
|
bottomEdge: true
|
|
connection: root.connection
|
|
}
|
|
}
|
|
}
|