Fix 1px left and bottom border on mobile

In mobile mode, when the drawer is hidden, for some reason a 1px grey
border is drawn on the left of the application window. Change it to a
loader to avoid needlessly having it loaded, and remove the grey border.

There's also a 1 px window border on the bottom due to the navbar
thinking it's a header. Manually specify that it's in the footer.
This commit is contained in:
Devin Lin 2024-09-29 19:42:29 -07:00
parent 45ad38390f
commit be7a7ffe8a
2 changed files with 6 additions and 5 deletions

View File

@ -141,10 +141,12 @@ Kirigami.ApplicationWindow {
property bool showGlobalDrawer: !isMobile || kastsMainWindow.isWidescreen
globalDrawer: showGlobalDrawer ? myGlobalDrawer : null
property Kirigami.OverlayDrawer myGlobalDrawer: KastsGlobalDrawer {
globalDrawer: globalDrawerLoader.item
Loader {
id: globalDrawerLoader
active: kastsMainWindow.showGlobalDrawer
sourceComponent: KastsGlobalDrawer {}
}
// Implement slots for MPRIS2 signals
@ -210,7 +212,6 @@ Kirigami.ApplicationWindow {
height: visible ? implicitHeight : 0
active: isMobile && !kastsMainWindow.isWidescreen
sourceComponent: BottomToolbar {
transparentBackground: footerLoader.active
opacity: (!footerLoader.item || footerLoader.item.contentY === 0) ? 1 : 0
Behavior on opacity {
NumberAnimation { duration: Kirigami.Units.shortDuration }

View File

@ -13,9 +13,9 @@ import org.kde.kasts
Kirigami.NavigationTabBar {
id: navBar
position: ToolBar.Footer
property alias toolbarHeight: navBar.implicitHeight
property bool transparentBackground: false
actions: [
Kirigami.Action {