Commit 589054f2 authored by Nate Graham's avatar Nate Graham
Browse files

Remove some unnecessary Rectangles

Some (but not all) of the individual views had their own background
color Rectangles. but this was not necessary because the main window
itself already provided one.
parent f0d869db
Pipeline #119929 passed with stage
in 6 minutes and 27 seconds
......@@ -242,68 +242,61 @@ RowLayout {
onClicked: goBack()
}
Rectangle {
radius: 3
color: myPalette.base
StackView {
id: browseStackView
anchors.fill: parent
StackView {
id: browseStackView
clip: true
anchors.fill: parent
clip: true
initialItem: Item {
}
initialItem: Item {
}
popEnter: Transition {
OpacityAnimator {
from: 0.0
to: 1.0
duration: Kirigami.Units.longDuration
}
popEnter: Transition {
OpacityAnimator {
from: 0.0
to: 1.0
duration: Kirigami.Units.longDuration
}
}
popExit: Transition {
OpacityAnimator {
from: 1.0
to: 0.0
duration: Kirigami.Units.longDuration
}
popExit: Transition {
OpacityAnimator {
from: 1.0
to: 0.0
duration: Kirigami.Units.longDuration
}
}
pushEnter: Transition {
OpacityAnimator {
from: 0.0
to: 1.0
duration: Kirigami.Units.longDuration
}
pushEnter: Transition {
OpacityAnimator {
from: 0.0
to: 1.0
duration: Kirigami.Units.longDuration
}
}
pushExit: Transition {
OpacityAnimator {
from: 1.0
to: 0.0
duration: Kirigami.Units.longDuration
}
pushExit: Transition {
OpacityAnimator {
from: 1.0
to: 0.0
duration: Kirigami.Units.longDuration
}
}
replaceEnter: Transition {
OpacityAnimator {
from: 0.0
to: 1.0
duration: Kirigami.Units.longDuration
}
replaceEnter: Transition {
OpacityAnimator {
from: 0.0
to: 1.0
duration: Kirigami.Units.longDuration
}
}
replaceExit: Transition {
OpacityAnimator {
from: 1.0
to: 0.0
duration: Kirigami.Units.longDuration
}
replaceExit: Transition {
OpacityAnimator {
from: 1.0
to: 0.0
duration: Kirigami.Units.longDuration
}
}
}
......
......@@ -139,50 +139,44 @@ FocusScope {
}
}
Rectangle {
color: myPalette.base
ScrollView {
Layout.fillHeight: true
Layout.fillWidth: true
ScrollView {
anchors.fill: parent
contentItem: ListView {
id: contentDirectoryView
contentItem: ListView {
id: contentDirectoryView
Accessible.role: Accessible.List
Accessible.name: mainTitle
Accessible.description: mainTitle
Accessible.role: Accessible.List
Accessible.name: mainTitle
Accessible.description: mainTitle
activeFocusOnTab: true
keyNavigationEnabled: true
activeFocusOnTab: true
keyNavigationEnabled: true
reuseItems: true
reuseItems: true
model: delegateModel
model: delegateModel
// HACK: setting currentIndex to -1 in mobile for some reason causes segfaults, no idea why
currentIndex: Kirigami.Settings.isMobile ? 0 : -1
// HACK: setting currentIndex to -1 in mobile for some reason causes segfaults, no idea why
currentIndex: Kirigami.Settings.isMobile ? 0 : -1
section.property: (showSection ? 'discNumber' : '')
section.criteria: ViewSection.FullString
section.labelPositioning: ViewSection.InlineLabels
section.delegate: TracksDiscHeader {
discNumber: section
width: contentDirectoryView.width
}
section.property: (showSection ? 'discNumber' : '')
section.criteria: ViewSection.FullString
section.labelPositioning: ViewSection.InlineLabels
section.delegate: TracksDiscHeader {
discNumber: section
width: contentDirectoryView.width
}
Kirigami.PlaceholderMessage {
anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 4)
visible: contentDirectoryView.count === 0 && !suppressNoDataPlaceholderMessage
text: i18n("Nothing to display")
}
Kirigami.PlaceholderMessage {
anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 4)
visible: contentDirectoryView.count === 0 && !suppressNoDataPlaceholderMessage
text: i18n("Nothing to display")
}
onCountChanged: if (count === 0) {
currentIndex = -1;
}
onCountChanged: if (count === 0) {
currentIndex = -1;
}
}
}
......
Supports Markdown
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