summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/qml/View.qml14
1 files changed, 10 insertions, 4 deletions
diff --git a/framework/qml/View.qml b/framework/qml/View.qml
index 859b7155..64524999 100644
--- a/framework/qml/View.qml
+++ b/framework/qml/View.qml
@@ -19,19 +19,25 @@
19 19
20 20
21import QtQuick 2.7 21import QtQuick 2.7
22import QtQuick.Controls 2.0 as Controls2 22import QtQuick.Controls 2
23import QtQuick.Layouts 1.1 23import QtQuick.Layouts 1.1
24import org.kube.framework 1.0 as Kube 24import org.kube.framework 1.0 as Kube
25 25
26FocusScope { 26FocusScope {
27 id: root 27 id: root
28 28
29 //Use overlayArea to position an overlay window, parented to ApplicationWindow.window, over just the view-section without the sidebar.
30 property int sidebarWidth: ApplicationWindow.window.sidebarWidth ? ApplicationWindow.window.sidebarWidth : 0
31 property int windowWidth: ApplicationWindow.window.width ? ApplicationWindow.window.width : width
32 property int windowHeight: ApplicationWindow.window.height ? ApplicationWindow.window.height : height
33 property rect overlayArea: Qt.rect(sidebarWidth, 0, windowWidth - sidebarWidth, windowHeight)
34
29 //Search 35 //Search
30 property rect searchArea 36 property rect searchArea
31 property string filter: "" 37 property string filter: ""
32 property var searchObject: null 38 property var searchObject: null
33 function triggerSearch() { 39 function triggerSearch() {
34 if (!searchObject && Controls2.StackView.visible) { 40 if (!searchObject && StackView.visible) {
35 searchObject = searchComponent.createObject(root) 41 searchObject = searchComponent.createObject(root)
36 } 42 }
37 } 43 }
@@ -60,11 +66,11 @@ FocusScope {
60 66
61 //This signal will be emitted once all initial properties have been set and the view is ready to load 67 //This signal will be emitted once all initial properties have been set and the view is ready to load
62 signal setup() 68 signal setup()
63 Controls2.StackView.onActivated: { 69 StackView.onActivated: {
64 root.setup() 70 root.setup()
65 } 71 }
66 72
67 Controls2.StackView.onDeactivated: { 73 StackView.onDeactivated: {
68 clearSearch() 74 clearSearch()
69 } 75 }
70 76