Commit bf6b8353 authored by Niccolò Venerandi's avatar Niccolò Venerandi

Fix various bugs introduced with heading

Summary:
This fixes:
- Indented notifications line (it's back)
- Heading being non-clickable
- Buttons not being right-aligned in history
- Keyboard navigation
- Long app names

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D29234
parent 3291c451
......@@ -40,6 +40,28 @@ PlasmaComponents3.Page {
readonly property int dndEveningHour: 20
Layout.fillHeight: plasmoid.formFactor === PlasmaCore.Types.Vertical
// HACK forward focus to the list
onActiveFocusChanged: {
if (activeFocus) {
list.forceActiveFocus();
}
}
Connections {
target: plasmoid
onExpandedChanged: {
if (plasmoid.expanded) {
list.positionViewAtBeginning();
list.currentIndex = -1;
}
}
}
PlasmaCore.Svg {
id: lineSvg
imagePath: "widgets/line"
}
header: PlasmaExtras.PlasmoidHeading {
ColumnLayout {
anchors.fill: parent
......@@ -248,23 +270,6 @@ PlasmaComponents3.Page {
spacing: units.smallSpacing
// HACK forward focus to the list
onActiveFocusChanged: {
if (activeFocus) {
list.forceActiveFocus();
}
}
Connections {
target: plasmoid
onExpandedChanged: {
if (plasmoid.expanded) {
list.positionViewAtBeginning();
list.currentIndex = -1;
}
}
}
// actual notifications
PlasmaExtras.ScrollArea {
Layout.fillWidth: true
......
......@@ -92,6 +92,7 @@ RowLayout {
PlasmaExtras.DescriptiveLabel {
id: applicationNameLabel
Layout.fillWidth: true
textFormat: Text.PlainText
elide: Text.ElideLeft
text: notificationHeading.applicationName + (notificationHeading.originName ? " · " + notificationHeading.originName : "")
......
......@@ -111,16 +111,31 @@ ColumnLayout {
spacing: 0
PlasmaExtras.PlasmoidHeading {
bottomInset: 0
bottomPadding: 0
Layout.leftMargin: notificationItem.headingLeftPadding
Layout.rightMargin: notificationItem.headingRightPadding
background.visible: !notificationItem.inGroup
Item {
id: headingElement
Layout.fillWidth: true
Layout.preferredHeight: notificationHeading.implicitHeight
Layout.preferredWidth: notificationHeading.implicitWidth
PlasmaCore.FrameSvgItem {
imagePath: "widgets/plasmoidheading"
prefix: "header"
anchors {
fill: parent
topMargin: -margins.top
leftMargin: -margins.left
rightMargin: -margins.right
}
visible: !notificationItem.inGroup && fromCurrentTheme
}
NotificationHeader {
id: notificationHeading
anchors.fill: parent
anchors {
fill: parent
leftMargin: notificationItem.headingLeftPadding
rightMargin: notificationItem.headingRightPadding
}
inGroup: notificationItem.inGroup
......@@ -431,7 +446,7 @@ ColumnLayout {
State {
when: notificationItem.inGroup
PropertyChanges {
target: notificationHeading
target: headingElement
parent: summaryRow
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment