diff options
-rw-r--r-- | framework/qml/View.qml | 21 | ||||
-rw-r--r-- | views/composer/qml/View.qml | 1 |
2 files changed, 14 insertions, 8 deletions
diff --git a/framework/qml/View.qml b/framework/qml/View.qml index d74fb4c0..d8e32fab 100644 --- a/framework/qml/View.qml +++ b/framework/qml/View.qml | |||
@@ -27,7 +27,7 @@ FocusScope { | |||
27 | id: root | 27 | id: root |
28 | 28 | ||
29 | //Search | 29 | //Search |
30 | property rect searchArea: null | 30 | property rect searchArea |
31 | property string filter: "" | 31 | property string filter: "" |
32 | property var searchObject: null | 32 | property var searchObject: null |
33 | function triggerSearch() { | 33 | function triggerSearch() { |
@@ -51,7 +51,7 @@ FocusScope { | |||
51 | } | 51 | } |
52 | 52 | ||
53 | //View columns | 53 | //View columns |
54 | property int visibleViews: 2 | 54 | property int visibleViews: 0 //0 means the feature is disabled entirely |
55 | property int currentIndex: 0 | 55 | property int currentIndex: 0 |
56 | property int count: contentItems.length | 56 | property int count: contentItems.length |
57 | default property alias contentItems: content.data | 57 | default property alias contentItems: content.data |
@@ -94,14 +94,19 @@ FocusScope { | |||
94 | } | 94 | } |
95 | 95 | ||
96 | function showRelevantSplits() { | 96 | function showRelevantSplits() { |
97 | if (!visibleViews) { | ||
98 | return | ||
99 | } | ||
97 | var i; | 100 | var i; |
98 | for (i = 0; i < count; i++) { | 101 | for (i = 0; i < count; i++) { |
99 | if (i < currentIndex) { | 102 | if ('visible' in contentItems[i]) { |
100 | contentItems[i].visible = false; | 103 | if (i < currentIndex) { |
101 | } else if (i > (currentIndex + visibleViews - 1)) { | 104 | contentItems[i].visible = false; |
102 | contentItems[i].visible = false; | 105 | } else if (i > (currentIndex + visibleViews - 1)) { |
103 | } else { | 106 | contentItems[i].visible = false; |
104 | contentItems[i].visible = true; | 107 | } else { |
108 | contentItems[i].visible = true; | ||
109 | } | ||
105 | } | 110 | } |
106 | } | 111 | } |
107 | 112 | ||
diff --git a/views/composer/qml/View.qml b/views/composer/qml/View.qml index 97604456..1c08dda6 100644 --- a/views/composer/qml/View.qml +++ b/views/composer/qml/View.qml | |||
@@ -28,6 +28,7 @@ import org.kube.framework 1.0 as Kube | |||
28 | Kube.View { | 28 | Kube.View { |
29 | id: root | 29 | id: root |
30 | 30 | ||
31 | visibleViews: 2 | ||
31 | property bool newMessage: false | 32 | property bool newMessage: false |
32 | property int loadType: Kube.ComposerController.Draft | 33 | property int loadType: Kube.ComposerController.Draft |
33 | property variant message: {} | 34 | property variant message: {} |