summaryrefslogtreecommitdiffstats
path: root/framework/qml
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2017-08-23 14:57:15 +0200
committerMichael Bohlender <michael.bohlender@kdemail.net>2017-08-23 14:57:15 +0200
commit24f73cfc1ecde01dccba11d6d1581d706aa4d428 (patch)
treed1afb7268b73046a0f25d2f6a8afe9b2eecb18c4 /framework/qml
parent541d459c6fce2f6a6924ff408a7b903cbef01cbc (diff)
downloadkube-24f73cfc1ecde01dccba11d6d1581d706aa4d428.tar.gz
kube-24f73cfc1ecde01dccba11d6d1581d706aa4d428.zip
introduce Kube.ScrollBar
Diffstat (limited to 'framework/qml')
-rw-r--r--framework/qml/ConversationListView.qml2
-rw-r--r--framework/qml/ListView.qml2
-rw-r--r--framework/qml/MailListView.qml2
-rw-r--r--framework/qml/MailViewer.qml2
-rw-r--r--framework/qml/People.qml2
-rw-r--r--framework/qml/ScrollBar.qml43
-rw-r--r--framework/qml/TextEditor.qml2
-rw-r--r--framework/qml/TreeView.qml2
8 files changed, 50 insertions, 7 deletions
diff --git a/framework/qml/ConversationListView.qml b/framework/qml/ConversationListView.qml
index 65f5bd02..dcb5e3a4 100644
--- a/framework/qml/ConversationListView.qml
+++ b/framework/qml/ConversationListView.qml
@@ -148,7 +148,7 @@ FocusScope {
148 forwardWheelEvents: true 148 forwardWheelEvents: true
149 } 149 }
150 150
151 ScrollBar.vertical: ScrollBar {} 151 ScrollBar.vertical: Kube.ScrollBar {}
152 152
153 } 153 }
154} 154}
diff --git a/framework/qml/ListView.qml b/framework/qml/ListView.qml
index 56ba1e37..eafa428d 100644
--- a/framework/qml/ListView.qml
+++ b/framework/qml/ListView.qml
@@ -26,7 +26,7 @@ ListView {
26 property Item mouseProxy: scrollHelper 26 property Item mouseProxy: scrollHelper
27 27
28 clip: true 28 clip: true
29 ScrollBar.vertical: ScrollBar {} 29 ScrollBar.vertical: Kube.ScrollBar {}
30 30
31 Kube.ScrollHelper { 31 Kube.ScrollHelper {
32 id: scrollHelper 32 id: scrollHelper
diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml
index 5b97cd21..a9010881 100644
--- a/framework/qml/MailListView.qml
+++ b/framework/qml/MailListView.qml
@@ -70,7 +70,7 @@ FocusScope {
70 clip: true 70 clip: true
71 focus: true 71 focus: true
72 72
73 ScrollBar.vertical: ScrollBar{ 73 ScrollBar.vertical: Kube.ScrollBar{
74 id: scrollbar 74 id: scrollbar
75 } 75 }
76 76
diff --git a/framework/qml/MailViewer.qml b/framework/qml/MailViewer.qml
index 329ef217..c3fc45d3 100644
--- a/framework/qml/MailViewer.qml
+++ b/framework/qml/MailViewer.qml
@@ -406,7 +406,7 @@ Rectangle {
406 Flickable { 406 Flickable {
407 id: flickable 407 id: flickable
408 anchors.fill: parent 408 anchors.fill: parent
409 ScrollBar.vertical: ScrollBar {} 409 ScrollBar.vertical: Kube.ScrollBar {}
410 contentHeight: content.height 410 contentHeight: content.height
411 contentWidth: parent.width 411 contentWidth: parent.width
412 Column { 412 Column {
diff --git a/framework/qml/People.qml b/framework/qml/People.qml
index 2029dc69..b9ed81bd 100644
--- a/framework/qml/People.qml
+++ b/framework/qml/People.qml
@@ -221,7 +221,7 @@ FocusScope {
221 leftMargin: Kube.Units.largeSpacing 221 leftMargin: Kube.Units.largeSpacing
222 } 222 }
223 223
224 Controls.ScrollBar.vertical: Controls.ScrollBar { } 224 Controls.ScrollBar.vertical: Kube.ScrollBar { }
225 contentHeight: contentColumn.height 225 contentHeight: contentColumn.height
226 226
227 clip: true 227 clip: true
diff --git a/framework/qml/ScrollBar.qml b/framework/qml/ScrollBar.qml
new file mode 100644
index 00000000..9298c3ea
--- /dev/null
+++ b/framework/qml/ScrollBar.qml
@@ -0,0 +1,43 @@
1/*
2 * Copyright (C) 2017 Michael Bohlender, <bohlender@kolabsys.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19import QtQuick 2.7
20import QtQuick.Templates 2.0 as T
21import org.kube.framework 1.0 as Kube
22
23T.ScrollBar {
24 id: control
25
26 implicitWidth: contentItem.implicitWidth
27 implicitHeight: contentItem.implicitHeight
28
29
30 contentItem: Rectangle {
31 implicitWidth: Kube.Units.gridUnit / 3
32 implicitHeight: Kube.Units.gridUnit / 3
33
34 color: Kube.Colors.disabledTextColor
35 }
36
37 background: Rectangle {
38 implicitWidth: Kube.Units.gridUnit / 3
39 implicitHeight: Kube.Units.gridUnit / 3
40
41 color: Kube.Colors.buttonColor
42 }
43}
diff --git a/framework/qml/TextEditor.qml b/framework/qml/TextEditor.qml
index b3bd34b8..5f29cef3 100644
--- a/framework/qml/TextEditor.qml
+++ b/framework/qml/TextEditor.qml
@@ -30,7 +30,7 @@ FocusScope {
30 Flickable { 30 Flickable {
31 id: flickableItem 31 id: flickableItem
32 anchors.fill: parent 32 anchors.fill: parent
33 ScrollBar.vertical: ScrollBar {} 33 ScrollBar.vertical: Kube.ScrollBar {}
34 34
35 Kube.TextArea { 35 Kube.TextArea {
36 id: edit 36 id: edit
diff --git a/framework/qml/TreeView.qml b/framework/qml/TreeView.qml
index e1818a0b..d53497af 100644
--- a/framework/qml/TreeView.qml
+++ b/framework/qml/TreeView.qml
@@ -47,7 +47,7 @@ FocusScope {
47 47
48 anchors.fill: parent 48 anchors.fill: parent
49 49
50 Controls2.ScrollBar.vertical: Controls2.ScrollBar {} 50 Controls2.ScrollBar.vertical: Kube.ScrollBar {}
51 clip: true 51 clip: true
52 contentWidth: root.width 52 contentWidth: root.width
53 contentHeight: treeView.implicitHeight 53 contentHeight: treeView.implicitHeight