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

Proposed by Stefano Verzegnassi
Status: Merged
Approved by: Stefano Verzegnassi
Approved revision: 183
Merged at revision: 195
Proposed branch: lp:~verzegnassi-stefano/ubuntu-terminal-app/uitk13-deprecation
Merge into: lp:~ubuntu-terminal-dev/ubuntu-terminal-app/reboot
Diff against target: 361 lines (+82/-130)
9 files modified
src/app/qml/CircularTransparentButton.qml (+1/-1)
src/app/qml/ColorSchemePage.qml (+30/-24)
src/app/qml/ExpandableButton.qml (+1/-1)
src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml (+1/-1)
src/app/qml/KeyboardRows/KeyboardButton.qml (+1/-1)
src/app/qml/LayoutsPage.qml (+24/-17)
src/app/qml/SettingsPage.qml (+10/-7)
src/app/qml/TabsPage.qml (+13/-77)
src/app/qml/TerminalPage.qml (+1/-1)
To merge this branch: bzr merge lp:~verzegnassi-stefano/ubuntu-terminal-app/uitk13-deprecation
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve
Ubuntu Terminal Developers Pending
Review via email: mp+287990@code.launchpad.net

Commit message

* Use UITK PageHeader, instead of the now deprecated "Page.head" property
* Use ScrollView where appropriate
* Use UITK Label, instead of the QtQuick Text component
* Minor text margins fix in TabsPage

Description of the change

* Use UITK PageHeader, instead of the now deprecated "Page.head" property
* Use ScrollView where appropriate
* Use UITK Label, instead of the QtQuick Text component
* Minor text margins fix in TabsPage

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
Evan McIntire (mcintire-evan) wrote :

