mirror of https://github.com/KDE/kasts.git
Move feed update action to header on desktop
The refresh buttons currently show up as main action buttons at the bottom on desktop since they are placed inside SwipeViews/tabs. Move these actions to the hierarchical parent ScrollablePages so they end up in the header bar.
This commit is contained in:
parent
ef2df0ef11
commit
eec54d3095
|
@ -19,6 +19,13 @@ Kirigami.Page {
|
|||
title: i18n("Downloads")
|
||||
padding: 0
|
||||
|
||||
actions.main: Kirigami.Action {
|
||||
iconName: "view-refresh"
|
||||
text: i18n("Refresh All Podcasts")
|
||||
visible: !Kirigami.Settings.isMobile
|
||||
onTriggered: Fetcher.fetchAll()
|
||||
}
|
||||
|
||||
header: Loader {
|
||||
id: headerLoader
|
||||
active: !Kirigami.Settings.isMobile
|
||||
|
@ -57,9 +64,16 @@ Kirigami.Page {
|
|||
}
|
||||
}
|
||||
|
||||
Controls.SwipeView {
|
||||
contentItem: Controls.SwipeView {
|
||||
id: swipeView
|
||||
anchors.fill: parent
|
||||
|
||||
anchors {
|
||||
top: page.header.bottom
|
||||
right: page.right
|
||||
left: page.left
|
||||
bottom: page.footer.top
|
||||
}
|
||||
|
||||
currentIndex: Kirigami.Settings.isMobile ? footerLoader.item.currentIndex : headerLoader.item.currentIndex
|
||||
|
||||
EpisodeListPage {
|
||||
|
|
|
@ -30,7 +30,7 @@ Kirigami.ScrollablePage {
|
|||
iconName: "view-refresh"
|
||||
text: i18n("Refresh All Podcasts")
|
||||
onTriggered: refreshing = true
|
||||
visible: !Kirigami.Settings.isMobile || episodeList.count === 0
|
||||
visible: Kirigami.Settings.isMobile && episodeList.count === 0
|
||||
}
|
||||
|
||||
Kirigami.PlaceholderMessage {
|
||||
|
|
|
@ -19,6 +19,13 @@ Kirigami.Page {
|
|||
title: i18n("Episode List")
|
||||
padding: 0
|
||||
|
||||
actions.main: Kirigami.Action {
|
||||
iconName: "view-refresh"
|
||||
text: i18n("Refresh All Podcasts")
|
||||
visible: !Kirigami.Settings.isMobile
|
||||
onTriggered: Fetcher.fetchAll()
|
||||
}
|
||||
|
||||
header: Loader {
|
||||
id: headerLoader
|
||||
active: !Kirigami.Settings.isMobile
|
||||
|
@ -52,9 +59,16 @@ Kirigami.Page {
|
|||
}
|
||||
}
|
||||
|
||||
Controls.SwipeView {
|
||||
contentItem: Controls.SwipeView {
|
||||
id: swipeView
|
||||
anchors.fill: parent
|
||||
|
||||
anchors {
|
||||
top: page.header.bottom
|
||||
right: page.right
|
||||
left: page.left
|
||||
bottom: page.footer.top
|
||||
}
|
||||
|
||||
currentIndex: Kirigami.Settings.isMobile ? footerLoader.item.currentIndex : headerLoader.item.currentIndex
|
||||
|
||||
EpisodeListPage {
|
||||
|
|
Loading…
Reference in New Issue