Make sure that drawer handles don't overlap with bottom tabbars
This commit is contained in:
parent
c2e4822e85
commit
3a1c88038a
@ -37,13 +37,19 @@ Kirigami.Page {
|
||||
id: tabBarComponent
|
||||
Controls.TabBar {
|
||||
id: tabBar
|
||||
position: Controls.TabBar.Footer
|
||||
position: Kirigami.Settings.isMobile ? Controls.TabBar.Footer : Controls.TabBar.Header
|
||||
currentIndex: swipeViewItem.currentIndex
|
||||
contentHeight: tabBarHeight
|
||||
|
||||
Controls.TabButton {
|
||||
width: parent.parent.width/parent.count
|
||||
height: Kirigami.Units.gridUnit * 2
|
||||
text: i18n("Downloaded")
|
||||
height: tabBarHeight
|
||||
text: i18n("Running")
|
||||
}
|
||||
Controls.TabButton {
|
||||
width: parent.parent.width/parent.count
|
||||
height: tabBarHeight
|
||||
text: i18n("Completed")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -54,7 +60,12 @@ Kirigami.Page {
|
||||
currentIndex: Kirigami.Settings.isMobile ? footerLoader.item.currentIndex : headerLoader.item.currentIndex
|
||||
|
||||
EpisodeListPage {
|
||||
title: i18n("Downloaded")
|
||||
title: i18n("Running")
|
||||
episodeType: EpisodeModel.Downloading
|
||||
}
|
||||
|
||||
EpisodeListPage {
|
||||
title: i18n("Completed")
|
||||
episodeType: EpisodeModel.Downloaded
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
|
||||
* SPDX-FileCopyrightText: 2021 Bart De Vries <bart@mogwai.be>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
@ -25,6 +24,7 @@ Kirigami.Page {
|
||||
active: !Kirigami.Settings.isMobile
|
||||
sourceComponent: tabBarComponent
|
||||
property var swipeViewItem: swipeView
|
||||
//height: tabBarHeight
|
||||
}
|
||||
|
||||
footer: Loader {
|
||||
@ -38,22 +38,23 @@ Kirigami.Page {
|
||||
id: tabBarComponent
|
||||
Controls.TabBar {
|
||||
id: tabBar
|
||||
position: Controls.TabBar.Footer
|
||||
position: Kirigami.Settings.isMobile ? Controls.TabBar.Footer : Controls.TabBar.Header
|
||||
currentIndex: swipeViewItem.currentIndex
|
||||
contentHeight: tabBarHeight
|
||||
|
||||
Controls.TabButton {
|
||||
width: parent.parent.width/parent.count
|
||||
height: Kirigami.Units.gridUnit * 2
|
||||
height: tabBarHeight
|
||||
text: i18n("New Episodes")
|
||||
}
|
||||
Controls.TabButton {
|
||||
width: parent.parent.width/parent.count
|
||||
height: Kirigami.Units.gridUnit * 2
|
||||
height: tabBarHeight
|
||||
text: i18n("Unread Episodes")
|
||||
}
|
||||
Controls.TabButton {
|
||||
width: parent.parent.width/parent.count
|
||||
height: Kirigami.Units.gridUnit * 2
|
||||
height: tabBarHeight
|
||||
text: i18n("All Episodes")
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,9 @@ Kirigami.ApplicationWindow {
|
||||
title: "Alligator"
|
||||
|
||||
property var miniplayerSize: Kirigami.Units.gridUnit * 3 + Kirigami.Units.gridUnit / 6
|
||||
property int tabBarHeight: Kirigami.Units.gridUnit * 2
|
||||
property int tabBarActive: 0
|
||||
|
||||
Kirigami.PagePool {
|
||||
id: mainPagePool
|
||||
cachePages: false
|
||||
@ -34,7 +37,7 @@ Kirigami.ApplicationWindow {
|
||||
globalDrawer: Kirigami.GlobalDrawer {
|
||||
isMenu: false
|
||||
// make room at the bottom for miniplayer
|
||||
handle.anchors.bottomMargin: ( audio.entry ? ( footerLoader.item.contentY == 0 ? miniplayerSize : 0 ) : 0 ) + Kirigami.Units.smallSpacing
|
||||
handle.anchors.bottomMargin: ( audio.entry ? ( footerLoader.item.contentY == 0 ? miniplayerSize : 0 ) : 0 ) + Kirigami.Units.smallSpacing + tabBarActive * tabBarHeight
|
||||
handleVisible: !audio.entry || footerLoader.item.contentY == 0
|
||||
actions: [
|
||||
Kirigami.PagePoolAction {
|
||||
@ -44,6 +47,7 @@ Kirigami.ApplicationWindow {
|
||||
page: "qrc:/QueuePage.qml"
|
||||
onTriggered: {
|
||||
SettingsManager.lastOpenedPage = "QueuePage" // for persistency
|
||||
tabBarActive = 0
|
||||
}
|
||||
},
|
||||
Kirigami.PagePoolAction {
|
||||
@ -53,6 +57,7 @@ Kirigami.ApplicationWindow {
|
||||
page: "qrc:/EpisodeSwipePage.qml"
|
||||
onTriggered: {
|
||||
SettingsManager.lastOpenedPage = "EpisodeSwipePage" // for persistency
|
||||
tabBarActive = 1
|
||||
}
|
||||
},
|
||||
Kirigami.PagePoolAction {
|
||||
@ -62,6 +67,7 @@ Kirigami.ApplicationWindow {
|
||||
page: "qrc:/FeedListPage.qml"
|
||||
onTriggered: {
|
||||
SettingsManager.lastOpenedPage = "FeedListPage" // for persistency
|
||||
tabBarActive = 0
|
||||
}
|
||||
},
|
||||
Kirigami.PagePoolAction {
|
||||
@ -71,6 +77,7 @@ Kirigami.ApplicationWindow {
|
||||
page: "qrc:/DownloadSwipePage.qml"
|
||||
onTriggered: {
|
||||
SettingsManager.lastOpenedPage = "DownloadSwipePage" // for persistency
|
||||
tabBarActive = 1
|
||||
}
|
||||
},
|
||||
Kirigami.PagePoolAction {
|
||||
@ -102,7 +109,7 @@ Kirigami.ApplicationWindow {
|
||||
contextDrawer: Kirigami.ContextDrawer {
|
||||
id: contextDrawer
|
||||
// make room at the bottom for miniplayer
|
||||
handle.anchors.bottomMargin: ( audio.entry ? ( footerLoader.item.contentY == 0 ? miniplayerSize : 0 ) : 0 ) + Kirigami.Units.smallSpacing
|
||||
handle.anchors.bottomMargin: ( audio.entry ? ( footerLoader.item.contentY == 0 ? miniplayerSize : 0 ) : 0 ) + Kirigami.Units.smallSpacing + tabBarActive * tabBarHeight
|
||||
handleVisible: !audio.entry || footerLoader.item.contentY == 0
|
||||
}
|
||||
|
||||
@ -125,6 +132,7 @@ Kirigami.ApplicationWindow {
|
||||
// create space at the bottom to show miniplayer without it hiding stuff
|
||||
// underneath
|
||||
pageStack.anchors.bottomMargin: (audio.entry) ? miniplayerSize : 0
|
||||
|
||||
Loader {
|
||||
id: footerLoader
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user