Merge lp:~verzegnassi-stefano/ubuntu-terminal-app/uitk13-migration into lp:~ubuntu-terminal-dev/ubuntu-terminal-app/reboot
- uitk13-migration
- Merge into reboot
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Alan Pope πΊπ§π± π¦ | ||||
Approved revision: | 153 | ||||
Merged at revision: | 154 | ||||
Proposed branch: | lp:~verzegnassi-stefano/ubuntu-terminal-app/uitk13-migration | ||||
Merge into: | lp:~ubuntu-terminal-dev/ubuntu-terminal-app/reboot | ||||
Diff against target: |
1040 lines (+225/-573) 22 files modified
manifest.json.in (+1/-1) src/app/qml/AlternateActionPopover.qml (+2/-2) src/app/qml/AuthenticationDialog.qml (+2/-2) src/app/qml/AuthenticationService.qml (+2/-2) src/app/qml/CircularTransparentButton.qml (+1/-1) src/app/qml/ColorSchemePage.qml (+59/-0) src/app/qml/ExpandableButton.qml (+1/-1) src/app/qml/KeyboardBar.qml (+1/-1) src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml (+1/-1) src/app/qml/KeyboardRows/JsonTranslator.qml (+1/-1) src/app/qml/KeyboardRows/KeyModel.qml (+1/-1) src/app/qml/KeyboardRows/KeyboardButton.qml (+1/-1) src/app/qml/KeyboardRows/KeyboardLayout.qml (+2/-2) src/app/qml/KeyboardRows/KeyboardRow.qml (+1/-1) src/app/qml/LayoutsPage.qml (+15/-11) src/app/qml/ListItemWithActions.qml (+0/-454) src/app/qml/SettingsPage.qml (+113/-84) src/app/qml/TabsPage.qml (+1/-2) src/app/qml/TerminalComponent.qml (+1/-1) src/app/qml/TerminalPage.qml (+8/-2) src/app/qml/ubuntu-terminal-app.qml (+10/-1) terminal.apparmor (+1/-1) |
||||
To merge this branch: | bzr merge lp:~verzegnassi-stefano/ubuntu-terminal-app/uitk13-migration | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alan Pope πΊπ§π± π¦ (community) | Approve | ||
Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+282922@code.launchpad.net |
Commit message
* Updated imports to Ubuntu.Components 1.3
* Use 'ubuntu-
* Migrated all the list items to ListItemLayout
* Added a Flickable in the settings page, so that the content can be scrolled on small screens
* Moved the 'color scheme' setting into a separate page, as per UITK 1.3 design specs (see section "List items", "Examples and best practice" for three slot layout)
Description of the change
* Updated imports to Ubuntu.Components 1.3
* Use 'ubuntu-
* Migrated all the list items to ListItemLayout
* Added a Flickable in the settings page, so that the content can be scrolled on small screens
* Moved the 'color scheme' setting into a separate page, as per UITK 1.3 design specs (see section "List items", "Examples and best practice" for three slot layout)
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
Alan Pope πΊπ§π± π¦ (popey) wrote : | # |
Great work, thank you!
Preview Diff
1 | === modified file 'manifest.json.in' | |||
2 | --- manifest.json.in 2015-08-02 12:49:18 +0000 | |||
3 | +++ manifest.json.in 2016-01-22 18:37:42 +0000 | |||
4 | @@ -1,6 +1,6 @@ | |||
5 | 1 | { | 1 | { |
6 | 2 | "description": "Terminal application", | 2 | "description": "Terminal application", |
8 | 3 | "framework": "ubuntu-sdk-15.04", | 3 | "framework": "ubuntu-sdk-15.04.3", |
9 | 4 | "architecture": "@CLICK_ARCH@", | 4 | "architecture": "@CLICK_ARCH@", |
10 | 5 | "hooks": { | 5 | "hooks": { |
11 | 6 | "terminal": { | 6 | "terminal": { |
12 | 7 | 7 | ||
13 | === modified file 'src/app/qml/AlternateActionPopover.qml' | |||
14 | --- src/app/qml/AlternateActionPopover.qml 2015-08-02 12:49:18 +0000 | |||
15 | +++ src/app/qml/AlternateActionPopover.qml 2016-01-22 18:37:42 +0000 | |||
16 | @@ -1,6 +1,6 @@ | |||
17 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
20 | 2 | import Ubuntu.Components 1.2 | 2 | import Ubuntu.Components 1.3 |
21 | 3 | import Ubuntu.Components.Popups 1.0 | 3 | import Ubuntu.Components.Popups 1.3 |
22 | 4 | 4 | ||
23 | 5 | Component { | 5 | Component { |
24 | 6 | id: popoverComponent | 6 | id: popoverComponent |
25 | 7 | 7 | ||
26 | === modified file 'src/app/qml/AuthenticationDialog.qml' | |||
27 | --- src/app/qml/AuthenticationDialog.qml 2016-01-20 01:24:35 +0000 | |||
28 | +++ src/app/qml/AuthenticationDialog.qml 2016-01-22 18:37:42 +0000 | |||
29 | @@ -16,8 +16,8 @@ | |||
30 | 16 | * Authored by: Arto Jalkanen <ajalkane@gmail.com> | 16 | * Authored by: Arto Jalkanen <ajalkane@gmail.com> |
31 | 17 | */ | 17 | */ |
32 | 18 | import QtQuick 2.4 | 18 | import QtQuick 2.4 |
35 | 19 | import Ubuntu.Components 1.2 | 19 | import Ubuntu.Components 1.3 |
36 | 20 | import Ubuntu.Components.Popups 1.0 | 20 | import Ubuntu.Components.Popups 1.3 |
37 | 21 | 21 | ||
38 | 22 | Dialog { | 22 | Dialog { |
39 | 23 | id: root | 23 | id: root |
40 | 24 | 24 | ||
41 | === modified file 'src/app/qml/AuthenticationService.qml' | |||
42 | --- src/app/qml/AuthenticationService.qml 2015-07-13 20:25:21 +0000 | |||
43 | +++ src/app/qml/AuthenticationService.qml 2016-01-22 18:37:42 +0000 | |||
44 | @@ -14,8 +14,8 @@ | |||
45 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
46 | 15 | */ | 15 | */ |
47 | 16 | import QtQuick 2.4 | 16 | import QtQuick 2.4 |
50 | 17 | import Ubuntu.Components 1.2 | 17 | import Ubuntu.Components 1.3 |
51 | 18 | import Ubuntu.Components.Popups 1.0 | 18 | import Ubuntu.Components.Popups 1.3 |
52 | 19 | import com.ubuntu.PamAuthentication 0.1 | 19 | import com.ubuntu.PamAuthentication 0.1 |
53 | 20 | 20 | ||
54 | 21 | /** | 21 | /** |
55 | 22 | 22 | ||
56 | === modified file 'src/app/qml/CircularTransparentButton.qml' | |||
57 | --- src/app/qml/CircularTransparentButton.qml 2015-07-13 20:25:21 +0000 | |||
58 | +++ src/app/qml/CircularTransparentButton.qml 2016-01-22 18:37:42 +0000 | |||
59 | @@ -1,5 +1,5 @@ | |||
60 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
62 | 2 | import Ubuntu.Components 1.2 | 2 | import Ubuntu.Components 1.3 |
63 | 3 | 3 | ||
64 | 4 | Rectangle { | 4 | Rectangle { |
65 | 5 | property color backgroundColor: "black" | 5 | property color backgroundColor: "black" |
66 | 6 | 6 | ||
67 | === added file 'src/app/qml/ColorSchemePage.qml' | |||
68 | --- src/app/qml/ColorSchemePage.qml 1970-01-01 00:00:00 +0000 | |||
69 | +++ src/app/qml/ColorSchemePage.qml 2016-01-22 18:37:42 +0000 | |||
70 | @@ -0,0 +1,59 @@ | |||
71 | 1 | /* | ||
72 | 2 | * Copyright (C) 2013, 2014, 2016 Canonical Ltd | ||
73 | 3 | * | ||
74 | 4 | * This program is free software: you can redistribute it and/or modify | ||
75 | 5 | * it under the terms of the GNU General Public License version 3 as | ||
76 | 6 | * published by the Free Software Foundation. | ||
77 | 7 | * | ||
78 | 8 | * This program is distributed in the hope that it will be useful, | ||
79 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
80 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
81 | 11 | * GNU General Public License for more details. | ||
82 | 12 | * | ||
83 | 13 | * You should have received a copy of the GNU General Public License | ||
84 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
85 | 15 | * | ||
86 | 16 | * Authored by: Filippo Scognamiglio <flscogna@gmail.com> | ||
87 | 17 | */ | ||
88 | 18 | |||
89 | 19 | import QtQuick 2.4 | ||
90 | 20 | import Ubuntu.Components 1.3 | ||
91 | 21 | |||
92 | 22 | Page { | ||
93 | 23 | id: rootItem | ||
94 | 24 | objectName: "colorSchemePage" | ||
95 | 25 | |||
96 | 26 | title: i18n.tr("Color Scheme") | ||
97 | 27 | property alias model: listView.model | ||
98 | 28 | |||
99 | 29 | ListView { | ||
100 | 30 | id: listView | ||
101 | 31 | anchors.fill: parent | ||
102 | 32 | model: settings.profilesList | ||
103 | 33 | delegate: ListItem { | ||
104 | 34 | ListItemLayout { | ||
105 | 35 | anchors.fill: parent | ||
106 | 36 | title.text: modelData | ||
107 | 37 | |||
108 | 38 | Icon { | ||
109 | 39 | SlotsLayout.position: SlotsLayout.Last | ||
110 | 40 | width: units.gu(2); height: units.gu(2) | ||
111 | 41 | color: UbuntuColors.green | ||
112 | 42 | name: "tick" | ||
113 | 43 | |||
114 | 44 | visible: model.index == listView.currentIndex | ||
115 | 45 | } | ||
116 | 46 | } | ||
117 | 47 | |||
118 | 48 | onClicked: listView.currentIndex = model.index | ||
119 | 49 | } | ||
120 | 50 | |||
121 | 51 | onCurrentIndexChanged: { | ||
122 | 52 | settings.colorScheme = model[currentIndex]; | ||
123 | 53 | } | ||
124 | 54 | |||
125 | 55 | Component.onCompleted: { | ||
126 | 56 | currentIndex = model.indexOf(settings.colorScheme); | ||
127 | 57 | } | ||
128 | 58 | } | ||
129 | 59 | } | ||
130 | 0 | 60 | ||
131 | === modified file 'src/app/qml/ExpandableButton.qml' | |||
132 | --- src/app/qml/ExpandableButton.qml 2015-07-13 20:25:21 +0000 | |||
133 | +++ src/app/qml/ExpandableButton.qml 2016-01-22 18:37:42 +0000 | |||
134 | @@ -1,5 +1,5 @@ | |||
135 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
137 | 2 | import Ubuntu.Components 1.2 | 2 | import Ubuntu.Components 1.3 |
138 | 3 | 3 | ||
139 | 4 | Item { | 4 | Item { |
140 | 5 | id: container | 5 | id: container |
141 | 6 | 6 | ||
142 | === modified file 'src/app/qml/KeyboardBar.qml' | |||
143 | --- src/app/qml/KeyboardBar.qml 2015-07-13 20:25:21 +0000 | |||
144 | +++ src/app/qml/KeyboardBar.qml 2016-01-22 18:37:42 +0000 | |||
145 | @@ -1,5 +1,5 @@ | |||
146 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
148 | 2 | import Ubuntu.Components 1.2 | 2 | import Ubuntu.Components 1.3 |
149 | 3 | import "KeyboardRows" | 3 | import "KeyboardRows" |
150 | 4 | 4 | ||
151 | 5 | import "KeyboardRows/jsonParser.js" as Parser | 5 | import "KeyboardRows/jsonParser.js" as Parser |
152 | 6 | 6 | ||
153 | === modified file 'src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml' | |||
154 | --- src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml 2015-07-13 20:25:21 +0000 | |||
155 | +++ src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml 2016-01-22 18:37:42 +0000 | |||
156 | @@ -1,5 +1,5 @@ | |||
157 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
159 | 2 | import Ubuntu.Components 1.2 | 2 | import Ubuntu.Components 1.3 |
160 | 3 | 3 | ||
161 | 4 | import ".." | 4 | import ".." |
162 | 5 | 5 | ||
163 | 6 | 6 | ||
164 | === modified file 'src/app/qml/KeyboardRows/JsonTranslator.qml' | |||
165 | --- src/app/qml/KeyboardRows/JsonTranslator.qml 2015-08-09 14:05:38 +0000 | |||
166 | +++ src/app/qml/KeyboardRows/JsonTranslator.qml 2016-01-22 18:37:42 +0000 | |||
167 | @@ -1,5 +1,5 @@ | |||
168 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
170 | 2 | import Ubuntu.Components 1.2 | 2 | import Ubuntu.Components 1.3 |
171 | 3 | 3 | ||
172 | 4 | Item { | 4 | Item { |
173 | 5 | 5 | ||
174 | 6 | 6 | ||
175 | === modified file 'src/app/qml/KeyboardRows/KeyModel.qml' | |||
176 | --- src/app/qml/KeyboardRows/KeyModel.qml 2015-07-13 20:25:21 +0000 | |||
177 | +++ src/app/qml/KeyboardRows/KeyModel.qml 2016-01-22 18:37:42 +0000 | |||
178 | @@ -1,5 +1,5 @@ | |||
179 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
181 | 2 | import Ubuntu.Components 1.2 | 2 | import Ubuntu.Components 1.3 |
182 | 3 | 3 | ||
183 | 4 | QtObject { | 4 | QtObject { |
184 | 5 | property string text | 5 | property string text |
185 | 6 | 6 | ||
186 | === modified file 'src/app/qml/KeyboardRows/KeyboardButton.qml' | |||
187 | --- src/app/qml/KeyboardRows/KeyboardButton.qml 2015-07-13 20:25:21 +0000 | |||
188 | +++ src/app/qml/KeyboardRows/KeyboardButton.qml 2016-01-22 18:37:42 +0000 | |||
189 | @@ -1,5 +1,5 @@ | |||
190 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
192 | 2 | import Ubuntu.Components 1.2 | 2 | import Ubuntu.Components 1.3 |
193 | 3 | 3 | ||
194 | 4 | Rectangle { | 4 | Rectangle { |
195 | 5 | property alias text: mainLabel.text | 5 | property alias text: mainLabel.text |
196 | 6 | 6 | ||
197 | === modified file 'src/app/qml/KeyboardRows/KeyboardLayout.qml' | |||
198 | --- src/app/qml/KeyboardRows/KeyboardLayout.qml 2015-08-09 14:25:36 +0000 | |||
199 | +++ src/app/qml/KeyboardRows/KeyboardLayout.qml 2016-01-22 18:37:42 +0000 | |||
200 | @@ -1,5 +1,5 @@ | |||
201 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
203 | 2 | import Ubuntu.Components 1.2 | 2 | import Ubuntu.Components 1.3 |
204 | 3 | 3 | ||
205 | 4 | import "jsonParser.js" as Parser | 4 | import "jsonParser.js" as Parser |
206 | 5 | 5 | ||
207 | @@ -59,7 +59,7 @@ | |||
208 | 59 | function createEntryString(text, actionString, otherActionsString) { | 59 | function createEntryString(text, actionString, otherActionsString) { |
209 | 60 | var objectString = " | 60 | var objectString = " |
210 | 61 | import QtQuick 2.4 | 61 | import QtQuick 2.4 |
212 | 62 | import Ubuntu.Components 1.2 | 62 | import Ubuntu.Components 1.3 |
213 | 63 | 63 | ||
214 | 64 | KeyModel { | 64 | KeyModel { |
215 | 65 | text: \"" + text + "\" | 65 | text: \"" + text + "\" |
216 | 66 | 66 | ||
217 | === modified file 'src/app/qml/KeyboardRows/KeyboardRow.qml' | |||
218 | --- src/app/qml/KeyboardRows/KeyboardRow.qml 2015-07-13 20:25:21 +0000 | |||
219 | +++ src/app/qml/KeyboardRows/KeyboardRow.qml 2016-01-22 18:37:42 +0000 | |||
220 | @@ -1,5 +1,5 @@ | |||
221 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
223 | 2 | import Ubuntu.Components 1.2 | 2 | import Ubuntu.Components 1.3 |
224 | 3 | 3 | ||
225 | 4 | Rectangle { | 4 | Rectangle { |
226 | 5 | id: container | 5 | id: container |
227 | 6 | 6 | ||
228 | === modified file 'src/app/qml/LayoutsPage.qml' | |||
229 | --- src/app/qml/LayoutsPage.qml 2015-08-07 12:31:58 +0000 | |||
230 | +++ src/app/qml/LayoutsPage.qml 2016-01-22 18:37:42 +0000 | |||
231 | @@ -17,8 +17,7 @@ | |||
232 | 17 | */ | 17 | */ |
233 | 18 | 18 | ||
234 | 19 | import QtQuick 2.4 | 19 | import QtQuick 2.4 |
237 | 20 | import Ubuntu.Components 1.2 | 20 | import Ubuntu.Components 1.3 |
236 | 21 | import Ubuntu.Components.ListItems 1.0 as ListItem | ||
238 | 22 | 21 | ||
239 | 23 | Page { | 22 | Page { |
240 | 24 | id: rootItem | 23 | id: rootItem |
241 | @@ -34,18 +33,23 @@ | |||
242 | 34 | ListView { | 33 | ListView { |
243 | 35 | anchors.fill: parent | 34 | anchors.fill: parent |
244 | 36 | model: settings.profilesList | 35 | model: settings.profilesList |
253 | 37 | delegate: ListItem.Standard { | 36 | delegate: ListItem { |
254 | 38 | text: name | 37 | ListItemLayout { |
255 | 39 | 38 | anchors.fill: parent | |
256 | 40 | control: Switch { | 39 | title.text: name |
257 | 41 | id: layoutSwitch | 40 | |
258 | 42 | checked: profileVisible | 41 | Switch { |
259 | 43 | onCheckedChanged: { | 42 | id: layoutSwitch |
260 | 44 | settings.profilesList.setProperty(index, "profileVisible", checked); | 43 | SlotsLayout.position: SlotsLayout.Trailing |
261 | 44 | |||
262 | 45 | checked: profileVisible | ||
263 | 46 | onCheckedChanged: { | ||
264 | 47 | settings.profilesList.setProperty(index, "profileVisible", checked); | ||
265 | 48 | } | ||
266 | 45 | } | 49 | } |
267 | 46 | } | 50 | } |
268 | 47 | 51 | ||
270 | 48 | onTriggered: layoutSwitch.trigger() | 52 | onClicked: layoutSwitch.trigger() |
271 | 49 | } | 53 | } |
272 | 50 | } | 54 | } |
273 | 51 | } | 55 | } |
274 | 52 | 56 | ||
275 | === removed file 'src/app/qml/ListItemWithActions.qml' | |||
276 | --- src/app/qml/ListItemWithActions.qml 2015-07-13 20:25:21 +0000 | |||
277 | +++ src/app/qml/ListItemWithActions.qml 1970-01-01 00:00:00 +0000 | |||
278 | @@ -1,454 +0,0 @@ | |||
279 | 1 | /* | ||
280 | 2 | * Copyright (C) 2012-2014 Canonical, Ltd. | ||
281 | 3 | * | ||
282 | 4 | * This program is free software; you can redistribute it and/or modify | ||
283 | 5 | * it under the terms of the GNU General Public License as published by | ||
284 | 6 | * the Free Software Foundation; version 3. | ||
285 | 7 | * | ||
286 | 8 | * This program is distributed in the hope that it will be useful, | ||
287 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
288 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
289 | 11 | * GNU General Public License for more details. | ||
290 | 12 | * | ||
291 | 13 | * You should have received a copy of the GNU General Public License | ||
292 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
293 | 15 | */ | ||
294 | 16 | |||
295 | 17 | import QtQuick 2.4 | ||
296 | 18 | import Ubuntu.Components 1.2 | ||
297 | 19 | |||
298 | 20 | Item { | ||
299 | 21 | id: root | ||
300 | 22 | |||
301 | 23 | property Action leftSideAction: null | ||
302 | 24 | property list<Action> rightSideActions | ||
303 | 25 | property double defaultHeight: units.gu(8) | ||
304 | 26 | property bool locked: false | ||
305 | 27 | property Action activeAction: null | ||
306 | 28 | property var activeItem: null | ||
307 | 29 | property bool triggerActionOnMouseRelease: false | ||
308 | 30 | property color color: Theme.palette.normal.background | ||
309 | 31 | property color selectedColor: "#E6E6E6" | ||
310 | 32 | property bool selected: false | ||
311 | 33 | property bool selectionMode: false | ||
312 | 34 | property alias internalAnchors: mainContents.anchors | ||
313 | 35 | default property alias contents: mainContents.children | ||
314 | 36 | |||
315 | 37 | readonly property double actionWidth: units.gu(4) | ||
316 | 38 | readonly property double leftActionWidth: units.gu(10) | ||
317 | 39 | readonly property double actionThreshold: actionWidth * 0.4 | ||
318 | 40 | readonly property double threshold: 0.4 | ||
319 | 41 | readonly property string swipeState: main.x == 0 ? "Normal" : main.x > 0 ? "LeftToRight" : "RightToLeft" | ||
320 | 42 | readonly property alias swipping: mainItemMoving.running | ||
321 | 43 | readonly property bool _showActions: mouseArea.pressed || swipeState != "Normal" || swipping | ||
322 | 44 | |||
323 | 45 | /* internal */ | ||
324 | 46 | property var _visibleRightSideActions: filterVisibleActions(rightSideActions) | ||
325 | 47 | |||
326 | 48 | signal itemClicked(var mouse) | ||
327 | 49 | signal itemPressAndHold(var mouse) | ||
328 | 50 | |||
329 | 51 | function returnToBoundsRTL(direction) | ||
330 | 52 | { | ||
331 | 53 | var actionFullWidth = actionWidth + units.gu(2) | ||
332 | 54 | |||
333 | 55 | // go back to normal state if swipping reverse | ||
334 | 56 | if (direction === "LTR") { | ||
335 | 57 | updatePosition(0) | ||
336 | 58 | return | ||
337 | 59 | } else if (!triggerActionOnMouseRelease) { | ||
338 | 60 | updatePosition(-rightActionsView.width + units.gu(2)) | ||
339 | 61 | return | ||
340 | 62 | } | ||
341 | 63 | |||
342 | 64 | var xOffset = Math.abs(main.x) | ||
343 | 65 | var index = Math.min(Math.floor(xOffset / actionFullWidth), _visibleRightSideActions.length) | ||
344 | 66 | var newX = 0 | ||
345 | 67 | if (index === _visibleRightSideActions.length) { | ||
346 | 68 | newX = -(rightActionsView.width - units.gu(2)) | ||
347 | 69 | } else if (index >= 1) { | ||
348 | 70 | newX = -(actionFullWidth * index) | ||
349 | 71 | } | ||
350 | 72 | updatePosition(newX) | ||
351 | 73 | } | ||
352 | 74 | |||
353 | 75 | function returnToBoundsLTR(direction) | ||
354 | 76 | { | ||
355 | 77 | var finalX = leftActionWidth | ||
356 | 78 | if ((direction === "RTL") || (main.x <= (finalX * root.threshold))) | ||
357 | 79 | finalX = 0 | ||
358 | 80 | updatePosition(finalX) | ||
359 | 81 | } | ||
360 | 82 | |||
361 | 83 | function returnToBounds(direction) | ||
362 | 84 | { | ||
363 | 85 | if (main.x < 0) { | ||
364 | 86 | returnToBoundsRTL(direction) | ||
365 | 87 | } else if (main.x > 0) { | ||
366 | 88 | returnToBoundsLTR(direction) | ||
367 | 89 | } else { | ||
368 | 90 | updatePosition(0) | ||
369 | 91 | } | ||
370 | 92 | } | ||
371 | 93 | |||
372 | 94 | function contains(item, point, marginX) | ||
373 | 95 | { | ||
374 | 96 | var itemStartX = item.x - marginX | ||
375 | 97 | var itemEndX = item.x + item.width + marginX | ||
376 | 98 | return (point.x >= itemStartX) && (point.x <= itemEndX) && | ||
377 | 99 | (point.y >= item.y) && (point.y <= (item.y + item.height)); | ||
378 | 100 | } | ||
379 | 101 | |||
380 | 102 | function getActionAt(point) | ||
381 | 103 | { | ||
382 | 104 | if (contains(leftActionView, point, 0)) { | ||
383 | 105 | return leftSideAction | ||
384 | 106 | } else if (contains(rightActionsView, point, 0)) { | ||
385 | 107 | var newPoint = root.mapToItem(rightActionsView, point.x, point.y) | ||
386 | 108 | for (var i = 0; i < rightActionsRepeater.count; i++) { | ||
387 | 109 | var child = rightActionsRepeater.itemAt(i) | ||
388 | 110 | if (contains(child, newPoint, units.gu(1))) { | ||
389 | 111 | return i | ||
390 | 112 | } | ||
391 | 113 | } | ||
392 | 114 | } | ||
393 | 115 | return -1 | ||
394 | 116 | } | ||
395 | 117 | |||
396 | 118 | function updateActiveAction() | ||
397 | 119 | { | ||
398 | 120 | if (triggerActionOnMouseRelease && | ||
399 | 121 | (main.x <= -(root.actionWidth + units.gu(2))) && | ||
400 | 122 | (main.x > -(rightActionsView.width - units.gu(2)))) { | ||
401 | 123 | var actionFullWidth = actionWidth + units.gu(2) | ||
402 | 124 | var xOffset = Math.abs(main.x) | ||
403 | 125 | var index = Math.min(Math.floor(xOffset / actionFullWidth), _visibleRightSideActions.length) | ||
404 | 126 | index = index - 1 | ||
405 | 127 | if (index > -1) { | ||
406 | 128 | root.activeItem = rightActionsRepeater.itemAt(index) | ||
407 | 129 | root.activeAction = root._visibleRightSideActions[index] | ||
408 | 130 | } | ||
409 | 131 | } else { | ||
410 | 132 | root.activeAction = null | ||
411 | 133 | } | ||
412 | 134 | } | ||
413 | 135 | |||
414 | 136 | function resetSwipe() | ||
415 | 137 | { | ||
416 | 138 | updatePosition(0) | ||
417 | 139 | } | ||
418 | 140 | |||
419 | 141 | function filterVisibleActions(actions) | ||
420 | 142 | { | ||
421 | 143 | var visibleActions = [] | ||
422 | 144 | for(var i = 0; i < actions.length; i++) { | ||
423 | 145 | var action = actions[i] | ||
424 | 146 | if (action.visible) { | ||
425 | 147 | visibleActions.push(action) | ||
426 | 148 | } | ||
427 | 149 | } | ||
428 | 150 | return visibleActions | ||
429 | 151 | } | ||
430 | 152 | |||
431 | 153 | function updatePosition(pos) | ||
432 | 154 | { | ||
433 | 155 | if (!root.triggerActionOnMouseRelease && (pos !== 0)) { | ||
434 | 156 | mouseArea.state = pos > 0 ? "RightToLeft" : "LeftToRight" | ||
435 | 157 | } else { | ||
436 | 158 | mouseArea.state = "" | ||
437 | 159 | } | ||
438 | 160 | main.x = pos | ||
439 | 161 | } | ||
440 | 162 | |||
441 | 163 | states: [ | ||
442 | 164 | State { | ||
443 | 165 | name: "select" | ||
444 | 166 | when: selectionMode || selected | ||
445 | 167 | PropertyChanges { | ||
446 | 168 | target: selectionIcon | ||
447 | 169 | source: Qt.resolvedUrl("ListItemWithActionsCheckBox.qml") | ||
448 | 170 | anchors.leftMargin: units.gu(2) | ||
449 | 171 | } | ||
450 | 172 | PropertyChanges { | ||
451 | 173 | target: root | ||
452 | 174 | locked: true | ||
453 | 175 | } | ||
454 | 176 | PropertyChanges { | ||
455 | 177 | target: main | ||
456 | 178 | x: 0 | ||
457 | 179 | } | ||
458 | 180 | } | ||
459 | 181 | ] | ||
460 | 182 | |||
461 | 183 | height: defaultHeight | ||
462 | 184 | clip: height !== defaultHeight | ||
463 | 185 | |||
464 | 186 | Rectangle { | ||
465 | 187 | id: leftActionView | ||
466 | 188 | |||
467 | 189 | anchors { | ||
468 | 190 | top: parent.top | ||
469 | 191 | bottom: parent.bottom | ||
470 | 192 | right: main.left | ||
471 | 193 | } | ||
472 | 194 | width: root.leftActionWidth + actionThreshold | ||
473 | 195 | visible: leftSideAction | ||
474 | 196 | color: UbuntuColors.red | ||
475 | 197 | |||
476 | 198 | Icon { | ||
477 | 199 | anchors { | ||
478 | 200 | centerIn: parent | ||
479 | 201 | horizontalCenterOffset: actionThreshold / 2 | ||
480 | 202 | } | ||
481 | 203 | name: leftSideAction && _showActions ? leftSideAction.iconName : "" | ||
482 | 204 | color: Theme.palette.selected.field | ||
483 | 205 | height: units.gu(3) | ||
484 | 206 | width: units.gu(3) | ||
485 | 207 | } | ||
486 | 208 | } | ||
487 | 209 | |||
488 | 210 | Rectangle { | ||
489 | 211 | id: rightActionsView | ||
490 | 212 | |||
491 | 213 | anchors { | ||
492 | 214 | top: main.top | ||
493 | 215 | left: main.right | ||
494 | 216 | bottom: main.bottom | ||
495 | 217 | } | ||
496 | 218 | visible: _visibleRightSideActions.length > 0 | ||
497 | 219 | width: rightActionsRepeater.count > 0 ? rightActionsRepeater.count * (root.actionWidth + units.gu(2)) + root.actionThreshold + units.gu(2) : 0 | ||
498 | 220 | color: "white" | ||
499 | 221 | Row { | ||
500 | 222 | anchors{ | ||
501 | 223 | top: parent.top | ||
502 | 224 | left: parent.left | ||
503 | 225 | leftMargin: units.gu(2) | ||
504 | 226 | right: parent.right | ||
505 | 227 | rightMargin: units.gu(2) | ||
506 | 228 | bottom: parent.bottom | ||
507 | 229 | } | ||
508 | 230 | spacing: units.gu(2) | ||
509 | 231 | Repeater { | ||
510 | 232 | id: rightActionsRepeater | ||
511 | 233 | |||
512 | 234 | model: _showActions ? _visibleRightSideActions : [] | ||
513 | 235 | Item { | ||
514 | 236 | property alias image: img | ||
515 | 237 | |||
516 | 238 | height: rightActionsView.height | ||
517 | 239 | width: root.actionWidth | ||
518 | 240 | |||
519 | 241 | Icon { | ||
520 | 242 | id: img | ||
521 | 243 | |||
522 | 244 | anchors.centerIn: parent | ||
523 | 245 | width: units.gu(3) | ||
524 | 246 | height: units.gu(3) | ||
525 | 247 | name: modelData.iconName | ||
526 | 248 | color: root.activeAction === modelData ? UbuntuColors.lightAubergine : UbuntuColors.lightGrey | ||
527 | 249 | } | ||
528 | 250 | } | ||
529 | 251 | } | ||
530 | 252 | } | ||
531 | 253 | } | ||
532 | 254 | |||
533 | 255 | |||
534 | 256 | Rectangle { | ||
535 | 257 | id: main | ||
536 | 258 | objectName: "mainItem" | ||
537 | 259 | |||
538 | 260 | anchors { | ||
539 | 261 | top: parent.top | ||
540 | 262 | bottom: parent.bottom | ||
541 | 263 | } | ||
542 | 264 | |||
543 | 265 | width: parent.width | ||
544 | 266 | color: root.selected ? root.selectedColor : root.color | ||
545 | 267 | |||
546 | 268 | Loader { | ||
547 | 269 | id: selectionIcon | ||
548 | 270 | |||
549 | 271 | anchors { | ||
550 | 272 | left: main.left | ||
551 | 273 | verticalCenter: main.verticalCenter | ||
552 | 274 | } | ||
553 | 275 | width: (status === Loader.Ready) ? item.implicitWidth : 0 | ||
554 | 276 | visible: (status === Loader.Ready) && (item.width === item.implicitWidth) | ||
555 | 277 | Behavior on width { | ||
556 | 278 | NumberAnimation { | ||
557 | 279 | duration: UbuntuAnimation.SnapDuration | ||
558 | 280 | } | ||
559 | 281 | } | ||
560 | 282 | } | ||
561 | 283 | |||
562 | 284 | |||
563 | 285 | Item { | ||
564 | 286 | id: mainContents | ||
565 | 287 | |||
566 | 288 | anchors { | ||
567 | 289 | left: selectionIcon.right | ||
568 | 290 | leftMargin: units.gu(2) | ||
569 | 291 | top: parent.top | ||
570 | 292 | topMargin: units.gu(1) | ||
571 | 293 | right: parent.right | ||
572 | 294 | rightMargin: units.gu(2) | ||
573 | 295 | bottom: parent.bottom | ||
574 | 296 | bottomMargin: units.gu(1) | ||
575 | 297 | } | ||
576 | 298 | } | ||
577 | 299 | |||
578 | 300 | Behavior on x { | ||
579 | 301 | UbuntuNumberAnimation { | ||
580 | 302 | id: mainItemMoving | ||
581 | 303 | |||
582 | 304 | easing.type: Easing.OutElastic | ||
583 | 305 | duration: UbuntuAnimation.SlowDuration | ||
584 | 306 | } | ||
585 | 307 | } | ||
586 | 308 | Behavior on color { | ||
587 | 309 | ColorAnimation {} | ||
588 | 310 | } | ||
589 | 311 | } | ||
590 | 312 | |||
591 | 313 | SequentialAnimation { | ||
592 | 314 | id: triggerAction | ||
593 | 315 | |||
594 | 316 | property var currentItem: root.activeItem ? root.activeItem.image : null | ||
595 | 317 | |||
596 | 318 | running: false | ||
597 | 319 | ParallelAnimation { | ||
598 | 320 | UbuntuNumberAnimation { | ||
599 | 321 | target: triggerAction.currentItem | ||
600 | 322 | property: "opacity" | ||
601 | 323 | from: 1.0 | ||
602 | 324 | to: 0.0 | ||
603 | 325 | duration: UbuntuAnimation.SlowDuration | ||
604 | 326 | easing {type: Easing.InOutBack; } | ||
605 | 327 | } | ||
606 | 328 | UbuntuNumberAnimation { | ||
607 | 329 | target: triggerAction.currentItem | ||
608 | 330 | properties: "width, height" | ||
609 | 331 | from: units.gu(3) | ||
610 | 332 | to: root.actionWidth | ||
611 | 333 | duration: UbuntuAnimation.SlowDuration | ||
612 | 334 | easing {type: Easing.InOutBack; } | ||
613 | 335 | } | ||
614 | 336 | } | ||
615 | 337 | PropertyAction { | ||
616 | 338 | target: triggerAction.currentItem | ||
617 | 339 | properties: "width, height" | ||
618 | 340 | value: units.gu(3) | ||
619 | 341 | } | ||
620 | 342 | PropertyAction { | ||
621 | 343 | target: triggerAction.currentItem | ||
622 | 344 | properties: "opacity" | ||
623 | 345 | value: 1.0 | ||
624 | 346 | } | ||
625 | 347 | ScriptAction { | ||
626 | 348 | script: { | ||
627 | 349 | root.activeAction.triggered(root) | ||
628 | 350 | mouseArea.state = "" | ||
629 | 351 | } | ||
630 | 352 | } | ||
631 | 353 | PauseAnimation { | ||
632 | 354 | duration: 500 | ||
633 | 355 | } | ||
634 | 356 | UbuntuNumberAnimation { | ||
635 | 357 | target: main | ||
636 | 358 | property: "x" | ||
637 | 359 | to: 0 | ||
638 | 360 | |||
639 | 361 | } | ||
640 | 362 | } | ||
641 | 363 | |||
642 | 364 | MouseArea { | ||
643 | 365 | id: mouseArea | ||
644 | 366 | |||
645 | 367 | property bool locked: root.locked || ((root.leftSideAction === null) && (root._visibleRightSideActions.count === 0)) | ||
646 | 368 | property bool manual: false | ||
647 | 369 | property string direction: "None" | ||
648 | 370 | property real lastX: -1 | ||
649 | 371 | |||
650 | 372 | anchors.fill: parent | ||
651 | 373 | drag { | ||
652 | 374 | target: locked ? null : main | ||
653 | 375 | axis: Drag.XAxis | ||
654 | 376 | minimumX: rightActionsView.visible ? -(rightActionsView.width) : 0 | ||
655 | 377 | maximumX: leftActionView.visible ? leftActionView.width : 0 | ||
656 | 378 | threshold: root.actionThreshold | ||
657 | 379 | } | ||
658 | 380 | |||
659 | 381 | states: [ | ||
660 | 382 | State { | ||
661 | 383 | name: "LeftToRight" | ||
662 | 384 | PropertyChanges { | ||
663 | 385 | target: mouseArea | ||
664 | 386 | drag.maximumX: 0 | ||
665 | 387 | } | ||
666 | 388 | }, | ||
667 | 389 | State { | ||
668 | 390 | name: "RightToLeft" | ||
669 | 391 | PropertyChanges { | ||
670 | 392 | target: mouseArea | ||
671 | 393 | drag.minimumX: 0 | ||
672 | 394 | } | ||
673 | 395 | } | ||
674 | 396 | ] | ||
675 | 397 | |||
676 | 398 | onMouseXChanged: { | ||
677 | 399 | var offset = (lastX - mouseX) | ||
678 | 400 | if (Math.abs(offset) <= root.actionThreshold) { | ||
679 | 401 | return | ||
680 | 402 | } | ||
681 | 403 | lastX = mouseX | ||
682 | 404 | direction = offset > 0 ? "RTL" : "LTR"; | ||
683 | 405 | } | ||
684 | 406 | |||
685 | 407 | onPressed: { | ||
686 | 408 | lastX = mouse.x | ||
687 | 409 | } | ||
688 | 410 | |||
689 | 411 | onReleased: { | ||
690 | 412 | if (root.triggerActionOnMouseRelease && root.activeAction) { | ||
691 | 413 | triggerAction.start() | ||
692 | 414 | } else { | ||
693 | 415 | root.returnToBounds(direction) | ||
694 | 416 | root.activeAction = null | ||
695 | 417 | } | ||
696 | 418 | lastX = -1 | ||
697 | 419 | direction = "None" | ||
698 | 420 | } | ||
699 | 421 | onClicked: { | ||
700 | 422 | if (main.x === 0) { | ||
701 | 423 | root.itemClicked(mouse) | ||
702 | 424 | } else if (main.x > 0) { | ||
703 | 425 | var action = getActionAt(Qt.point(mouse.x, mouse.y)) | ||
704 | 426 | if (action && action !== -1) { | ||
705 | 427 | action.triggered(root) | ||
706 | 428 | } | ||
707 | 429 | } else { | ||
708 | 430 | var actionIndex = getActionAt(Qt.point(mouse.x, mouse.y)) | ||
709 | 431 | if (actionIndex !== -1) { | ||
710 | 432 | root.activeItem = rightActionsRepeater.itemAt(actionIndex) | ||
711 | 433 | root.activeAction = root._visibleRightSideActions[actionIndex] | ||
712 | 434 | triggerAction.start() | ||
713 | 435 | return | ||
714 | 436 | } | ||
715 | 437 | } | ||
716 | 438 | root.resetSwipe() | ||
717 | 439 | } | ||
718 | 440 | |||
719 | 441 | onPositionChanged: { | ||
720 | 442 | if (mouseArea.pressed) { | ||
721 | 443 | updateActiveAction() | ||
722 | 444 | } | ||
723 | 445 | } | ||
724 | 446 | onPressAndHold: { | ||
725 | 447 | if (main.x === 0) { | ||
726 | 448 | root.itemPressAndHold(mouse) | ||
727 | 449 | } | ||
728 | 450 | } | ||
729 | 451 | z: -1 | ||
730 | 452 | } | ||
731 | 453 | } | ||
732 | 454 | |||
733 | 455 | 0 | ||
734 | === modified file 'src/app/qml/SettingsPage.qml' | |||
735 | --- src/app/qml/SettingsPage.qml 2015-12-19 05:14:39 +0000 | |||
736 | +++ src/app/qml/SettingsPage.qml 2016-01-22 18:37:42 +0000 | |||
737 | @@ -1,5 +1,5 @@ | |||
738 | 1 | /* | 1 | /* |
740 | 2 | * Copyright (C) 2013, 2014 Canonical Ltd | 2 | * Copyright (C) 2013, 2014, 2016 Canonical Ltd |
741 | 3 | * | 3 | * |
742 | 4 | * This program is free software: you can redistribute it and/or modify | 4 | * This program is free software: you can redistribute it and/or modify |
743 | 5 | * it under the terms of the GNU General Public License version 3 as | 5 | * it under the terms of the GNU General Public License version 3 as |
744 | @@ -17,96 +17,125 @@ | |||
745 | 17 | */ | 17 | */ |
746 | 18 | 18 | ||
747 | 19 | import QtQuick 2.4 | 19 | import QtQuick 2.4 |
750 | 20 | import Ubuntu.Components 1.2 | 20 | import Ubuntu.Components 1.3 |
749 | 21 | import Ubuntu.Components.ListItems 1.0 as ListItem | ||
751 | 22 | 21 | ||
752 | 23 | Page { | 22 | Page { |
753 | 24 | id: settingsPage | 23 | id: settingsPage |
754 | 25 | objectName: "settingsPage" | 24 | objectName: "settingsPage" |
755 | 26 | 25 | ||
756 | 27 | title: i18n.tr("Settings") | 26 | title: i18n.tr("Settings") |
762 | 28 | 27 | flickable: null | |
763 | 29 | Column { | 28 | |
764 | 30 | id: mainColumn | 29 | Flickable { |
760 | 31 | |||
761 | 32 | spacing: units.gu(1) | ||
765 | 33 | anchors.fill: parent | 30 | anchors.fill: parent |
842 | 34 | 31 | interactive: contentHeight + units.gu(6) > height | |
843 | 35 | ListItem.Standard { | 32 | contentHeight: mainColumn.height |
844 | 36 | text: i18n.tr("Layouts") | 33 | |
845 | 37 | progression: true | 34 | Column { |
846 | 38 | onClicked: pageStack.push(layoutsPage); | 35 | id: mainColumn |
847 | 39 | } | 36 | anchors { left: parent.left; right: parent.right } |
848 | 40 | 37 | spacing: units.gu(1) | |
849 | 41 | ListItem.Standard { | 38 | |
850 | 42 | text: i18n.tr("Show Keyboard Bar") | 39 | ListItem { |
851 | 43 | control: Switch { | 40 | ListItemLayout { |
852 | 44 | onCheckedChanged: settings.showKeyboardBar = checked; | 41 | anchors.fill: parent |
853 | 45 | Component.onCompleted: checked = settings.showKeyboardBar; | 42 | title.text: i18n.tr("Layouts") |
854 | 46 | } | 43 | |
855 | 47 | } | 44 | Icon { |
856 | 48 | 45 | SlotsLayout.position: SlotsLayout.Trailing | |
857 | 49 | ListItem.Standard { | 46 | width: units.gu(2); height: width |
858 | 50 | text: i18n.tr("Show Keyboard Button") | 47 | name: "go-next" |
859 | 51 | control: Switch { | 48 | } |
860 | 52 | onCheckedChanged: settings.showKeyboardButton = checked; | 49 | } |
861 | 53 | Component.onCompleted: checked = settings.showKeyboardButton; | 50 | |
862 | 54 | } | 51 | onClicked: pageStack.push(layoutsPage); |
863 | 55 | } | 52 | } |
864 | 56 | 53 | ||
865 | 57 | ListItem.Empty { | 54 | ListItem { |
866 | 58 | height: units.gu(10) | 55 | ListItemLayout { |
867 | 59 | Label { | 56 | anchors.fill: parent |
868 | 60 | text: i18n.tr("Font Size:") | 57 | title.text: i18n.tr("Show Keyboard Bar") |
869 | 61 | x: units.gu(2) | 58 | |
870 | 62 | } | 59 | Switch { |
871 | 63 | Slider { | 60 | id: keybBarSwitch |
872 | 64 | id: slFont | 61 | SlotsLayout.position: SlotsLayout.Trailing |
873 | 65 | objectName: "slFont" | 62 | onCheckedChanged: settings.showKeyboardBar = checked; |
874 | 66 | anchors { | 63 | Component.onCompleted: checked = settings.showKeyboardBar; |
875 | 67 | left: parent.left | 64 | } |
876 | 68 | right: parent.right | 65 | } |
877 | 69 | bottom: parent.bottom | 66 | |
878 | 70 | margins: units.gu(2) | 67 | onClicked: keybBarSwitch.trigger() |
879 | 71 | } | 68 | } |
880 | 72 | minimumValue: settings.minFontSize; | 69 | |
881 | 73 | maximumValue: settings.maxFontSize; | 70 | ListItem { |
882 | 74 | onValueChanged: { | 71 | ListItemLayout { |
883 | 75 | settings.fontSize = value; | 72 | anchors.fill: parent |
884 | 76 | } | 73 | title.text: i18n.tr("Show Keyboard Button") |
885 | 77 | Component.onCompleted: { | 74 | |
886 | 78 | value = settings.fontSize; | 75 | Switch { |
887 | 79 | } | 76 | id: keybButtonSwitch |
888 | 80 | 77 | SlotsLayout.position: SlotsLayout.Trailing | |
889 | 81 | Connections { | 78 | onCheckedChanged: settings.showKeyboardButton = checked; |
890 | 82 | target: settings | 79 | Component.onCompleted: checked = settings.showKeyboardButton; |
891 | 83 | onFontSizeChanged: { | 80 | } |
892 | 84 | slFont.value = settings.fontSize | 81 | } |
893 | 85 | } | 82 | |
894 | 86 | } | 83 | onClicked: keybButtonSwitch.trigger() |
895 | 87 | } | 84 | } |
896 | 88 | } | 85 | |
897 | 89 | 86 | ListItem { | |
898 | 90 | OptionSelector { | 87 | height: units.gu(12) |
899 | 91 | id: colorsSchemeSelector | 88 | |
900 | 92 | objectName: "colorsSchemeSelector" | 89 | Label { |
901 | 93 | text: i18n.tr("Color Scheme") | 90 | anchors { left: parent.left; margins: units.gu(2) } |
902 | 94 | width: parent.width - units.gu(4) | 91 | text: i18n.tr("Font Size:") |
903 | 95 | x: units.gu(2) | 92 | } |
904 | 96 | 93 | ||
905 | 97 | // TODO Hackish, but works quite well. | 94 | Slider { |
906 | 98 | containerHeight: parent.height - y - units.gu(6) | 95 | id: slFont |
907 | 99 | 96 | objectName: "slFont" | |
908 | 100 | // TODO This is a workaround at the moment. | 97 | anchors { |
909 | 101 | // The application should get them from the c++. | 98 | left: parent.left |
910 | 102 | model: ["GreenOnBlack","WhiteOnBlack","BlackOnWhite","BlackOnRandomLight","Linux","cool-retro-term","DarkPastels","BlackOnLightYellow", "Ubuntu"] | 99 | right: parent.right |
911 | 103 | 100 | bottom: parent.bottom | |
912 | 104 | onSelectedIndexChanged: { | 101 | margins: units.gu(2) |
913 | 105 | settings.colorScheme = model[selectedIndex]; | 102 | } |
914 | 106 | } | 103 | minimumValue: settings.minFontSize; |
915 | 107 | 104 | maximumValue: settings.maxFontSize; | |
916 | 108 | Component.onCompleted: { | 105 | onValueChanged: { |
917 | 109 | selectedIndex = model.indexOf(settings.colorScheme); | 106 | settings.fontSize = value; |
918 | 107 | } | ||
919 | 108 | Component.onCompleted: { | ||
920 | 109 | value = settings.fontSize; | ||
921 | 110 | } | ||
922 | 111 | |||
923 | 112 | Connections { | ||
924 | 113 | target: settings | ||
925 | 114 | onFontSizeChanged: { | ||
926 | 115 | slFont.value = settings.fontSize | ||
927 | 116 | } | ||
928 | 117 | } | ||
929 | 118 | } | ||
930 | 119 | } | ||
931 | 120 | |||
932 | 121 | ListItem { | ||
933 | 122 | ListItemLayout { | ||
934 | 123 | anchors.fill: parent | ||
935 | 124 | title.text: i18n.tr("Color Scheme") | ||
936 | 125 | |||
937 | 126 | Label { | ||
938 | 127 | SlotsLayout.position: SlotsLayout.Trailing | ||
939 | 128 | text: settings.colorScheme | ||
940 | 129 | } | ||
941 | 130 | |||
942 | 131 | Icon { | ||
943 | 132 | SlotsLayout.position: SlotsLayout.Last | ||
944 | 133 | width: units.gu(2); height: width | ||
945 | 134 | name: "go-next" | ||
946 | 135 | } | ||
947 | 136 | } | ||
948 | 137 | |||
949 | 138 | onClicked: pageStack.push(colorSchemePage); | ||
950 | 110 | } | 139 | } |
951 | 111 | } | 140 | } |
952 | 112 | } | 141 | } |
953 | 113 | 142 | ||
954 | === modified file 'src/app/qml/TabsPage.qml' | |||
955 | --- src/app/qml/TabsPage.qml 2015-07-13 20:25:21 +0000 | |||
956 | +++ src/app/qml/TabsPage.qml 2016-01-22 18:37:42 +0000 | |||
957 | @@ -1,6 +1,5 @@ | |||
958 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
961 | 2 | import Ubuntu.Components 1.2 | 2 | import Ubuntu.Components 1.3 |
960 | 3 | import Ubuntu.Components.ListItems 1.0 as ListItem | ||
962 | 4 | 3 | ||
963 | 5 | Page { | 4 | Page { |
964 | 6 | id: tabsPage | 5 | id: tabsPage |
965 | 7 | 6 | ||
966 | === modified file 'src/app/qml/TerminalComponent.qml' | |||
967 | --- src/app/qml/TerminalComponent.qml 2015-07-13 20:25:21 +0000 | |||
968 | +++ src/app/qml/TerminalComponent.qml 2016-01-22 18:37:42 +0000 | |||
969 | @@ -1,5 +1,5 @@ | |||
970 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
972 | 2 | import Ubuntu.Components 1.2 | 2 | import Ubuntu.Components 1.3 |
973 | 3 | import QMLTermWidget 1.0 | 3 | import QMLTermWidget 1.0 |
974 | 4 | 4 | ||
975 | 5 | Component { | 5 | Component { |
976 | 6 | 6 | ||
977 | === modified file 'src/app/qml/TerminalPage.qml' | |||
978 | --- src/app/qml/TerminalPage.qml 2015-12-19 05:14:39 +0000 | |||
979 | +++ src/app/qml/TerminalPage.qml 2016-01-22 18:37:42 +0000 | |||
980 | @@ -1,6 +1,6 @@ | |||
981 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
984 | 2 | import Ubuntu.Components 1.2 | 2 | import Ubuntu.Components 1.3 |
985 | 3 | import Ubuntu.Components.Popups 1.0 | 3 | import Ubuntu.Components.Popups 1.3 |
986 | 4 | import QMLTermWidget 1.0 | 4 | import QMLTermWidget 1.0 |
987 | 5 | 5 | ||
988 | 6 | Page { | 6 | Page { |
989 | @@ -10,6 +10,12 @@ | |||
990 | 10 | 10 | ||
991 | 11 | anchors.fill: parent | 11 | anchors.fill: parent |
992 | 12 | 12 | ||
993 | 13 | header: PageHeader { | ||
994 | 14 | // WORKAROUND: This way we disable the 'hide' animation when | ||
995 | 15 | // closing the settings page. | ||
996 | 16 | visible: false | ||
997 | 17 | } | ||
998 | 18 | |||
999 | 13 | AlternateActionPopover { | 19 | AlternateActionPopover { |
1000 | 14 | id: alternateActionPopover | 20 | id: alternateActionPopover |
1001 | 15 | } | 21 | } |
1002 | 16 | 22 | ||
1003 | === modified file 'src/app/qml/ubuntu-terminal-app.qml' | |||
1004 | --- src/app/qml/ubuntu-terminal-app.qml 2015-08-09 14:03:25 +0000 | |||
1005 | +++ src/app/qml/ubuntu-terminal-app.qml 2016-01-22 18:37:42 +0000 | |||
1006 | @@ -1,6 +1,6 @@ | |||
1007 | 1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 |
1008 | 2 | import QtGraphicalEffects 1.0 | 2 | import QtGraphicalEffects 1.0 |
1010 | 3 | import Ubuntu.Components 1.2 | 3 | import Ubuntu.Components 1.3 |
1011 | 4 | import "KeyboardRows" | 4 | import "KeyboardRows" |
1012 | 5 | 5 | ||
1013 | 6 | import QMLTermWidget 1.0 | 6 | import QMLTermWidget 1.0 |
1014 | @@ -115,6 +115,15 @@ | |||
1015 | 115 | id: layoutsPage | 115 | id: layoutsPage |
1016 | 116 | visible: false | 116 | visible: false |
1017 | 117 | } | 117 | } |
1018 | 118 | |||
1019 | 119 | ColorSchemePage { | ||
1020 | 120 | id: colorSchemePage | ||
1021 | 121 | visible: false | ||
1022 | 122 | |||
1023 | 123 | // TODO This is a workaround at the moment. | ||
1024 | 124 | // The application should get them from the c++. | ||
1025 | 125 | model: ["GreenOnBlack","WhiteOnBlack","BlackOnWhite","BlackOnRandomLight","Linux","cool-retro-term","DarkPastels","BlackOnLightYellow", "Ubuntu"] | ||
1026 | 126 | } | ||
1027 | 118 | } | 127 | } |
1028 | 119 | 128 | ||
1029 | 120 | Component.onCompleted: { | 129 | Component.onCompleted: { |
1030 | 121 | 130 | ||
1031 | === modified file 'terminal.apparmor' | |||
1032 | --- terminal.apparmor 2015-08-02 13:04:57 +0000 | |||
1033 | +++ terminal.apparmor 2016-01-22 18:37:42 +0000 | |||
1034 | @@ -2,4 +2,4 @@ | |||
1035 | 2 | "policy_groups": [], | 2 | "policy_groups": [], |
1036 | 3 | "policy_version": 1.3, | 3 | "policy_version": 1.3, |
1037 | 4 | "template": "unconfined" | 4 | "template": "unconfined" |
1039 | 5 | } | 5 | } |
1040 | 6 | \ No newline at end of file | 6 | \ No newline at end of file |
PASSED: Continuous integration, rev:153 /core-apps- jenkins. ubuntu. com/job/ run-ap- tests-ci/ 162/ /core-apps- jenkins. ubuntu. com/job/ generic- update- mp/443/ console
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild: /core-apps- jenkins. ubuntu. com/job/ run-ap- tests-ci/ 162/rebuild
https:/