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
=== modified file 'src/app/qml/CircularTransparentButton.qml'
--- src/app/qml/CircularTransparentButton.qml 2016-01-09 01:47:56 +0000
+++ src/app/qml/CircularTransparentButton.qml 2016-03-15 14:39:40 +0000
@@ -22,7 +22,7 @@
22 active: action.text22 active: action.text
23 z: parent.z + 0.123 z: parent.z + 0.1
24 anchors.centerIn: parent24 anchors.centerIn: parent
25 sourceComponent: Text {25 sourceComponent: Label {
26 opacity: innerOpacity26 opacity: innerOpacity
27 text: action.text27 text: action.text
28 color: textColor28 color: textColor
2929
=== modified file 'src/app/qml/ColorSchemePage.qml'
--- src/app/qml/ColorSchemePage.qml 2016-02-07 18:30:11 +0000
+++ src/app/qml/ColorSchemePage.qml 2016-03-15 14:39:40 +0000
@@ -23,38 +23,44 @@
23 id: rootItem23 id: rootItem
24 objectName: "colorSchemePage"24 objectName: "colorSchemePage"
2525
26 title: i18n.tr("Color Scheme")26 header: PageHeader {
27 title: i18n.tr("Color Scheme")
28 flickable: listView
29 }
2730
28 property alias model: listView.model31 property alias model: listView.model
29 property var namesModel32 property var namesModel
3033
31 readonly property string currentName: namesModel[listView.currentIndex]34 readonly property string currentName: namesModel[listView.currentIndex]
3235
33 ListView {36 ScrollView {
34 id: listView
35 anchors.fill: parent37 anchors.fill: parent
36 model: settings.profilesList38 ListView {
37 currentIndex: model.indexOf(settings.colorScheme)39 id: listView
38 delegate: ListItem {40 anchors.fill: parent
39 ListItemLayout {41 model: settings.profilesList
40 anchors.verticalCenter: parent.verticalCenter42 currentIndex: model.indexOf(settings.colorScheme)
41 title.text: namesModel[model.index]43 delegate: ListItem {
4244 ListItemLayout {
43 Icon {45 anchors.verticalCenter: parent.verticalCenter
44 SlotsLayout.position: SlotsLayout.Last46 title.text: namesModel[model.index]
45 width: units.gu(2); height: units.gu(2)47
46 color: UbuntuColors.green48 Icon {
47 name: "tick"49 SlotsLayout.position: SlotsLayout.Last
4850 width: units.gu(2); height: units.gu(2)
49 visible: model.index === listView.currentIndex51 color: UbuntuColors.green
52 name: "tick"
53
54 visible: model.index === listView.currentIndex
55 }
50 }56 }
51 }57
5258 onClicked: listView.currentIndex = model.index
53 onClicked: listView.currentIndex = model.index59 }
54 }60
5561 onCurrentIndexChanged: {
56 onCurrentIndexChanged: {62 settings.colorScheme = model[currentIndex];
57 settings.colorScheme = model[currentIndex];63 }
58 }64 }
59 }65 }
60}66}
6167
=== modified file 'src/app/qml/ExpandableButton.qml'
--- src/app/qml/ExpandableButton.qml 2016-01-09 01:47:56 +0000
+++ src/app/qml/ExpandableButton.qml 2016-03-15 14:39:40 +0000
@@ -61,7 +61,7 @@
61 z: parent.z + 0.0161 z: parent.z + 0.01
62 anchors.centerIn: parent62 anchors.centerIn: parent
63 active: actions[index].text63 active: actions[index].text
64 sourceComponent: Text {64 sourceComponent: Label {
65 color: textColor65 color: textColor
66 text: actions[index].text66 text: actions[index].text
67 }67 }
6868
=== modified file 'src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml'
--- src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml 2016-01-09 01:47:56 +0000
+++ src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml 2016-03-15 14:39:40 +0000
@@ -18,7 +18,7 @@
18 z: parent.z + 118 z: parent.z + 1
19 }19 }
2020
21 Text {21 Label {
22 id: mainLabel22 id: mainLabel
23 anchors.centerIn: parent23 anchors.centerIn: parent
24 z: parent.z + 0.0224 z: parent.z + 0.02
2525
=== modified file 'src/app/qml/KeyboardRows/KeyboardButton.qml'
--- src/app/qml/KeyboardRows/KeyboardButton.qml 2016-01-09 01:47:56 +0000
+++ src/app/qml/KeyboardRows/KeyboardButton.qml 2016-03-15 14:39:40 +0000
@@ -7,7 +7,7 @@
77
8 color: "black"8 color: "black"
99
10 Text {10 Label {
11 id: mainLabel11 id: mainLabel
12 anchors.centerIn: parent12 anchors.centerIn: parent
13 color: "white"13 color: "white"
1414
=== modified file 'src/app/qml/LayoutsPage.qml'
--- src/app/qml/LayoutsPage.qml 2016-01-09 02:00:10 +0000
+++ src/app/qml/LayoutsPage.qml 2016-03-15 14:39:40 +0000
@@ -23,33 +23,40 @@
23 id: rootItem23 id: rootItem
24 objectName: "layoutsPage"24 objectName: "layoutsPage"
2525
26 title: i18n.tr("Layouts")26 header: PageHeader {
27 title: i18n.tr("Layouts")
28 flickable: listView
29 }
2730
28 onVisibleChanged: {31 onVisibleChanged: {
29 if (visible === false)32 if (visible === false)
30 settings.profilesChanged();33 settings.profilesChanged();
31 }34 }
3235
33 ListView {36 ScrollView {
34 anchors.fill: parent37 anchors.fill: parent
35 model: settings.profilesList38 ListView {
36 delegate: ListItem {39 id: listView
37 ListItemLayout {40 anchors.fill: parent
38 anchors.fill: parent41 model: settings.profilesList
39 title.text: name42 delegate: ListItem {
4043 ListItemLayout {
41 Switch {44 anchors.fill: parent
42 id: layoutSwitch45 title.text: name
43 SlotsLayout.position: SlotsLayout.Trailing46
4447 Switch {
45 checked: profileVisible48 id: layoutSwitch
46 onCheckedChanged: {49 SlotsLayout.position: SlotsLayout.Trailing
47 settings.profilesList.setProperty(index, "profileVisible", checked);50
51 checked: profileVisible
52 onCheckedChanged: {
53 settings.profilesList.setProperty(index, "profileVisible", checked);
54 }
48 }55 }
49 }56 }
57
58 onClicked: layoutSwitch.trigger()
50 }59 }
51
52 onClicked: layoutSwitch.trigger()
53 }60 }
54 }61 }
55}62}
5663
=== modified file 'src/app/qml/SettingsPage.qml'
--- src/app/qml/SettingsPage.qml 2016-02-07 18:30:11 +0000
+++ src/app/qml/SettingsPage.qml 2016-03-15 14:39:40 +0000
@@ -23,17 +23,20 @@
23 id: settingsPage23 id: settingsPage
24 objectName: "settingsPage"24 objectName: "settingsPage"
2525
26 title: i18n.tr("Settings")26 header: PageHeader {
27 flickable: null27 title: i18n.tr("Settings")
28 flickable: scrollView.flickableItem
29 }
2830
29 Flickable {31 ScrollView {
32 id: scrollView
30 anchors.fill: parent33 anchors.fill: parent
31 interactive: contentHeight + units.gu(6) > height
32 contentHeight: mainColumn.height
3334
34 Column {35 Column {
35 id: mainColumn36 // Column is not a child of ScrollView, but it's reparented to
36 anchors { left: parent.left; right: parent.right }37 // ScrollView.viewport. For that reason we can not use 'anchors'
38 // but we have to set the width instead.
39 width: scrollView.width
3740
38 ListItem {41 ListItem {
39 ListItemLayout {42 ListItemLayout {
4043
=== modified file 'src/app/qml/TabsPage.qml'
--- src/app/qml/TabsPage.qml 2016-01-09 02:00:10 +0000
+++ src/app/qml/TabsPage.qml 2016-03-15 14:39:40 +0000
@@ -4,10 +4,12 @@
4Page {4Page {
5 id: tabsPage5 id: tabsPage
6 objectName: "tabsPage"6 objectName: "tabsPage"
7 title: i18n.tr("Tabs")7
88 header: PageHeader {
9 head.actions: [9 title: i18n.tr("Tabs")
10 Action {10 flickable: tabsGrid
11
12 trailingActionBar.actions: Action {
11 objectName: "newTabAcion"13 objectName: "newTabAcion"
12 iconName: "add"14 iconName: "add"
13 text: i18n.tr("New tab")15 text: i18n.tr("New tab")
@@ -15,12 +17,10 @@
15 tabsModel.addTab();17 tabsModel.addTab();
16 }18 }
17 }19 }
18 ]20 }
1921
20 Item {22 ScrollView {
21 anchors.fill: parent23 anchors.fill: parent
22 clip: true
23
24 GridView {24 GridView {
25 id: tabsGrid25 id: tabsGrid
26 anchors.fill: parent26 anchors.fill: parent
@@ -29,9 +29,9 @@
29 cellWidth: (parent.width - units.gu(2)) * 0.529 cellWidth: (parent.width - units.gu(2)) * 0.5
30 cellHeight: cellWidth * (terminalPage.terminalContainer.height / terminalPage.terminalContainer.width)30 cellHeight: cellWidth * (terminalPage.terminalContainer.height / terminalPage.terminalContainer.width)
3131
32// add: Transition {32 // add: Transition {
33// NumberAnimation { properties: "x,y"; duration: 200 }33 // NumberAnimation { properties: "x,y"; duration: 200 }
34// }34 // }
3535
36 removeDisplaced: Transition {36 removeDisplaced: Transition {
37 NumberAnimation { properties: "x,y"; duration: 200 }37 NumberAnimation { properties: "x,y"; duration: 200 }
@@ -83,8 +83,8 @@
83 opacity: 0.583 opacity: 0.5
84 }84 }
8585
86 Text {86 Label {
87 anchors.fill: blackRect87 anchors { fill: blackRect; margins: units.dp(2) }
88 text: tabsModel.get(index).terminal.session.title88 text: tabsModel.get(index).terminal.session.title
89 wrapMode: Text.Wrap89 wrapMode: Text.Wrap
90 color: "white"90 color: "white"
@@ -110,69 +110,5 @@
110 }110 }
111 }111 }
112 }112 }
113
114// ListView {
115// id: tabView
116// anchors.fill: parent
117// model: tabsModel
118
119// delegate: ListItemWithActions{
120// width: parent.width
121// height: units.gu(25)
122
123// onItemClicked: {
124// // If the currently active tab is pressed. Return to it.
125// if (tabsModel.selectedIndex == index) {
126// pageStack.pop();
127// } else {
128// tabsModel.selectTab(index);
129// }
130// }
131
132// contents: Row {
133// anchors.fill: parent
134// spacing: units.gu(4)
135
136// ShaderEffectSource {
137// id: thumb
138
139// width: height * (model.terminal.width / model.terminal.height)
140// height: parent.height
141
142// sourceItem: model.terminal
143// }
144
145// Label {
146// width: parent.width - (thumb.width + units.gu(6))
147
148// text: tabsModel.get(index).terminal.session.title
149// anchors.verticalCenter: parent.verticalCenter
150// wrapMode: Text.Wrap
151// }
152// }
153
154// Rectangle {
155// id: selectedTab
156// anchors.fill: parent
157// color: Theme.palette.selected.background
158// opacity: tabsModel.selectedIndex == index ? 1.0 : 0.0
159
160// Behavior on opacity {
161// NumberAnimation { duration: 200 }
162// }
163// }
164
165// leftSideAction: Action {
166// iconName: "delete"
167// text: i18n.tr("Delete")
168// enabled: tabsModel.count !== 1
169// onTriggered: {
170// //Workaround since enabled is ignored
171// if (enabled)
172// tabsModel.removeTab(index);
173// }
174// }
175// }
176// }
177 }113 }
178}114}
179115
=== modified file 'src/app/qml/TerminalPage.qml'
--- src/app/qml/TerminalPage.qml 2016-03-03 23:14:40 +0000
+++ src/app/qml/TerminalPage.qml 2016-03-15 14:39:40 +0000
@@ -173,7 +173,7 @@
173 color: "black"173 color: "black"
174 opacity: 0.7174 opacity: 0.7
175175
176 Text {176 Label {
177 anchors.centerIn: parent177 anchors.centerIn: parent
178 color: "white"178 color: "white"
179 text: i18n.tr("Selection Mode")179 text: i18n.tr("Selection Mode")

Subscribers

People subscribed via source and target branches