Commit f365fd5e authored by Marco Martin's avatar Marco Martin
Browse files

use the new GlobalDrawer header property

Summary:
Depends on D25425

BUG: 389533
FIXED-IN: 5.18

Test Plan: {F7774329}

Reviewers: #discover_software_store, ngraham, apol

Reviewed By: #discover_software_store, ngraham, apol

Subscribers: apol, ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25426
parent 36bf9e7a
......@@ -23,7 +23,7 @@ import QtQuick.Layouts 1.1
import QtQuick.Controls 2.1
import org.kde.discover 2.0
import org.kde.discover.app 1.0
import org.kde.kirigami 2.8 as Kirigami
import org.kde.kirigami 2.11 as Kirigami
import "navigation.js" as Navigation
Kirigami.GlobalDrawer {
......@@ -38,7 +38,7 @@ Kirigami.GlobalDrawer {
width: Kirigami.Units.gridUnit * 14
property bool wideScreen: false
bannerImageSource: modal ? "qrc:/banners/banner.svg" : ""
bannerImageSource: "qrc:/banners/banner.svg"
// In desktop view, it's a sidebar, and sidebars get the view BG color
Kirigami.Theme.colorSet: modal ? Kirigami.Theme.Window : Kirigami.Theme.View
......@@ -71,9 +71,8 @@ Kirigami.GlobalDrawer {
searchField.forceActiveFocus();
}
topContent: Kirigami.AbstractApplicationHeader {
header: Kirigami.AbstractApplicationHeader {
id: toolbar
preferredHeight: 40 // Match Kirigami.ToolBarApplicationHeader, which is hardcoded to this
RowLayout {
anchors.fill: parent
......@@ -161,13 +160,11 @@ Kirigami.GlobalDrawer {
name: "full"
when: drawer.wideScreen
PropertyChanges { target: drawer; drawerOpen: true }
PropertyChanges { target: drawer; topContent: toolbar }
},
State {
name: "compact"
when: !drawer.wideScreen
PropertyChanges { target: drawer; drawerOpen: false }
PropertyChanges { target: drawer; topContent: null }
}
]
}
......
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