ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #07517
[Merge] lp:~verzegnassi-stefano/ubuntu-terminal-app/uitk13-migration into lp:ubuntu-terminal-app
Stefano Verzegnassi has proposed merging lp:~verzegnassi-stefano/ubuntu-terminal-app/uitk13-migration into lp:ubuntu-terminal-app.
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)
Requested reviews:
Ubuntu Terminal Developers (ubuntu-terminal-dev)
Related bugs:
Bug #1508363 in Canonical System Image: "Coordinated migration to UITK 1.3"
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1508363
For more details, see:
https://code.launchpad.net/~verzegnassi-stefano/ubuntu-terminal-app/uitk13-migration/+merge/282922
* 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)
--
Your team Ubuntu Terminal Developers is requested to review the proposed merge of lp:~verzegnassi-stefano/ubuntu-terminal-app/uitk13-migration into lp:ubuntu-terminal-app.
=== modified file 'manifest.json.in'
--- manifest.json.in 2015-08-02 12:49:18 +0000
+++ manifest.json.in 2016-01-22 18:37:42 +0000
@@ -1,6 +1,6 @@
{
"description": "Terminal application",
- "framework": "ubuntu-sdk-15.04",
+ "framework": "ubuntu-sdk-15.04.3",
"architecture": "@CLICK_ARCH@",
"hooks": {
"terminal": {
=== modified file 'src/app/qml/AlternateActionPopover.qml'
--- src/app/qml/AlternateActionPopover.qml 2015-08-02 12:49:18 +0000
+++ src/app/qml/AlternateActionPopover.qml 2016-01-22 18:37:42 +0000
@@ -1,6 +1,6 @@
import QtQuick 2.4
-import Ubuntu.Components 1.2
-import Ubuntu.Components.Popups 1.0
+import Ubuntu.Components 1.3
+import Ubuntu.Components.Popups 1.3
Component {
id: popoverComponent
=== modified file 'src/app/qml/AuthenticationDialog.qml'
--- src/app/qml/AuthenticationDialog.qml 2016-01-20 01:24:35 +0000
+++ src/app/qml/AuthenticationDialog.qml 2016-01-22 18:37:42 +0000
@@ -16,8 +16,8 @@
* Authored by: Arto Jalkanen <ajalkane@xxxxxxxxx>
*/
import QtQuick 2.4
-import Ubuntu.Components 1.2
-import Ubuntu.Components.Popups 1.0
+import Ubuntu.Components 1.3
+import Ubuntu.Components.Popups 1.3
Dialog {
id: root
=== modified file 'src/app/qml/AuthenticationService.qml'
--- src/app/qml/AuthenticationService.qml 2015-07-13 20:25:21 +0000
+++ src/app/qml/AuthenticationService.qml 2016-01-22 18:37:42 +0000
@@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.4
-import Ubuntu.Components 1.2
-import Ubuntu.Components.Popups 1.0
+import Ubuntu.Components 1.3
+import Ubuntu.Components.Popups 1.3
import com.ubuntu.PamAuthentication 0.1
/**
=== modified file 'src/app/qml/CircularTransparentButton.qml'
--- src/app/qml/CircularTransparentButton.qml 2015-07-13 20:25:21 +0000
+++ src/app/qml/CircularTransparentButton.qml 2016-01-22 18:37:42 +0000
@@ -1,5 +1,5 @@
import QtQuick 2.4
-import Ubuntu.Components 1.2
+import Ubuntu.Components 1.3
Rectangle {
property color backgroundColor: "black"
=== added file 'src/app/qml/ColorSchemePage.qml'
--- src/app/qml/ColorSchemePage.qml 1970-01-01 00:00:00 +0000
+++ src/app/qml/ColorSchemePage.qml 2016-01-22 18:37:42 +0000
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2013, 2014, 2016 Canonical Ltd
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authored by: Filippo Scognamiglio <flscogna@xxxxxxxxx>
+ */
+
+import QtQuick 2.4
+import Ubuntu.Components 1.3
+
+Page {
+ id: rootItem
+ objectName: "colorSchemePage"
+
+ title: i18n.tr("Color Scheme")
+ property alias model: listView.model
+
+ ListView {
+ id: listView
+ anchors.fill: parent
+ model: settings.profilesList
+ delegate: ListItem {
+ ListItemLayout {
+ anchors.fill: parent
+ title.text: modelData
+
+ Icon {
+ SlotsLayout.position: SlotsLayout.Last
+ width: units.gu(2); height: units.gu(2)
+ color: UbuntuColors.green
+ name: "tick"
+
+ visible: model.index == listView.currentIndex
+ }
+ }
+
+ onClicked: listView.currentIndex = model.index
+ }
+
+ onCurrentIndexChanged: {
+ settings.colorScheme = model[currentIndex];
+ }
+
+ Component.onCompleted: {
+ currentIndex = model.indexOf(settings.colorScheme);
+ }
+ }
+}
=== modified file 'src/app/qml/ExpandableButton.qml'
--- src/app/qml/ExpandableButton.qml 2015-07-13 20:25:21 +0000
+++ src/app/qml/ExpandableButton.qml 2016-01-22 18:37:42 +0000
@@ -1,5 +1,5 @@
import QtQuick 2.4
-import Ubuntu.Components 1.2
+import Ubuntu.Components 1.3
Item {
id: container
=== modified file 'src/app/qml/KeyboardBar.qml'
--- src/app/qml/KeyboardBar.qml 2015-07-13 20:25:21 +0000
+++ src/app/qml/KeyboardBar.qml 2016-01-22 18:37:42 +0000
@@ -1,5 +1,5 @@
import QtQuick 2.4
-import Ubuntu.Components 1.2
+import Ubuntu.Components 1.3
import "KeyboardRows"
import "KeyboardRows/jsonParser.js" as Parser
=== modified file 'src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml'
--- src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml 2015-07-13 20:25:21 +0000
+++ src/app/qml/KeyboardRows/ExpandableKeyboardButton.qml 2016-01-22 18:37:42 +0000
@@ -1,5 +1,5 @@
import QtQuick 2.4
-import Ubuntu.Components 1.2
+import Ubuntu.Components 1.3
import ".."
=== modified file 'src/app/qml/KeyboardRows/JsonTranslator.qml'
--- src/app/qml/KeyboardRows/JsonTranslator.qml 2015-08-09 14:05:38 +0000
+++ src/app/qml/KeyboardRows/JsonTranslator.qml 2016-01-22 18:37:42 +0000
@@ -1,5 +1,5 @@
import QtQuick 2.4
-import Ubuntu.Components 1.2
+import Ubuntu.Components 1.3
Item {
=== modified file 'src/app/qml/KeyboardRows/KeyModel.qml'
--- src/app/qml/KeyboardRows/KeyModel.qml 2015-07-13 20:25:21 +0000
+++ src/app/qml/KeyboardRows/KeyModel.qml 2016-01-22 18:37:42 +0000
@@ -1,5 +1,5 @@
import QtQuick 2.4
-import Ubuntu.Components 1.2
+import Ubuntu.Components 1.3
QtObject {
property string text
=== modified file 'src/app/qml/KeyboardRows/KeyboardButton.qml'
--- src/app/qml/KeyboardRows/KeyboardButton.qml 2015-07-13 20:25:21 +0000
+++ src/app/qml/KeyboardRows/KeyboardButton.qml 2016-01-22 18:37:42 +0000
@@ -1,5 +1,5 @@
import QtQuick 2.4
-import Ubuntu.Components 1.2
+import Ubuntu.Components 1.3
Rectangle {
property alias text: mainLabel.text
=== modified file 'src/app/qml/KeyboardRows/KeyboardLayout.qml'
--- src/app/qml/KeyboardRows/KeyboardLayout.qml 2015-08-09 14:25:36 +0000
+++ src/app/qml/KeyboardRows/KeyboardLayout.qml 2016-01-22 18:37:42 +0000
@@ -1,5 +1,5 @@
import QtQuick 2.4
-import Ubuntu.Components 1.2
+import Ubuntu.Components 1.3
import "jsonParser.js" as Parser
@@ -59,7 +59,7 @@
function createEntryString(text, actionString, otherActionsString) {
var objectString = "
import QtQuick 2.4
- import Ubuntu.Components 1.2
+ import Ubuntu.Components 1.3
KeyModel {
text: \"" + text + "\"
=== modified file 'src/app/qml/KeyboardRows/KeyboardRow.qml'
--- src/app/qml/KeyboardRows/KeyboardRow.qml 2015-07-13 20:25:21 +0000
+++ src/app/qml/KeyboardRows/KeyboardRow.qml 2016-01-22 18:37:42 +0000
@@ -1,5 +1,5 @@
import QtQuick 2.4
-import Ubuntu.Components 1.2
+import Ubuntu.Components 1.3
Rectangle {
id: container
=== modified file 'src/app/qml/LayoutsPage.qml'
--- src/app/qml/LayoutsPage.qml 2015-08-07 12:31:58 +0000
+++ src/app/qml/LayoutsPage.qml 2016-01-22 18:37:42 +0000
@@ -17,8 +17,7 @@
*/
import QtQuick 2.4
-import Ubuntu.Components 1.2
-import Ubuntu.Components.ListItems 1.0 as ListItem
+import Ubuntu.Components 1.3
Page {
id: rootItem
@@ -34,18 +33,23 @@
ListView {
anchors.fill: parent
model: settings.profilesList
- delegate: ListItem.Standard {
- text: name
-
- control: Switch {
- id: layoutSwitch
- checked: profileVisible
- onCheckedChanged: {
- settings.profilesList.setProperty(index, "profileVisible", checked);
+ delegate: ListItem {
+ ListItemLayout {
+ anchors.fill: parent
+ title.text: name
+
+ Switch {
+ id: layoutSwitch
+ SlotsLayout.position: SlotsLayout.Trailing
+
+ checked: profileVisible
+ onCheckedChanged: {
+ settings.profilesList.setProperty(index, "profileVisible", checked);
+ }
}
}
- onTriggered: layoutSwitch.trigger()
+ onClicked: layoutSwitch.trigger()
}
}
}
=== removed file 'src/app/qml/ListItemWithActions.qml'
--- src/app/qml/ListItemWithActions.qml 2015-07-13 20:25:21 +0000
+++ src/app/qml/ListItemWithActions.qml 1970-01-01 00:00:00 +0000
@@ -1,454 +0,0 @@
-/*
- * Copyright (C) 2012-2014 Canonical, Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-import QtQuick 2.4
-import Ubuntu.Components 1.2
-
-Item {
- id: root
-
- property Action leftSideAction: null
- property list<Action> rightSideActions
- property double defaultHeight: units.gu(8)
- property bool locked: false
- property Action activeAction: null
- property var activeItem: null
- property bool triggerActionOnMouseRelease: false
- property color color: Theme.palette.normal.background
- property color selectedColor: "#E6E6E6"
- property bool selected: false
- property bool selectionMode: false
- property alias internalAnchors: mainContents.anchors
- default property alias contents: mainContents.children
-
- readonly property double actionWidth: units.gu(4)
- readonly property double leftActionWidth: units.gu(10)
- readonly property double actionThreshold: actionWidth * 0.4
- readonly property double threshold: 0.4
- readonly property string swipeState: main.x == 0 ? "Normal" : main.x > 0 ? "LeftToRight" : "RightToLeft"
- readonly property alias swipping: mainItemMoving.running
- readonly property bool _showActions: mouseArea.pressed || swipeState != "Normal" || swipping
-
- /* internal */
- property var _visibleRightSideActions: filterVisibleActions(rightSideActions)
-
- signal itemClicked(var mouse)
- signal itemPressAndHold(var mouse)
-
- function returnToBoundsRTL(direction)
- {
- var actionFullWidth = actionWidth + units.gu(2)
-
- // go back to normal state if swipping reverse
- if (direction === "LTR") {
- updatePosition(0)
- return
- } else if (!triggerActionOnMouseRelease) {
- updatePosition(-rightActionsView.width + units.gu(2))
- return
- }
-
- var xOffset = Math.abs(main.x)
- var index = Math.min(Math.floor(xOffset / actionFullWidth), _visibleRightSideActions.length)
- var newX = 0
- if (index === _visibleRightSideActions.length) {
- newX = -(rightActionsView.width - units.gu(2))
- } else if (index >= 1) {
- newX = -(actionFullWidth * index)
- }
- updatePosition(newX)
- }
-
- function returnToBoundsLTR(direction)
- {
- var finalX = leftActionWidth
- if ((direction === "RTL") || (main.x <= (finalX * root.threshold)))
- finalX = 0
- updatePosition(finalX)
- }
-
- function returnToBounds(direction)
- {
- if (main.x < 0) {
- returnToBoundsRTL(direction)
- } else if (main.x > 0) {
- returnToBoundsLTR(direction)
- } else {
- updatePosition(0)
- }
- }
-
- function contains(item, point, marginX)
- {
- var itemStartX = item.x - marginX
- var itemEndX = item.x + item.width + marginX
- return (point.x >= itemStartX) && (point.x <= itemEndX) &&
- (point.y >= item.y) && (point.y <= (item.y + item.height));
- }
-
- function getActionAt(point)
- {
- if (contains(leftActionView, point, 0)) {
- return leftSideAction
- } else if (contains(rightActionsView, point, 0)) {
- var newPoint = root.mapToItem(rightActionsView, point.x, point.y)
- for (var i = 0; i < rightActionsRepeater.count; i++) {
- var child = rightActionsRepeater.itemAt(i)
- if (contains(child, newPoint, units.gu(1))) {
- return i
- }
- }
- }
- return -1
- }
-
- function updateActiveAction()
- {
- if (triggerActionOnMouseRelease &&
- (main.x <= -(root.actionWidth + units.gu(2))) &&
- (main.x > -(rightActionsView.width - units.gu(2)))) {
- var actionFullWidth = actionWidth + units.gu(2)
- var xOffset = Math.abs(main.x)
- var index = Math.min(Math.floor(xOffset / actionFullWidth), _visibleRightSideActions.length)
- index = index - 1
- if (index > -1) {
- root.activeItem = rightActionsRepeater.itemAt(index)
- root.activeAction = root._visibleRightSideActions[index]
- }
- } else {
- root.activeAction = null
- }
- }
-
- function resetSwipe()
- {
- updatePosition(0)
- }
-
- function filterVisibleActions(actions)
- {
- var visibleActions = []
- for(var i = 0; i < actions.length; i++) {
- var action = actions[i]
- if (action.visible) {
- visibleActions.push(action)
- }
- }
- return visibleActions
- }
-
- function updatePosition(pos)
- {
- if (!root.triggerActionOnMouseRelease && (pos !== 0)) {
- mouseArea.state = pos > 0 ? "RightToLeft" : "LeftToRight"
- } else {
- mouseArea.state = ""
- }
- main.x = pos
- }
-
- states: [
- State {
- name: "select"
- when: selectionMode || selected
- PropertyChanges {
- target: selectionIcon
- source: Qt.resolvedUrl("ListItemWithActionsCheckBox.qml")
- anchors.leftMargin: units.gu(2)
- }
- PropertyChanges {
- target: root
- locked: true
- }
- PropertyChanges {
- target: main
- x: 0
- }
- }
- ]
-
- height: defaultHeight
- clip: height !== defaultHeight
-
- Rectangle {
- id: leftActionView
-
- anchors {
- top: parent.top
- bottom: parent.bottom
- right: main.left
- }
- width: root.leftActionWidth + actionThreshold
- visible: leftSideAction
- color: UbuntuColors.red
-
- Icon {
- anchors {
- centerIn: parent
- horizontalCenterOffset: actionThreshold / 2
- }
- name: leftSideAction && _showActions ? leftSideAction.iconName : ""
- color: Theme.palette.selected.field
- height: units.gu(3)
- width: units.gu(3)
- }
- }
-
- Rectangle {
- id: rightActionsView
-
- anchors {
- top: main.top
- left: main.right
- bottom: main.bottom
- }
- visible: _visibleRightSideActions.length > 0
- width: rightActionsRepeater.count > 0 ? rightActionsRepeater.count * (root.actionWidth + units.gu(2)) + root.actionThreshold + units.gu(2) : 0
- color: "white"
- Row {
- anchors{
- top: parent.top
- left: parent.left
- leftMargin: units.gu(2)
- right: parent.right
- rightMargin: units.gu(2)
- bottom: parent.bottom
- }
- spacing: units.gu(2)
- Repeater {
- id: rightActionsRepeater
-
- model: _showActions ? _visibleRightSideActions : []
- Item {
- property alias image: img
-
- height: rightActionsView.height
- width: root.actionWidth
-
- Icon {
- id: img
-
- anchors.centerIn: parent
- width: units.gu(3)
- height: units.gu(3)
- name: modelData.iconName
- color: root.activeAction === modelData ? UbuntuColors.lightAubergine : UbuntuColors.lightGrey
- }
- }
- }
- }
- }
-
-
- Rectangle {
- id: main
- objectName: "mainItem"
-
- anchors {
- top: parent.top
- bottom: parent.bottom
- }
-
- width: parent.width
- color: root.selected ? root.selectedColor : root.color
-
- Loader {
- id: selectionIcon
-
- anchors {
- left: main.left
- verticalCenter: main.verticalCenter
- }
- width: (status === Loader.Ready) ? item.implicitWidth : 0
- visible: (status === Loader.Ready) && (item.width === item.implicitWidth)
- Behavior on width {
- NumberAnimation {
- duration: UbuntuAnimation.SnapDuration
- }
- }
- }
-
-
- Item {
- id: mainContents
-
- anchors {
- left: selectionIcon.right
- leftMargin: units.gu(2)
- top: parent.top
- topMargin: units.gu(1)
- right: parent.right
- rightMargin: units.gu(2)
- bottom: parent.bottom
- bottomMargin: units.gu(1)
- }
- }
-
- Behavior on x {
- UbuntuNumberAnimation {
- id: mainItemMoving
-
- easing.type: Easing.OutElastic
- duration: UbuntuAnimation.SlowDuration
- }
- }
- Behavior on color {
- ColorAnimation {}
- }
- }
-
- SequentialAnimation {
- id: triggerAction
-
- property var currentItem: root.activeItem ? root.activeItem.image : null
-
- running: false
- ParallelAnimation {
- UbuntuNumberAnimation {
- target: triggerAction.currentItem
- property: "opacity"
- from: 1.0
- to: 0.0
- duration: UbuntuAnimation.SlowDuration
- easing {type: Easing.InOutBack; }
- }
- UbuntuNumberAnimation {
- target: triggerAction.currentItem
- properties: "width, height"
- from: units.gu(3)
- to: root.actionWidth
- duration: UbuntuAnimation.SlowDuration
- easing {type: Easing.InOutBack; }
- }
- }
- PropertyAction {
- target: triggerAction.currentItem
- properties: "width, height"
- value: units.gu(3)
- }
- PropertyAction {
- target: triggerAction.currentItem
- properties: "opacity"
- value: 1.0
- }
- ScriptAction {
- script: {
- root.activeAction.triggered(root)
- mouseArea.state = ""
- }
- }
- PauseAnimation {
- duration: 500
- }
- UbuntuNumberAnimation {
- target: main
- property: "x"
- to: 0
-
- }
- }
-
- MouseArea {
- id: mouseArea
-
- property bool locked: root.locked || ((root.leftSideAction === null) && (root._visibleRightSideActions.count === 0))
- property bool manual: false
- property string direction: "None"
- property real lastX: -1
-
- anchors.fill: parent
- drag {
- target: locked ? null : main
- axis: Drag.XAxis
- minimumX: rightActionsView.visible ? -(rightActionsView.width) : 0
- maximumX: leftActionView.visible ? leftActionView.width : 0
- threshold: root.actionThreshold
- }
-
- states: [
- State {
- name: "LeftToRight"
- PropertyChanges {
- target: mouseArea
- drag.maximumX: 0
- }
- },
- State {
- name: "RightToLeft"
- PropertyChanges {
- target: mouseArea
- drag.minimumX: 0
- }
- }
- ]
-
- onMouseXChanged: {
- var offset = (lastX - mouseX)
- if (Math.abs(offset) <= root.actionThreshold) {
- return
- }
- lastX = mouseX
- direction = offset > 0 ? "RTL" : "LTR";
- }
-
- onPressed: {
- lastX = mouse.x
- }
-
- onReleased: {
- if (root.triggerActionOnMouseRelease && root.activeAction) {
- triggerAction.start()
- } else {
- root.returnToBounds(direction)
- root.activeAction = null
- }
- lastX = -1
- direction = "None"
- }
- onClicked: {
- if (main.x === 0) {
- root.itemClicked(mouse)
- } else if (main.x > 0) {
- var action = getActionAt(Qt.point(mouse.x, mouse.y))
- if (action && action !== -1) {
- action.triggered(root)
- }
- } else {
- var actionIndex = getActionAt(Qt.point(mouse.x, mouse.y))
- if (actionIndex !== -1) {
- root.activeItem = rightActionsRepeater.itemAt(actionIndex)
- root.activeAction = root._visibleRightSideActions[actionIndex]
- triggerAction.start()
- return
- }
- }
- root.resetSwipe()
- }
-
- onPositionChanged: {
- if (mouseArea.pressed) {
- updateActiveAction()
- }
- }
- onPressAndHold: {
- if (main.x === 0) {
- root.itemPressAndHold(mouse)
- }
- }
- z: -1
- }
-}
-
=== modified file 'src/app/qml/SettingsPage.qml'
--- src/app/qml/SettingsPage.qml 2015-12-19 05:14:39 +0000
+++ src/app/qml/SettingsPage.qml 2016-01-22 18:37:42 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013, 2014 Canonical Ltd
+ * Copyright (C) 2013, 2014, 2016 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
@@ -17,96 +17,125 @@
*/
import QtQuick 2.4
-import Ubuntu.Components 1.2
-import Ubuntu.Components.ListItems 1.0 as ListItem
+import Ubuntu.Components 1.3
Page {
id: settingsPage
objectName: "settingsPage"
title: i18n.tr("Settings")
-
- Column {
- id: mainColumn
-
- spacing: units.gu(1)
+ flickable: null
+
+ Flickable {
anchors.fill: parent
-
- ListItem.Standard {
- text: i18n.tr("Layouts")
- progression: true
- onClicked: pageStack.push(layoutsPage);
- }
-
- ListItem.Standard {
- text: i18n.tr("Show Keyboard Bar")
- control: Switch {
- onCheckedChanged: settings.showKeyboardBar = checked;
- Component.onCompleted: checked = settings.showKeyboardBar;
- }
- }
-
- ListItem.Standard {
- text: i18n.tr("Show Keyboard Button")
- control: Switch {
- onCheckedChanged: settings.showKeyboardButton = checked;
- Component.onCompleted: checked = settings.showKeyboardButton;
- }
- }
-
- ListItem.Empty {
- height: units.gu(10)
- Label {
- text: i18n.tr("Font Size:")
- x: units.gu(2)
- }
- Slider {
- id: slFont
- objectName: "slFont"
- anchors {
- left: parent.left
- right: parent.right
- bottom: parent.bottom
- margins: units.gu(2)
- }
- minimumValue: settings.minFontSize;
- maximumValue: settings.maxFontSize;
- onValueChanged: {
- settings.fontSize = value;
- }
- Component.onCompleted: {
- value = settings.fontSize;
- }
-
- Connections {
- target: settings
- onFontSizeChanged: {
- slFont.value = settings.fontSize
- }
- }
- }
- }
-
- OptionSelector {
- id: colorsSchemeSelector
- objectName: "colorsSchemeSelector"
- text: i18n.tr("Color Scheme")
- width: parent.width - units.gu(4)
- x: units.gu(2)
-
- // TODO Hackish, but works quite well.
- containerHeight: parent.height - y - units.gu(6)
-
- // TODO This is a workaround at the moment.
- // The application should get them from the c++.
- model: ["GreenOnBlack","WhiteOnBlack","BlackOnWhite","BlackOnRandomLight","Linux","cool-retro-term","DarkPastels","BlackOnLightYellow", "Ubuntu"]
-
- onSelectedIndexChanged: {
- settings.colorScheme = model[selectedIndex];
- }
-
- Component.onCompleted: {
- selectedIndex = model.indexOf(settings.colorScheme);
+ interactive: contentHeight + units.gu(6) > height
+ contentHeight: mainColumn.height
+
+ Column {
+ id: mainColumn
+ anchors { left: parent.left; right: parent.right }
+ spacing: units.gu(1)
+
+ ListItem {
+ ListItemLayout {
+ anchors.fill: parent
+ title.text: i18n.tr("Layouts")
+
+ Icon {
+ SlotsLayout.position: SlotsLayout.Trailing
+ width: units.gu(2); height: width
+ name: "go-next"
+ }
+ }
+
+ onClicked: pageStack.push(layoutsPage);
+ }
+
+ ListItem {
+ ListItemLayout {
+ anchors.fill: parent
+ title.text: i18n.tr("Show Keyboard Bar")
+
+ Switch {
+ id: keybBarSwitch
+ SlotsLayout.position: SlotsLayout.Trailing
+ onCheckedChanged: settings.showKeyboardBar = checked;
+ Component.onCompleted: checked = settings.showKeyboardBar;
+ }
+ }
+
+ onClicked: keybBarSwitch.trigger()
+ }
+
+ ListItem {
+ ListItemLayout {
+ anchors.fill: parent
+ title.text: i18n.tr("Show Keyboard Button")
+
+ Switch {
+ id: keybButtonSwitch
+ SlotsLayout.position: SlotsLayout.Trailing
+ onCheckedChanged: settings.showKeyboardButton = checked;
+ Component.onCompleted: checked = settings.showKeyboardButton;
+ }
+ }
+
+ onClicked: keybButtonSwitch.trigger()
+ }
+
+ ListItem {
+ height: units.gu(12)
+
+ Label {
+ anchors { left: parent.left; margins: units.gu(2) }
+ text: i18n.tr("Font Size:")
+ }
+
+ Slider {
+ id: slFont
+ objectName: "slFont"
+ anchors {
+ left: parent.left
+ right: parent.right
+ bottom: parent.bottom
+ margins: units.gu(2)
+ }
+ minimumValue: settings.minFontSize;
+ maximumValue: settings.maxFontSize;
+ onValueChanged: {
+ settings.fontSize = value;
+ }
+ Component.onCompleted: {
+ value = settings.fontSize;
+ }
+
+ Connections {
+ target: settings
+ onFontSizeChanged: {
+ slFont.value = settings.fontSize
+ }
+ }
+ }
+ }
+
+ ListItem {
+ ListItemLayout {
+ anchors.fill: parent
+ title.text: i18n.tr("Color Scheme")
+
+ Label {
+ SlotsLayout.position: SlotsLayout.Trailing
+ text: settings.colorScheme
+ }
+
+ Icon {
+ SlotsLayout.position: SlotsLayout.Last
+ width: units.gu(2); height: width
+ name: "go-next"
+ }
+ }
+
+ onClicked: pageStack.push(colorSchemePage);
}
}
}
=== modified file 'src/app/qml/TabsPage.qml'
--- src/app/qml/TabsPage.qml 2015-07-13 20:25:21 +0000
+++ src/app/qml/TabsPage.qml 2016-01-22 18:37:42 +0000
@@ -1,6 +1,5 @@
import QtQuick 2.4
-import Ubuntu.Components 1.2
-import Ubuntu.Components.ListItems 1.0 as ListItem
+import Ubuntu.Components 1.3
Page {
id: tabsPage
=== modified file 'src/app/qml/TerminalComponent.qml'
--- src/app/qml/TerminalComponent.qml 2015-07-13 20:25:21 +0000
+++ src/app/qml/TerminalComponent.qml 2016-01-22 18:37:42 +0000
@@ -1,5 +1,5 @@
import QtQuick 2.4
-import Ubuntu.Components 1.2
+import Ubuntu.Components 1.3
import QMLTermWidget 1.0
Component {
=== modified file 'src/app/qml/TerminalPage.qml'
--- src/app/qml/TerminalPage.qml 2015-12-19 05:14:39 +0000
+++ src/app/qml/TerminalPage.qml 2016-01-22 18:37:42 +0000
@@ -1,6 +1,6 @@
import QtQuick 2.4
-import Ubuntu.Components 1.2
-import Ubuntu.Components.Popups 1.0
+import Ubuntu.Components 1.3
+import Ubuntu.Components.Popups 1.3
import QMLTermWidget 1.0
Page {
@@ -10,6 +10,12 @@
anchors.fill: parent
+ header: PageHeader {
+ // WORKAROUND: This way we disable the 'hide' animation when
+ // closing the settings page.
+ visible: false
+ }
+
AlternateActionPopover {
id: alternateActionPopover
}
=== modified file 'src/app/qml/ubuntu-terminal-app.qml'
--- src/app/qml/ubuntu-terminal-app.qml 2015-08-09 14:03:25 +0000
+++ src/app/qml/ubuntu-terminal-app.qml 2016-01-22 18:37:42 +0000
@@ -1,6 +1,6 @@
import QtQuick 2.4
import QtGraphicalEffects 1.0
-import Ubuntu.Components 1.2
+import Ubuntu.Components 1.3
import "KeyboardRows"
import QMLTermWidget 1.0
@@ -115,6 +115,15 @@
id: layoutsPage
visible: false
}
+
+ ColorSchemePage {
+ id: colorSchemePage
+ visible: false
+
+ // TODO This is a workaround at the moment.
+ // The application should get them from the c++.
+ model: ["GreenOnBlack","WhiteOnBlack","BlackOnWhite","BlackOnRandomLight","Linux","cool-retro-term","DarkPastels","BlackOnLightYellow", "Ubuntu"]
+ }
}
Component.onCompleted: {
=== modified file 'terminal.apparmor'
--- terminal.apparmor 2015-08-02 13:04:57 +0000
+++ terminal.apparmor 2016-01-22 18:37:42 +0000
@@ -2,4 +2,4 @@
"policy_groups": [],
"policy_version": 1.3,
"template": "unconfined"
-}
+}
\ No newline at end of file
References