Lukáš Tinkl d9d6d90dc9 [Style] remove legacy Style and its themes
- legacy Style and ThemePalette removed
- moved and deduplicated font definitions into `Theme` (unrelated to a
color palette)
- `Style.current.foo` -> `Theme.foo`
- `Style.current.fooColor` -> `Theme.palette.fooColor`
- upgrade the imports to 5.15
- removed some mode dead components

Fixes #16514
2024-10-22 15:54:31 +02:00

60 lines
1.6 KiB
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import utils 1.0
Control {
id: root
property string name
property int membersCount
property url image
property color color
property bool amISectionAdmin
property bool openCreateChat
signal infoButtonClicked
signal adHocChatButtonClicked
padding: Theme.halfPadding
rightPadding: Theme.padding
topPadding: Theme.smallPadding
contentItem: RowLayout {
StatusChatInfoButton {
objectName: "communityHeaderButton"
Layout.fillWidth: true
title: root.name
subTitle: qsTr("%n member(s)", "", root.membersCount)
asset.name: root.image
asset.color: root.color
asset.isImage: true
type: StatusChatInfoButton.Type.OneToOneChat
hoverEnabled: root.amISectionAdmin
onClicked: if(root.amISectionAdmin) root.infoButtonClicked()
}
StatusIconTabButton {
objectName: "startChatButton"
icon.name: "edit"
icon.color: Theme.palette.directColor1
Layout.alignment: Qt.AlignVCenter
checked: root.openCreateChat
highlighted: root.openCreateChat
onClicked: root.adHocChatButtonClicked()
StatusToolTip {
text: qsTr("Start chat")
visible: parent.hovered
orientation: StatusToolTip.Orientation.Bottom
y: parent.height + 12
}
}
}
}