Merge lp:~verzegnassi-stefano/ubuntu-terminal-app/uitk13-migration into lp:~ubuntu-terminal-dev/ubuntu-terminal-app/reboot

Proposed by Stefano Verzegnassi
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
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-sdk-15.04.3' framework
* 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-sdk-15.04.3' framework
* 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)

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Great work, thank you!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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 {
6 "description": "Terminal application",
7- "framework": "ubuntu-sdk-15.04",
8+ "framework": "ubuntu-sdk-15.04.3",
9 "architecture": "@CLICK_ARCH@",
10 "hooks": {
11 "terminal": {
12
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 import QtQuick 2.4
18-import Ubuntu.Components 1.2
19-import Ubuntu.Components.Popups 1.0
20+import Ubuntu.Components 1.3
21+import Ubuntu.Components.Popups 1.3
22
23 Component {
24 id: popoverComponent
25
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 * Authored by: Arto Jalkanen <ajalkane@gmail.com>
31 */
32 import QtQuick 2.4
33-import Ubuntu.Components 1.2
34-import Ubuntu.Components.Popups 1.0
35+import Ubuntu.Components 1.3
36+import Ubuntu.Components.Popups 1.3
37
38 Dialog {
39 id: root
40
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 * along with this program. If not, see <http://www.gnu.org/licenses/>.
46 */
47 import QtQuick 2.4
48-import Ubuntu.Components 1.2
49-import Ubuntu.Components.Popups 1.0
50+import Ubuntu.Components 1.3
51+import Ubuntu.Components.Popups 1.3
52 import com.ubuntu.PamAuthentication 0.1
53
54 /**
55
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 import QtQuick 2.4
61-import Ubuntu.Components 1.2
62+import Ubuntu.Components 1.3
63
64 Rectangle {
65 property color backgroundColor: "black"
66
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+/*
72+ * Copyright (C) 2013, 2014, 2016 Canonical Ltd
73+ *
74+ * This program is free software: you can redistribute it and/or modify
75+ * it under the terms of the GNU General Public License version 3 as
76+ * published by the Free Software Foundation.
77+ *
78+ * This program is distributed in the hope that it will be useful,
79+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
80+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81+ * GNU General Public License for more details.
82+ *
83+ * You should have received a copy of the GNU General Public License
84+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
85+ *
86+ * Authored by: Filippo Scognamiglio <flscogna@gmail.com>
87+ */
88+
89+import QtQuick 2.4
90+import Ubuntu.Components 1.3
91+
92+Page {
93+ id: rootItem
94+ objectName: "colorSchemePage"
95+
96+ title: i18n.tr("Color Scheme")
97+ property alias model: listView.model
98+
99+ ListView {
100+ id: listView
101+ anchors.fill: parent
102+ model: settings.profilesList
103+ delegate: ListItem {
104+ ListItemLayout {
105+ anchors.fill: parent
106+ title.text: modelData
107+
108+ Icon {
109+ SlotsLayout.position: SlotsLayout.Last
110+ width: units.gu(2); height: units.gu(2)
111+ color: UbuntuColors.green
112+ name: "tick"
113+
114+ visible: model.index == listView.currentIndex
115+ }
116+ }
117+
118+ onClicked: listView.currentIndex = model.index
119+ }
120+
121+ onCurrentIndexChanged: {
122+ settings.colorScheme = model[currentIndex];
123+ }
124+
125+ Component.onCompleted: {
126+ currentIndex = model.indexOf(settings.colorScheme);
127+ }
128+ }
129+}
130
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 import QtQuick 2.4
136-import Ubuntu.Components 1.2
137+import Ubuntu.Components 1.3
138
139 Item {
140 id: container
141
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 import QtQuick 2.4
147-import Ubuntu.Components 1.2
148+import Ubuntu.Components 1.3
149 import "KeyboardRows"
150
151 import "KeyboardRows/jsonParser.js" as Parser
152
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 import QtQuick 2.4
158-import Ubuntu.Components 1.2
159+import Ubuntu.Components 1.3
160
161 import ".."
162
163
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 import QtQuick 2.4
169-import Ubuntu.Components 1.2
170+import Ubuntu.Components 1.3
171
172 Item {
173
174
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 import QtQuick 2.4
180-import Ubuntu.Components 1.2
181+import Ubuntu.Components 1.3
182
183 QtObject {
184 property string text
185
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 import QtQuick 2.4
191-import Ubuntu.Components 1.2
192+import Ubuntu.Components 1.3
193
194 Rectangle {
195 property alias text: mainLabel.text
196
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 import QtQuick 2.4
202-import Ubuntu.Components 1.2
203+import Ubuntu.Components 1.3
204
205 import "jsonParser.js" as Parser
206
207@@ -59,7 +59,7 @@
208 function createEntryString(text, actionString, otherActionsString) {
209 var objectString = "
210 import QtQuick 2.4
211- import Ubuntu.Components 1.2
212+ import Ubuntu.Components 1.3
213
214 KeyModel {
215 text: \"" + text + "\"
216
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 import QtQuick 2.4
222-import Ubuntu.Components 1.2
223+import Ubuntu.Components 1.3
224
225 Rectangle {
226 id: container
227
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 */
233
234 import QtQuick 2.4
235-import Ubuntu.Components 1.2
236-import Ubuntu.Components.ListItems 1.0 as ListItem
237+import Ubuntu.Components 1.3
238
239 Page {
240 id: rootItem
241@@ -34,18 +33,23 @@
242 ListView {
243 anchors.fill: parent
244 model: settings.profilesList
245- delegate: ListItem.Standard {
246- text: name
247-
248- control: Switch {
249- id: layoutSwitch
250- checked: profileVisible
251- onCheckedChanged: {
252- settings.profilesList.setProperty(index, "profileVisible", checked);
253+ delegate: ListItem {
254+ ListItemLayout {
255+ anchors.fill: parent
256+ title.text: name
257+
258+ Switch {
259+ id: layoutSwitch
260+ SlotsLayout.position: SlotsLayout.Trailing
261+
262+ checked: profileVisible
263+ onCheckedChanged: {
264+ settings.profilesList.setProperty(index, "profileVisible", checked);
265+ }
266 }
267 }
268
269- onTriggered: layoutSwitch.trigger()
270+ onClicked: layoutSwitch.trigger()
271 }
272 }
273 }
274
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-/*
280- * Copyright (C) 2012-2014 Canonical, Ltd.
281- *
282- * This program is free software; you can redistribute it and/or modify
283- * it under the terms of the GNU General Public License as published by
284- * the Free Software Foundation; version 3.
285- *
286- * This program is distributed in the hope that it will be useful,
287- * but WITHOUT ANY WARRANTY; without even the implied warranty of
288- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
289- * GNU General Public License for more details.
290- *
291- * You should have received a copy of the GNU General Public License
292- * along with this program. If not, see <http://www.gnu.org/licenses/>.
293- */
294-
295-import QtQuick 2.4
296-import Ubuntu.Components 1.2
297-
298-Item {
299- id: root
300-
301- property Action leftSideAction: null
302- property list<Action> rightSideActions
303- property double defaultHeight: units.gu(8)
304- property bool locked: false
305- property Action activeAction: null
306- property var activeItem: null
307- property bool triggerActionOnMouseRelease: false
308- property color color: Theme.palette.normal.background
309- property color selectedColor: "#E6E6E6"
310- property bool selected: false
311- property bool selectionMode: false
312- property alias internalAnchors: mainContents.anchors
313- default property alias contents: mainContents.children
314-
315- readonly property double actionWidth: units.gu(4)
316- readonly property double leftActionWidth: units.gu(10)
317- readonly property double actionThreshold: actionWidth * 0.4
318- readonly property double threshold: 0.4
319- readonly property string swipeState: main.x == 0 ? "Normal" : main.x > 0 ? "LeftToRight" : "RightToLeft"
320- readonly property alias swipping: mainItemMoving.running
321- readonly property bool _showActions: mouseArea.pressed || swipeState != "Normal" || swipping
322-
323- /* internal */
324- property var _visibleRightSideActions: filterVisibleActions(rightSideActions)
325-
326- signal itemClicked(var mouse)
327- signal itemPressAndHold(var mouse)
328-
329- function returnToBoundsRTL(direction)
330- {
331- var actionFullWidth = actionWidth + units.gu(2)
332-
333- // go back to normal state if swipping reverse
334- if (direction === "LTR") {
335- updatePosition(0)
336- return
337- } else if (!triggerActionOnMouseRelease) {
338- updatePosition(-rightActionsView.width + units.gu(2))
339- return
340- }
341-
342- var xOffset = Math.abs(main.x)
343- var index = Math.min(Math.floor(xOffset / actionFullWidth), _visibleRightSideActions.length)
344- var newX = 0
345- if (index === _visibleRightSideActions.length) {
346- newX = -(rightActionsView.width - units.gu(2))
347- } else if (index >= 1) {
348- newX = -(actionFullWidth * index)
349- }
350- updatePosition(newX)
351- }
352-
353- function returnToBoundsLTR(direction)
354- {
355- var finalX = leftActionWidth
356- if ((direction === "RTL") || (main.x <= (finalX * root.threshold)))
357- finalX = 0
358- updatePosition(finalX)
359- }
360-
361- function returnToBounds(direction)
362- {
363- if (main.x < 0) {
364- returnToBoundsRTL(direction)
365- } else if (main.x > 0) {
366- returnToBoundsLTR(direction)
367- } else {
368- updatePosition(0)
369- }
370- }
371-
372- function contains(item, point, marginX)
373- {
374- var itemStartX = item.x - marginX
375- var itemEndX = item.x + item.width + marginX
376- return (point.x >= itemStartX) && (point.x <= itemEndX) &&
377- (point.y >= item.y) && (point.y <= (item.y + item.height));
378- }
379-
380- function getActionAt(point)
381- {
382- if (contains(leftActionView, point, 0)) {
383- return leftSideAction
384- } else if (contains(rightActionsView, point, 0)) {
385- var newPoint = root.mapToItem(rightActionsView, point.x, point.y)
386- for (var i = 0; i < rightActionsRepeater.count; i++) {
387- var child = rightActionsRepeater.itemAt(i)
388- if (contains(child, newPoint, units.gu(1))) {
389- return i
390- }
391- }
392- }
393- return -1
394- }
395-
396- function updateActiveAction()
397- {
398- if (triggerActionOnMouseRelease &&
399- (main.x <= -(root.actionWidth + units.gu(2))) &&
400- (main.x > -(rightActionsView.width - units.gu(2)))) {
401- var actionFullWidth = actionWidth + units.gu(2)
402- var xOffset = Math.abs(main.x)
403- var index = Math.min(Math.floor(xOffset / actionFullWidth), _visibleRightSideActions.length)
404- index = index - 1
405- if (index > -1) {
406- root.activeItem = rightActionsRepeater.itemAt(index)
407- root.activeAction = root._visibleRightSideActions[index]
408- }
409- } else {
410- root.activeAction = null
411- }
412- }
413-
414- function resetSwipe()
415- {
416- updatePosition(0)
417- }
418-
419- function filterVisibleActions(actions)
420- {
421- var visibleActions = []
422- for(var i = 0; i < actions.length; i++) {
423- var action = actions[i]
424- if (action.visible) {
425- visibleActions.push(action)
426- }
427- }
428- return visibleActions
429- }
430-
431- function updatePosition(pos)
432- {
433- if (!root.triggerActionOnMouseRelease && (pos !== 0)) {
434- mouseArea.state = pos > 0 ? "RightToLeft" : "LeftToRight"
435- } else {
436- mouseArea.state = ""
437- }
438- main.x = pos
439- }
440-
441- states: [
442- State {
443- name: "select"
444- when: selectionMode || selected
445- PropertyChanges {
446- target: selectionIcon
447- source: Qt.resolvedUrl("ListItemWithActionsCheckBox.qml")
448- anchors.leftMargin: units.gu(2)
449- }
450- PropertyChanges {
451- target: root
452- locked: true
453- }
454- PropertyChanges {
455- target: main
456- x: 0
457- }
458- }
459- ]
460-
461- height: defaultHeight
462- clip: height !== defaultHeight
463-
464- Rectangle {
465- id: leftActionView
466-
467- anchors {
468- top: parent.top
469- bottom: parent.bottom
470- right: main.left
471- }
472- width: root.leftActionWidth + actionThreshold
473- visible: leftSideAction
474- color: UbuntuColors.red
475-
476- Icon {
477- anchors {
478- centerIn: parent
479- horizontalCenterOffset: actionThreshold / 2
480- }
481- name: leftSideAction && _showActions ? leftSideAction.iconName : ""
482- color: Theme.palette.selected.field
483- height: units.gu(3)
484- width: units.gu(3)
485- }
486- }
487-
488- Rectangle {
489- id: rightActionsView
490-
491- anchors {
492- top: main.top
493- left: main.right
494- bottom: main.bottom
495- }
496- visible: _visibleRightSideActions.length > 0
497- width: rightActionsRepeater.count > 0 ? rightActionsRepeater.count * (root.actionWidth + units.gu(2)) + root.actionThreshold + units.gu(2) : 0
498- color: "white"
499- Row {
500- anchors{
501- top: parent.top
502- left: parent.left
503- leftMargin: units.gu(2)
504- right: parent.right
505- rightMargin: units.gu(2)
506- bottom: parent.bottom
507- }
508- spacing: units.gu(2)
509- Repeater {
510- id: rightActionsRepeater
511-
512- model: _showActions ? _visibleRightSideActions : []
513- Item {
514- property alias image: img
515-
516- height: rightActionsView.height
517- width: root.actionWidth
518-
519- Icon {
520- id: img
521-
522- anchors.centerIn: parent
523- width: units.gu(3)
524- height: units.gu(3)
525- name: modelData.iconName
526- color: root.activeAction === modelData ? UbuntuColors.lightAubergine : UbuntuColors.lightGrey
527- }
528- }
529- }
530- }
531- }
532-
533-
534- Rectangle {
535- id: main
536- objectName: "mainItem"
537-
538- anchors {
539- top: parent.top
540- bottom: parent.bottom
541- }
542-
543- width: parent.width
544- color: root.selected ? root.selectedColor : root.color
545-
546- Loader {
547- id: selectionIcon
548-
549- anchors {
550- left: main.left
551- verticalCenter: main.verticalCenter
552- }
553- width: (status === Loader.Ready) ? item.implicitWidth : 0
554- visible: (status === Loader.Ready) && (item.width === item.implicitWidth)
555- Behavior on width {
556- NumberAnimation {
557- duration: UbuntuAnimation.SnapDuration
558- }
559- }
560- }
561-
562-
563- Item {
564- id: mainContents
565-
566- anchors {
567- left: selectionIcon.right
568- leftMargin: units.gu(2)
569- top: parent.top
570- topMargin: units.gu(1)
571- right: parent.right
572- rightMargin: units.gu(2)
573- bottom: parent.bottom
574- bottomMargin: units.gu(1)
575- }
576- }
577-
578- Behavior on x {
579- UbuntuNumberAnimation {
580- id: mainItemMoving
581-
582- easing.type: Easing.OutElastic
583- duration: UbuntuAnimation.SlowDuration
584- }
585- }
586- Behavior on color {
587- ColorAnimation {}
588- }
589- }
590-
591- SequentialAnimation {
592- id: triggerAction
593-
594- property var currentItem: root.activeItem ? root.activeItem.image : null
595-
596- running: false
597- ParallelAnimation {
598- UbuntuNumberAnimation {
599- target: triggerAction.currentItem
600- property: "opacity"
601- from: 1.0
602- to: 0.0
603- duration: UbuntuAnimation.SlowDuration
604- easing {type: Easing.InOutBack; }
605- }
606- UbuntuNumberAnimation {
607- target: triggerAction.currentItem
608- properties: "width, height"
609- from: units.gu(3)
610- to: root.actionWidth
611- duration: UbuntuAnimation.SlowDuration
612- easing {type: Easing.InOutBack; }
613- }
614- }
615- PropertyAction {
616- target: triggerAction.currentItem
617- properties: "width, height"
618- value: units.gu(3)
619- }
620- PropertyAction {
621- target: triggerAction.currentItem
622- properties: "opacity"
623- value: 1.0
624- }
625- ScriptAction {
626- script: {
627- root.activeAction.triggered(root)
628- mouseArea.state = ""
629- }
630- }
631- PauseAnimation {
632- duration: 500
633- }
634- UbuntuNumberAnimation {
635- target: main
636- property: "x"
637- to: 0
638-
639- }
640- }
641-
642- MouseArea {
643- id: mouseArea
644-
645- property bool locked: root.locked || ((root.leftSideAction === null) && (root._visibleRightSideActions.count === 0))
646- property bool manual: false
647- property string direction: "None"
648- property real lastX: -1
649-
650- anchors.fill: parent
651- drag {
652- target: locked ? null : main
653- axis: Drag.XAxis
654- minimumX: rightActionsView.visible ? -(rightActionsView.width) : 0
655- maximumX: leftActionView.visible ? leftActionView.width : 0
656- threshold: root.actionThreshold
657- }
658-
659- states: [
660- State {
661- name: "LeftToRight"
662- PropertyChanges {
663- target: mouseArea
664- drag.maximumX: 0
665- }
666- },
667- State {
668- name: "RightToLeft"
669- PropertyChanges {
670- target: mouseArea
671- drag.minimumX: 0
672- }
673- }
674- ]
675-
676- onMouseXChanged: {
677- var offset = (lastX - mouseX)
678- if (Math.abs(offset) <= root.actionThreshold) {
679- return
680- }
681- lastX = mouseX
682- direction = offset > 0 ? "RTL" : "LTR";
683- }
684-
685- onPressed: {
686- lastX = mouse.x
687- }
688-
689- onReleased: {
690- if (root.triggerActionOnMouseRelease && root.activeAction) {
691- triggerAction.start()
692- } else {
693- root.returnToBounds(direction)
694- root.activeAction = null
695- }
696- lastX = -1
697- direction = "None"
698- }
699- onClicked: {
700- if (main.x === 0) {
701- root.itemClicked(mouse)
702- } else if (main.x > 0) {
703- var action = getActionAt(Qt.point(mouse.x, mouse.y))
704- if (action && action !== -1) {
705- action.triggered(root)
706- }
707- } else {
708- var actionIndex = getActionAt(Qt.point(mouse.x, mouse.y))
709- if (actionIndex !== -1) {
710- root.activeItem = rightActionsRepeater.itemAt(actionIndex)
711- root.activeAction = root._visibleRightSideActions[actionIndex]
712- triggerAction.start()
713- return
714- }
715- }
716- root.resetSwipe()
717- }
718-
719- onPositionChanged: {
720- if (mouseArea.pressed) {
721- updateActiveAction()
722- }
723- }
724- onPressAndHold: {
725- if (main.x === 0) {
726- root.itemPressAndHold(mouse)
727- }
728- }
729- z: -1
730- }
731-}
732-
733
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 /*
739- * Copyright (C) 2013, 2014 Canonical Ltd
740+ * Copyright (C) 2013, 2014, 2016 Canonical Ltd
741 *
742 * This program is free software: you can redistribute it and/or modify
743 * it under the terms of the GNU General Public License version 3 as
744@@ -17,96 +17,125 @@
745 */
746
747 import QtQuick 2.4
748-import Ubuntu.Components 1.2
749-import Ubuntu.Components.ListItems 1.0 as ListItem
750+import Ubuntu.Components 1.3
751
752 Page {
753 id: settingsPage
754 objectName: "settingsPage"
755
756 title: i18n.tr("Settings")
757-
758- Column {
759- id: mainColumn
760-
761- spacing: units.gu(1)
762+ flickable: null
763+
764+ Flickable {
765 anchors.fill: parent
766-
767- ListItem.Standard {
768- text: i18n.tr("Layouts")
769- progression: true
770- onClicked: pageStack.push(layoutsPage);
771- }
772-
773- ListItem.Standard {
774- text: i18n.tr("Show Keyboard Bar")
775- control: Switch {
776- onCheckedChanged: settings.showKeyboardBar = checked;
777- Component.onCompleted: checked = settings.showKeyboardBar;
778- }
779- }
780-
781- ListItem.Standard {
782- text: i18n.tr("Show Keyboard Button")
783- control: Switch {
784- onCheckedChanged: settings.showKeyboardButton = checked;
785- Component.onCompleted: checked = settings.showKeyboardButton;
786- }
787- }
788-
789- ListItem.Empty {
790- height: units.gu(10)
791- Label {
792- text: i18n.tr("Font Size:")
793- x: units.gu(2)
794- }
795- Slider {
796- id: slFont
797- objectName: "slFont"
798- anchors {
799- left: parent.left
800- right: parent.right
801- bottom: parent.bottom
802- margins: units.gu(2)
803- }
804- minimumValue: settings.minFontSize;
805- maximumValue: settings.maxFontSize;
806- onValueChanged: {
807- settings.fontSize = value;
808- }
809- Component.onCompleted: {
810- value = settings.fontSize;
811- }
812-
813- Connections {
814- target: settings
815- onFontSizeChanged: {
816- slFont.value = settings.fontSize
817- }
818- }
819- }
820- }
821-
822- OptionSelector {
823- id: colorsSchemeSelector
824- objectName: "colorsSchemeSelector"
825- text: i18n.tr("Color Scheme")
826- width: parent.width - units.gu(4)
827- x: units.gu(2)
828-
829- // TODO Hackish, but works quite well.
830- containerHeight: parent.height - y - units.gu(6)
831-
832- // TODO This is a workaround at the moment.
833- // The application should get them from the c++.
834- model: ["GreenOnBlack","WhiteOnBlack","BlackOnWhite","BlackOnRandomLight","Linux","cool-retro-term","DarkPastels","BlackOnLightYellow", "Ubuntu"]
835-
836- onSelectedIndexChanged: {
837- settings.colorScheme = model[selectedIndex];
838- }
839-
840- Component.onCompleted: {
841- selectedIndex = model.indexOf(settings.colorScheme);
842+ interactive: contentHeight + units.gu(6) > height
843+ contentHeight: mainColumn.height
844+
845+ Column {
846+ id: mainColumn
847+ anchors { left: parent.left; right: parent.right }
848+ spacing: units.gu(1)
849+
850+ ListItem {
851+ ListItemLayout {
852+ anchors.fill: parent
853+ title.text: i18n.tr("Layouts")
854+
855+ Icon {
856+ SlotsLayout.position: SlotsLayout.Trailing
857+ width: units.gu(2); height: width
858+ name: "go-next"
859+ }
860+ }
861+
862+ onClicked: pageStack.push(layoutsPage);
863+ }
864+
865+ ListItem {
866+ ListItemLayout {
867+ anchors.fill: parent
868+ title.text: i18n.tr("Show Keyboard Bar")
869+
870+ Switch {
871+ id: keybBarSwitch
872+ SlotsLayout.position: SlotsLayout.Trailing
873+ onCheckedChanged: settings.showKeyboardBar = checked;
874+ Component.onCompleted: checked = settings.showKeyboardBar;
875+ }
876+ }
877+
878+ onClicked: keybBarSwitch.trigger()
879+ }
880+
881+ ListItem {
882+ ListItemLayout {
883+ anchors.fill: parent
884+ title.text: i18n.tr("Show Keyboard Button")
885+
886+ Switch {
887+ id: keybButtonSwitch
888+ SlotsLayout.position: SlotsLayout.Trailing
889+ onCheckedChanged: settings.showKeyboardButton = checked;
890+ Component.onCompleted: checked = settings.showKeyboardButton;
891+ }
892+ }
893+
894+ onClicked: keybButtonSwitch.trigger()
895+ }
896+
897+ ListItem {
898+ height: units.gu(12)
899+
900+ Label {
901+ anchors { left: parent.left; margins: units.gu(2) }
902+ text: i18n.tr("Font Size:")
903+ }
904+
905+ Slider {
906+ id: slFont
907+ objectName: "slFont"
908+ anchors {
909+ left: parent.left
910+ right: parent.right
911+ bottom: parent.bottom
912+ margins: units.gu(2)
913+ }
914+ minimumValue: settings.minFontSize;
915+ maximumValue: settings.maxFontSize;
916+ onValueChanged: {
917+ settings.fontSize = value;
918+ }
919+ Component.onCompleted: {
920+ value = settings.fontSize;
921+ }
922+
923+ Connections {
924+ target: settings
925+ onFontSizeChanged: {
926+ slFont.value = settings.fontSize
927+ }
928+ }
929+ }
930+ }
931+
932+ ListItem {
933+ ListItemLayout {
934+ anchors.fill: parent
935+ title.text: i18n.tr("Color Scheme")
936+
937+ Label {
938+ SlotsLayout.position: SlotsLayout.Trailing
939+ text: settings.colorScheme
940+ }
941+
942+ Icon {
943+ SlotsLayout.position: SlotsLayout.Last
944+ width: units.gu(2); height: width
945+ name: "go-next"
946+ }
947+ }
948+
949+ onClicked: pageStack.push(colorSchemePage);
950 }
951 }
952 }
953
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 import QtQuick 2.4
959-import Ubuntu.Components 1.2
960-import Ubuntu.Components.ListItems 1.0 as ListItem
961+import Ubuntu.Components 1.3
962
963 Page {
964 id: tabsPage
965
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 import QtQuick 2.4
971-import Ubuntu.Components 1.2
972+import Ubuntu.Components 1.3
973 import QMLTermWidget 1.0
974
975 Component {
976
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 import QtQuick 2.4
982-import Ubuntu.Components 1.2
983-import Ubuntu.Components.Popups 1.0
984+import Ubuntu.Components 1.3
985+import Ubuntu.Components.Popups 1.3
986 import QMLTermWidget 1.0
987
988 Page {
989@@ -10,6 +10,12 @@
990
991 anchors.fill: parent
992
993+ header: PageHeader {
994+ // WORKAROUND: This way we disable the 'hide' animation when
995+ // closing the settings page.
996+ visible: false
997+ }
998+
999 AlternateActionPopover {
1000 id: alternateActionPopover
1001 }
1002
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 import QtQuick 2.4
1008 import QtGraphicalEffects 1.0
1009-import Ubuntu.Components 1.2
1010+import Ubuntu.Components 1.3
1011 import "KeyboardRows"
1012
1013 import QMLTermWidget 1.0
1014@@ -115,6 +115,15 @@
1015 id: layoutsPage
1016 visible: false
1017 }
1018+
1019+ ColorSchemePage {
1020+ id: colorSchemePage
1021+ visible: false
1022+
1023+ // TODO This is a workaround at the moment.
1024+ // The application should get them from the c++.
1025+ model: ["GreenOnBlack","WhiteOnBlack","BlackOnWhite","BlackOnRandomLight","Linux","cool-retro-term","DarkPastels","BlackOnLightYellow", "Ubuntu"]
1026+ }
1027 }
1028
1029 Component.onCompleted: {
1030
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 "policy_groups": [],
1036 "policy_version": 1.3,
1037 "template": "unconfined"
1038-}
1039+}
1040\ No newline at end of file

Subscribers

People subscribed via source and target branches