fix(ActivityCenter): Fader for AC tabs header

Close #8310
This commit is contained in:
MishkaRogachev 2022-11-18 13:22:07 +04:00 committed by Mikhail Rogachev
parent e233771e6c
commit 1e6e138be7
1 changed files with 30 additions and 26 deletions

View File

@ -40,8 +40,15 @@ Item {
anchors.rightMargin: Style.current.padding
spacing: Style.current.padding
StatusListView {
id: listView
StatusRollArea {
Layout.preferredHeight: innerRow.implicitHeight
Layout.fillWidth: true
content: RowLayout {
id: innerRow
spacing: 0
Repeater {
// NOTE: some entries are hidden until implimentation
model: [ { text: qsTr("All"), category: ActivityCenterPopup.ActivityCategory.All, visible: true, enabled: true },
{ text: qsTr("Admin"), category: ActivityCenterPopup.ActivityCategory.Admin, visible: root.hasAdmin, enabled: root.hasAdmin },
@ -52,13 +59,8 @@ Item {
{ text: qsTr("Transactions"), category: ActivityCenterPopup.ActivityCategory.Transactions, visible: false, enabled: true },
{ text: qsTr("Membership"), category: ActivityCenterPopup.ActivityCategory.Membership, visible: true, enabled: root.hasMembership },
{ text: qsTr("System"), category: ActivityCenterPopup.ActivityCategory.System, visible: false, enabled: true } ]
orientation: StatusListView.Horizontal
spacing: 0
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
Layout.fillWidth: true
Layout.fillHeight: true
delegate: StatusFlatButton {
StatusFlatButton {
enabled: modelData.enabled
visible: modelData.visible
width: visible ? implicitWidth : 0
@ -70,6 +72,8 @@ Item {
onEnabledChanged: if (!enabled && highlighted) root.categoryTriggered(ActivityCenterPopup.ActivityCategory.All)
}
}
}
}
StatusFlatRoundButton {
id: markAllReadBtn