All looks good to me, as I said before, I sadly can't test it, but from a lookover of the changes it all seems awesome :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/qml/CircularTransparentButton.qml'
2--- src/app/qml/CircularTransparentButton.qml 2016-01-09 01:47:56 +0000
3+++ src/app/qml/CircularTransparentButton.qml 2016-03-15 14:39:40 +0000
4@@ -22,7 +22,7 @@
5 active: action.text
6 z: parent.z + 0.1
7 anchors.centerIn: parent
8- sourceComponent: Text {
9+ sourceComponent: Label {
10 opacity: innerOpacity
11 text: action.text
12 color: textColor
13
14=== modified file 'src/app/qml/ColorSchemePage.qml'
15--- src/app/qml/ColorSchemePage.qml 2016-02-07 18:30:11 +0000
16+++ src/app/qml/ColorSchemePage.qml 2016-03-15 14:39:40 +0000
17@@ -23,38 +23,44 @@
18 id: rootItem
19 objectName: "colorSchemePage"
20
21- title: i18n.tr("Color Scheme")
22+ header: PageHeader {
23+ title: i18n.tr("Color Scheme")
24+ flickable: listView
25+ }
26
27 property alias model: listView.model
28 property var namesModel
29
30 readonly property string currentName: namesModel[listView.currentIndex]
31
32- ListView {
33- id: listView
34+ ScrollView {
35 anchors.fill: parent
36- model: settings.profilesList
37- currentIndex: model.indexOf(settings.colorScheme)
38- delegate: ListItem {
39- ListItemLayout {
40- anchors.verticalCenter: parent.verticalCenter
41- title.text: namesModel[model.index]
42-
43- Icon {
44- SlotsLayout.position: SlotsLayout.Last
45- width: units.gu(2); height: units.gu(2)
46- color: UbuntuColors.green
47- name: "tick"
48-
49- visible: model.index === listView.currentIndex
50+ ListView {
51+ id: listView
52+ anchors.fill: parent
53+ model: settings.profilesList
54+ currentIndex: model.indexOf(settings.colorScheme)
55+ delegate: ListItem {
56+ ListItemLayout {
57+ anchors.verticalCenter: parent.verticalCenter
58+ title.text: namesModel[model.index]
59+
60+ Icon {
61+ SlotsLayout.position: SlotsLayout.Last
62+ width: units.gu(2); height: units.gu(2)
63+ color: UbuntuColors.green
64+ name: "tick"
65+
66+ visible: model.index === listView.currentIndex
67+ }
68 }
69- }
70-
71- onClicked: listView.currentIndex = model.index
72- }
73-
74- onCurrentIndexChanged: {
75- settings.colorScheme = model[currentIndex];
76+
77+ onClicked: listView.currentIndex = model.index
78+ }
79+
80+ onCurrentIndexChanged: {
81+ settings.colorScheme = model[currentIndex];
82+ }
83 }
84 }
85 }
86
87=== modified file 'src/app/qml/ExpandableButton.qml'
88--- src/app/qml/ExpandableButton.qml 2016-01-09 01:47:56 +0000
89+++ src/app/qml/ExpandableButton.qml 2016-03-15 14:39:40 +0000
90@@ -61,7 +61,7 @@
91 z: parent.z + 0.01
92 anchors.centerIn: parent
93 active: actions[index].text
94- sourceComponent: Text {
95+ sourceComponent: Label {
96 color: textColor
97 text: actions[index].text
98 }
99
100=== modified file 'src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml'
101--- src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml 2016-01-09 01:47:56 +0000
102+++ src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml 2016-03-15 14:39:40 +0000
103@@ -18,7 +18,7 @@
104 z: parent.z + 1
105 }
106
107- Text {
108+ Label {
109 id: mainLabel
110 anchors.centerIn: parent
111 z: parent.z + 0.02
112
113=== modified file 'src/app/qml/KeyboardRows/KeyboardButton.qml'
114--- src/app/qml/KeyboardRows/KeyboardButton.qml 2016-01-09 01:47:56 +0000
115+++ src/app/qml/KeyboardRows/KeyboardButton.qml 2016-03-15 14:39:40 +0000
116@@ -7,7 +7,7 @@
117
118 color: "black"
119
120- Text {
121+ Label {
122 id: mainLabel
123 anchors.centerIn: parent
124 color: "white"
125
126=== modified file 'src/app/qml/LayoutsPage.qml'
127--- src/app/qml/LayoutsPage.qml 2016-01-09 02:00:10 +0000
128+++ src/app/qml/LayoutsPage.qml 2016-03-15 14:39:40 +0000
129@@ -23,33 +23,40 @@
130 id: rootItem
131 objectName: "layoutsPage"
132
133- title: i18n.tr("Layouts")
134+ header: PageHeader {
135+ title: i18n.tr("Layouts")
136+ flickable: listView
137+ }
138
139 onVisibleChanged: {
140 if (visible === false)
141 settings.profilesChanged();
142 }
143
144- ListView {
145+ ScrollView {
146 anchors.fill: parent
147- model: settings.profilesList
148- delegate: ListItem {
149- ListItemLayout {
150- anchors.fill: parent
151- title.text: name
152-
153- Switch {
154- id: layoutSwitch
155- SlotsLayout.position: SlotsLayout.Trailing
156-
157- checked: profileVisible
158- onCheckedChanged: {
159- settings.profilesList.setProperty(index, "profileVisible", checked);
160+ ListView {
161+ id: listView
162+ anchors.fill: parent
163+ model: settings.profilesList
164+ delegate: ListItem {
165+ ListItemLayout {
166+ anchors.fill: parent
167+ title.text: name
168+
169+ Switch {
170+ id: layoutSwitch
171+ SlotsLayout.position: SlotsLayout.Trailing
172+
173+ checked: profileVisible
174+ onCheckedChanged: {
175+ settings.profilesList.setProperty(index, "profileVisible", checked);
176+ }
177 }
178 }
179+
180+ onClicked: layoutSwitch.trigger()
181 }
182-
183- onClicked: layoutSwitch.trigger()
184 }
185 }
186 }
187
188=== modified file 'src/app/qml/SettingsPage.qml'
189--- src/app/qml/SettingsPage.qml 2016-02-07 18:30:11 +0000
190+++ src/app/qml/SettingsPage.qml 2016-03-15 14:39:40 +0000
191@@ -23,17 +23,20 @@
192 id: settingsPage
193 objectName: "settingsPage"
194
195- title: i18n.tr("Settings")
196- flickable: null
197+ header: PageHeader {
198+ title: i18n.tr("Settings")
199+ flickable: scrollView.flickableItem
200+ }
201
202- Flickable {
203+ ScrollView {
204+ id: scrollView
205 anchors.fill: parent
206- interactive: contentHeight + units.gu(6) > height
207- contentHeight: mainColumn.height
208
209 Column {
210- id: mainColumn
211- anchors { left: parent.left; right: parent.right }
212+ // Column is not a child of ScrollView, but it's reparented to
213+ // ScrollView.viewport. For that reason we can not use 'anchors'
214+ // but we have to set the width instead.
215+ width: scrollView.width
216
217 ListItem {
218 ListItemLayout {
219
220=== modified file 'src/app/qml/TabsPage.qml'
221--- src/app/qml/TabsPage.qml 2016-01-09 02:00:10 +0000
222+++ src/app/qml/TabsPage.qml 2016-03-15 14:39:40 +0000
223@@ -4,10 +4,12 @@
224 Page {
225 id: tabsPage
226 objectName: "tabsPage"
227- title: i18n.tr("Tabs")
228-
229- head.actions: [
230- Action {
231+
232+ header: PageHeader {
233+ title: i18n.tr("Tabs")
234+ flickable: tabsGrid
235+
236+ trailingActionBar.actions: Action {
237 objectName: "newTabAcion"
238 iconName: "add"
239 text: i18n.tr("New tab")
240@@ -15,12 +17,10 @@
241 tabsModel.addTab();
242 }
243 }
244- ]
245+ }
246
247- Item {
248+ ScrollView {
249 anchors.fill: parent
250- clip: true
251-
252 GridView {
253 id: tabsGrid
254 anchors.fill: parent
255@@ -29,9 +29,9 @@
256 cellWidth: (parent.width - units.gu(2)) * 0.5
257 cellHeight: cellWidth * (terminalPage.terminalContainer.height / terminalPage.terminalContainer.width)
258
259-// add: Transition {
260-// NumberAnimation { properties: "x,y"; duration: 200 }
261-// }
262+ // add: Transition {
263+ // NumberAnimation { properties: "x,y"; duration: 200 }
264+ // }
265
266 removeDisplaced: Transition {
267 NumberAnimation { properties: "x,y"; duration: 200 }
268@@ -83,8 +83,8 @@
269 opacity: 0.5
270 }
271
272- Text {
273- anchors.fill: blackRect
274+ Label {
275+ anchors { fill: blackRect; margins: units.dp(2) }
276 text: tabsModel.get(index).terminal.session.title
277 wrapMode: Text.Wrap
278 color: "white"
279@@ -110,69 +110,5 @@
280 }
281 }
282 }
283-
284-// ListView {
285-// id: tabView
286-// anchors.fill: parent
287-// model: tabsModel
288-
289-// delegate: ListItemWithActions{
290-// width: parent.width
291-// height: units.gu(25)
292-
293-// onItemClicked: {
294-// // If the currently active tab is pressed. Return to it.
295-// if (tabsModel.selectedIndex == index) {
296-// pageStack.pop();
297-// } else {
298-// tabsModel.selectTab(index);
299-// }
300-// }
301-
302-// contents: Row {
303-// anchors.fill: parent
304-// spacing: units.gu(4)
305-
306-// ShaderEffectSource {
307-// id: thumb
308-
309-// width: height * (model.terminal.width / model.terminal.height)
310-// height: parent.height
311-
312-// sourceItem: model.terminal
313-// }
314-
315-// Label {
316-// width: parent.width - (thumb.width + units.gu(6))
317-
318-// text: tabsModel.get(index).terminal.session.title
319-// anchors.verticalCenter: parent.verticalCenter
320-// wrapMode: Text.Wrap
321-// }
322-// }
323-
324-// Rectangle {
325-// id: selectedTab
326-// anchors.fill: parent
327-// color: Theme.palette.selected.background
328-// opacity: tabsModel.selectedIndex == index ? 1.0 : 0.0
329-
330-// Behavior on opacity {
331-// NumberAnimation { duration: 200 }
332-// }
333-// }
334-
335-// leftSideAction: Action {
336-// iconName: "delete"
337-// text: i18n.tr("Delete")
338-// enabled: tabsModel.count !== 1
339-// onTriggered: {
340-// //Workaround since enabled is ignored
341-// if (enabled)
342-// tabsModel.removeTab(index);
343-// }
344-// }
345-// }
346-// }
347 }
348 }
349
350=== modified file 'src/app/qml/TerminalPage.qml'
351--- src/app/qml/TerminalPage.qml 2016-03-03 23:14:40 +0000
352+++ src/app/qml/TerminalPage.qml 2016-03-15 14:39:40 +0000
353@@ -173,7 +173,7 @@
354 color: "black"
355 opacity: 0.7
356
357- Text {
358+ Label {
359 anchors.centerIn: parent
360 color: "white"
361 text: i18n.tr("Selection Mode")

Subscribers

People subscribed via source and target branches