Switch section delegate for standard Kirigami.ListSectionHeader
Switch section delegate for standard Kirigami.ListSectionHeader, SectionDelegate is no longer required so removed.
This commit is contained in:
@@ -19,7 +19,6 @@ ecm_add_qml_module(Timeline GENERATE_PLUGIN_SOURCE
|
|||||||
TimelineEndDelegate.qml
|
TimelineEndDelegate.qml
|
||||||
Bubble.qml
|
Bubble.qml
|
||||||
AvatarFlow.qml
|
AvatarFlow.qml
|
||||||
SectionDelegate.qml
|
|
||||||
QuickActions.qml
|
QuickActions.qml
|
||||||
TypingPane.qml
|
TypingPane.qml
|
||||||
BaseMessageComponentChooser.qml
|
BaseMessageComponentChooser.qml
|
||||||
|
|||||||
@@ -201,10 +201,9 @@ MessageDelegateBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sectionComponent: SectionDelegate {
|
sectionComponent: Kirigami.ListSectionHeader {
|
||||||
id: sectionDelegate
|
horizontalPadding: 0
|
||||||
labelText: root.section
|
text: root.section
|
||||||
colorSet: root.compactMode ? Kirigami.Theme.View : Kirigami.Theme.Window
|
|
||||||
}
|
}
|
||||||
|
|
||||||
readMarkerComponent: AvatarFlow {
|
readMarkerComponent: AvatarFlow {
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: 2019 Black Hat <bhat@encom.eu.org>
|
|
||||||
// SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.eu>
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
|
||||||
|
|
||||||
import QtQuick
|
|
||||||
import QtQuick.Controls as QQC2
|
|
||||||
import QtQuick.Layouts
|
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
|
||||||
|
|
||||||
import org.kde.neochat
|
|
||||||
|
|
||||||
QQC2.ItemDelegate {
|
|
||||||
id: root
|
|
||||||
|
|
||||||
property alias labelText: sectionLabel.text
|
|
||||||
property var maxWidth: Number.POSITIVE_INFINITY
|
|
||||||
|
|
||||||
property int colorSet: Kirigami.Theme.Window
|
|
||||||
|
|
||||||
leftPadding: 0
|
|
||||||
rightPadding: 0
|
|
||||||
topPadding: Kirigami.Units.largeSpacing
|
|
||||||
bottomPadding: 0 // Note not 0 by default
|
|
||||||
|
|
||||||
leftInset: 0
|
|
||||||
rightInset: 0
|
|
||||||
topInset: -1 // This -1 is intentional to stretch the background one more pixel to prevent a visual bug when scrolling
|
|
||||||
bottomInset: 0
|
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
|
||||||
spacing: Kirigami.Units.smallSpacing
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
Kirigami.Heading {
|
|
||||||
id: sectionLabel
|
|
||||||
level: 4
|
|
||||||
color: Kirigami.Theme.disabledTextColor
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.maximumWidth: maxWidth
|
|
||||||
}
|
|
||||||
Kirigami.Separator {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.maximumWidth: maxWidth
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
background: Rectangle {
|
|
||||||
color: NeoChatConfig.blur ? "transparent" : Kirigami.Theme.backgroundColor
|
|
||||||
Kirigami.Theme.inherit: false
|
|
||||||
Kirigami.Theme.colorSet: root.colorSet
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -69,11 +69,11 @@ TimelineDelegate {
|
|||||||
alwaysFillWidth: NeoChatConfig.compactLayout
|
alwaysFillWidth: NeoChatConfig.compactLayout
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
SectionDelegate {
|
Kirigami.ListSectionHeader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
visible: root.showSection
|
visible: root.showSection
|
||||||
labelText: root.section
|
horizontalPadding: 0
|
||||||
colorSet: NeoChatConfig.compactLayout ? Kirigami.Theme.View : Kirigami.Theme.Window
|
text: root.section
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|||||||
Reference in New Issue
Block a user