diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-03-10 13:54:07 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-03-10 13:54:07 +0100 |
commit | 181b39ddd0b3c027341b228ab51482ce4413d3bb (patch) | |
tree | df740e3d4b31e1b9ffe52772aa9dc23aa3176a95 /components/package | |
parent | 73b2621624c87528ce776b74555ec98c56115661 (diff) | |
download | kube-181b39ddd0b3c027341b228ab51482ce4413d3bb.tar.gz kube-181b39ddd0b3c027341b228ab51482ce4413d3bb.zip |
add scaling unit to the theme plugin and use it instaed of the main.qml unit item
Diffstat (limited to 'components/package')
-rw-r--r-- | components/package/contents/ui/FocusComposer.qml | 2 | ||||
-rw-r--r-- | components/package/contents/ui/FolderListView.qml | 9 | ||||
-rw-r--r-- | components/package/contents/ui/ListItem.qml | 5 | ||||
-rw-r--r-- | components/package/contents/ui/MailListView.qml | 17 | ||||
-rw-r--r-- | components/package/contents/ui/Settings.qml | 2 |
5 files changed, 19 insertions, 16 deletions
diff --git a/components/package/contents/ui/FocusComposer.qml b/components/package/contents/ui/FocusComposer.qml index bc8b3f2d..ab04dbed 100644 --- a/components/package/contents/ui/FocusComposer.qml +++ b/components/package/contents/ui/FocusComposer.qml | |||
@@ -55,7 +55,7 @@ Rectangle { | |||
55 | 55 | ||
56 | anchors { | 56 | anchors { |
57 | fill: parent | 57 | fill: parent |
58 | margins: unit.size * 3 | 58 | margins: Unit.size * 3 |
59 | } | 59 | } |
60 | 60 | ||
61 | Composer { | 61 | Composer { |
diff --git a/components/package/contents/ui/FolderListView.qml b/components/package/contents/ui/FolderListView.qml index d78531a2..fafc1623 100644 --- a/components/package/contents/ui/FolderListView.qml +++ b/components/package/contents/ui/FolderListView.qml | |||
@@ -24,6 +24,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore | |||
24 | import org.kde.plasma.components 2.0 as PlasmaComponents | 24 | import org.kde.plasma.components 2.0 as PlasmaComponents |
25 | 25 | ||
26 | import org.kube.framework.domain 1.0 as KubeFramework | 26 | import org.kube.framework.domain 1.0 as KubeFramework |
27 | import org.kube.framework.theme 1.0 | ||
27 | 28 | ||
28 | Item { | 29 | Item { |
29 | id: root | 30 | id: root |
@@ -34,7 +35,7 @@ Item { | |||
34 | id: searchBox | 35 | id: searchBox |
35 | 36 | ||
36 | width: root.width | 37 | width: root.width |
37 | height: unit.size * 10 | 38 | height: Unit.size * 10 |
38 | 39 | ||
39 | TextField { | 40 | TextField { |
40 | anchors. centerIn: parent | 41 | anchors. centerIn: parent |
@@ -68,7 +69,7 @@ Item { | |||
68 | style: TreeViewStyle { | 69 | style: TreeViewStyle { |
69 | activateItemOnSingleClick: true | 70 | activateItemOnSingleClick: true |
70 | rowDelegate: Rectangle { | 71 | rowDelegate: Rectangle { |
71 | height: unit.size * 10 | 72 | height: Unit.size * 10 |
72 | color: "transparent" | 73 | color: "transparent" |
73 | } | 74 | } |
74 | itemDelegate: Rectangle { | 75 | itemDelegate: Rectangle { |
@@ -81,7 +82,7 @@ Item { | |||
81 | anchors { | 82 | anchors { |
82 | verticalCenter: parent.verticalCenter | 83 | verticalCenter: parent.verticalCenter |
83 | left: parent.left | 84 | left: parent.left |
84 | leftMargin: unit.size * 3 | 85 | leftMargin: Unit.size * 3 |
85 | } | 86 | } |
86 | source: model.icon | 87 | source: model.icon |
87 | } | 88 | } |
@@ -89,7 +90,7 @@ Item { | |||
89 | anchors { | 90 | anchors { |
90 | verticalCenter: parent.verticalCenter | 91 | verticalCenter: parent.verticalCenter |
91 | left: iconItem.right | 92 | left: iconItem.right |
92 | leftMargin: unit.size * 3 | 93 | leftMargin: Unit.size * 3 |
93 | } | 94 | } |
94 | renderType: Text.NativeRendering | 95 | renderType: Text.NativeRendering |
95 | text: styleData.value | 96 | text: styleData.value |
diff --git a/components/package/contents/ui/ListItem.qml b/components/package/contents/ui/ListItem.qml index 5396645d..bea3c11b 100644 --- a/components/package/contents/ui/ListItem.qml +++ b/components/package/contents/ui/ListItem.qml | |||
@@ -16,13 +16,14 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | import QtQuick 2.4 | 18 | import QtQuick 2.4 |
19 | import org.kube.framework.theme 1.0 | ||
19 | 20 | ||
20 | Item { | 21 | Item { |
21 | id: delegateRoot | 22 | id: delegateRoot |
22 | 23 | ||
23 | readonly property bool isCurrentItem: ListView.isCurrentItem | 24 | readonly property bool isCurrentItem: ListView.isCurrentItem |
24 | 25 | ||
25 | height: unit.width * 25 | 26 | height: Unit.width * 25 |
26 | width: parent.width | 27 | width: parent.width |
27 | 28 | ||
28 | MouseArea { | 29 | MouseArea { |
@@ -60,4 +61,4 @@ Item { | |||
60 | opacity: 0.2 | 61 | opacity: 0.2 |
61 | } | 62 | } |
62 | } | 63 | } |
63 | } \ No newline at end of file | 64 | } |
diff --git a/components/package/contents/ui/MailListView.qml b/components/package/contents/ui/MailListView.qml index bf5185dc..e7fc634f 100644 --- a/components/package/contents/ui/MailListView.qml +++ b/components/package/contents/ui/MailListView.qml | |||
@@ -24,6 +24,7 @@ import QtQml 2.2 | |||
24 | import org.kde.plasma.components 2.0 as PlasmaComponents | 24 | import org.kde.plasma.components 2.0 as PlasmaComponents |
25 | 25 | ||
26 | import org.kube.framework.domain 1.0 as KubeFramework | 26 | import org.kube.framework.domain 1.0 as KubeFramework |
27 | import org.kube.framework.theme 1.0 | ||
27 | 28 | ||
28 | ScrollView { | 29 | ScrollView { |
29 | id: root | 30 | id: root |
@@ -47,7 +48,7 @@ ScrollView { | |||
47 | 48 | ||
48 | delegate: PlasmaComponents.ListItem { | 49 | delegate: PlasmaComponents.ListItem { |
49 | width: listView.width | 50 | width: listView.width |
50 | height: unit.size * 12 | 51 | height: Unit.size * 12 |
51 | 52 | ||
52 | enabled: true | 53 | enabled: true |
53 | checked: listView.currentIndex == index | 54 | checked: listView.currentIndex == index |
@@ -84,10 +85,10 @@ ScrollView { | |||
84 | anchors { | 85 | anchors { |
85 | verticalCenter: parent.verticalCenter | 86 | verticalCenter: parent.verticalCenter |
86 | left: parent.left | 87 | left: parent.left |
87 | leftMargin: unit.size * 2 | 88 | leftMargin: Unit.size * 2 |
88 | } | 89 | } |
89 | 90 | ||
90 | height: unit.size * 9 | 91 | height: Unit.size * 9 |
91 | width: height | 92 | width: height |
92 | 93 | ||
93 | name: model.senderName | 94 | name: model.senderName |
@@ -99,7 +100,7 @@ ScrollView { | |||
99 | anchors { | 100 | anchors { |
100 | top: avatar.top | 101 | top: avatar.top |
101 | left: avatar.right | 102 | left: avatar.right |
102 | leftMargin: unit.size * 3 | 103 | leftMargin: Unit.size * 3 |
103 | } | 104 | } |
104 | 105 | ||
105 | text: model.senderName | 106 | text: model.senderName |
@@ -114,9 +115,9 @@ ScrollView { | |||
114 | // anchors { | 115 | // anchors { |
115 | // top: avatar.top | 116 | // top: avatar.top |
116 | // left: senderName.right | 117 | // left: senderName.right |
117 | // leftMargin: unit.size | 118 | // leftMargin: Unit.size |
118 | // right: date.left | 119 | // right: date.left |
119 | // rightMargin: unit.size | 120 | // rightMargin: Unit.size |
120 | // } | 121 | // } |
121 | // | 122 | // |
122 | // text: "(" + model.sender +")" | 123 | // text: "(" + model.sender +")" |
@@ -130,7 +131,7 @@ ScrollView { | |||
130 | anchors { | 131 | anchors { |
131 | top: avatar.top | 132 | top: avatar.top |
132 | right: parent.right | 133 | right: parent.right |
133 | rightMargin: unit.size * 2 | 134 | rightMargin: Unit.size * 2 |
134 | } | 135 | } |
135 | 136 | ||
136 | text: Qt.formatDateTime(model.date) | 137 | text: Qt.formatDateTime(model.date) |
@@ -144,7 +145,7 @@ ScrollView { | |||
144 | anchors { | 145 | anchors { |
145 | bottom: avatar.bottom | 146 | bottom: avatar.bottom |
146 | left: avatar.right | 147 | left: avatar.right |
147 | leftMargin: unit.size * 3 | 148 | leftMargin: Unit.size * 3 |
148 | } | 149 | } |
149 | 150 | ||
150 | text: model.subject | 151 | text: model.subject |
diff --git a/components/package/contents/ui/Settings.qml b/components/package/contents/ui/Settings.qml index fa886f2b..bada1140 100644 --- a/components/package/contents/ui/Settings.qml +++ b/components/package/contents/ui/Settings.qml | |||
@@ -75,7 +75,7 @@ Rectangle { | |||
75 | anchors { | 75 | anchors { |
76 | verticalCenter: parent.verticalCenter | 76 | verticalCenter: parent.verticalCenter |
77 | left: parent.left | 77 | left: parent.left |
78 | // leftMargin: unit.size * 3 | 78 | // leftMargin: Unit.size * 3 |
79 | } | 79 | } |
80 | source: accountFactory.icon | 80 | source: accountFactory.icon |
81 | } | 81 | } |