Merge lp:~tpeeters/ubuntu-ui-toolkit/noViewReference into lp:ubuntu-ui-toolkit

Proposed by Tim Peeters
Status: Superseded
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/noViewReference
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 1370 lines (+614/-117)
34 files modified
components.api (+3/-0)
debian/control.gles (+1/-1)
examples/ubuntu-ui-toolkit-gallery/Colors.qml (+8/-6)
examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml (+41/-14)
examples/ubuntu-ui-toolkit-gallery/SwipeAreaPage.qml (+8/-8)
src/Ubuntu/Components/1.3/AdaptivePageLayout.qml (+4/-3)
src/Ubuntu/Components/1.3/Tabs.qml (+0/-6)
src/Ubuntu/Components/1.3/TextArea.qml (+16/-10)
src/Ubuntu/Components/1.3/TextField.qml (+3/-4)
src/Ubuntu/Components/1.3/ToolbarButton.qml (+1/-1)
src/Ubuntu/Components/1.3/UbuntuListView.qml (+3/-1)
src/Ubuntu/Components/Themes/1.3/Palette.qml (+5/-0)
src/Ubuntu/Components/Themes/1.3/PaletteValues.qml (+11/-1)
src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml (+3/-1)
src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml (+2/-3)
src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml (+1/-1)
src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml (+21/-5)
src/Ubuntu/Components/Themes/Ambiance/1.3/PullToRefreshStyle.qml (+36/-17)
src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsForPageHeadStyle.qml (+2/-2)
src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml (+2/-2)
src/Ubuntu/Components/Themes/Ambiance/1.3/TextCursorStyle.qml (+2/-2)
src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml (+37/-13)
src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml (+3/-1)
src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml (+3/-5)
src/Ubuntu/Components/plugin/ucheader.cpp (+1/-1)
src/Ubuntu/Components/plugin/uclistitem.cpp (+0/-3)
src/Ubuntu/Components/plugin/ucmainviewbase.cpp (+6/-1)
src/Ubuntu/Components/plugin/ucstyleditembase.cpp (+29/-0)
tests/packaging-sorting.sh (+2/-0)
tests/unit_x11/tst_components/tst_pulltorefresh_listview.qml (+1/-1)
tests/unit_x11/tst_components/tst_pulltorefresh_pagestack_topmargin.qml (+86/-0)
tests/unit_x11/tst_components/tst_pulltorefresh_topmargin.qml (+59/-0)
tests/unit_x11/tst_components/tst_tabs11.qml (+198/-0)
tests/unit_x11/tst_components/tst_tabs13.qml (+16/-4)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/noViewReference
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu SDK team Pending
Review via email: mp+295032@code.launchpad.net

Commit message

Fix reference error in PullToRefreshStyle.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1981. By Tim Peeters

rename view to flickable

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'components.api'
--- components.api 2016-04-25 10:45:41 +0000
+++ components.api 2016-05-18 10:22:28 +0000
@@ -872,6 +872,7 @@
872 property PaletteValues selected872 property PaletteValues selected
873Ubuntu.Components.Themes.Palette 1.3: QtObject873Ubuntu.Components.Themes.Palette 1.3: QtObject
874 property PaletteValues disabled874 property PaletteValues disabled
875 property PaletteValues focused
875 property PaletteValues highlighted876 property PaletteValues highlighted
876 property PaletteValues normal877 property PaletteValues normal
877 property PaletteValues selected878 property PaletteValues selected
@@ -908,6 +909,8 @@
908 property color overlay909 property color overlay
909 property color overlaySecondaryText910 property color overlaySecondaryText
910 property color overlayText911 property color overlayText
912 property color position
913 property color positionText
911 property color positive914 property color positive
912 property color positiveText915 property color positiveText
913 property color raised916 property color raised
914917
=== modified file 'debian/control.gles'
--- debian/control.gles 2016-04-21 13:10:34 +0000
+++ debian/control.gles 2016-05-18 10:22:28 +0000
@@ -32,8 +32,8 @@
32 libxkbcommon-dev,32 libxkbcommon-dev,
33 libxrender-dev,33 libxrender-dev,
34 locales,34 locales,
35 pep8,
35 python-autopilot (>= 1.4),36 python-autopilot (>= 1.4),
36 pep8,
37 python3-sphinx,37 python3-sphinx,
38 python3:any,38 python3:any,
39 python:any,39 python:any,
4040
=== modified file 'examples/ubuntu-ui-toolkit-gallery/Colors.qml'
--- examples/ubuntu-ui-toolkit-gallery/Colors.qml 2016-03-01 15:08:08 +0000
+++ examples/ubuntu-ui-toolkit-gallery/Colors.qml 2016-05-18 10:22:28 +0000
@@ -29,7 +29,7 @@
29 className: "Palette"29 className: "Palette"
30 documentation: "qml-palette.html"30 documentation: "qml-palette.html"
3131
32 property var palettes: ["normal", "disabled", "selected", "selectedDisabled", "highlighted"]32 property var palettes: ["normal", "disabled", "selected", "selectedDisabled", "highlighted", "focused"]
33 property var paletteValues: [["background", ["backgroundText", "backgroundSecondaryText", "backgroundTertiaryText"]],33 property var paletteValues: [["background", ["backgroundText", "backgroundSecondaryText", "backgroundTertiaryText"]],
34 ["base", ["baseText"]],34 ["base", ["baseText"]],
35 ["foreground", ["foregroundText"]],35 ["foreground", ["foregroundText"]],
@@ -40,7 +40,9 @@
40 ["overlay", ["overlayText", "overlaySecondaryText"]],40 ["overlay", ["overlayText", "overlaySecondaryText"]],
41 ["positive", ["positiveText"]],41 ["positive", ["positiveText"]],
42 ["raised", ["raisedText", "raisedSecondaryText"]],42 ["raised", ["raisedText", "raisedSecondaryText"]],
43 ["selection", ["selectionText"]]]43 ["selection", ["selectionText"]],
44 ["position", ["positionText"]],
45 ]
4446
45 Flow {47 Flow {
46 id: paletteFlow48 id: paletteFlow
@@ -75,7 +77,7 @@
75 property string mainColor: modelData[0]77 property string mainColor: modelData[0]
76 property var textColors: modelData[1]78 property var textColors: modelData[1]
77 property bool previewed: paletteFlow.previewed == paletteColor79 property bool previewed: paletteFlow.previewed == paletteColor
78 width: units.gu(4)80 width: units.gu(8)
79 height: units.gu(5)81 height: units.gu(5)
80 z: previewed ? 10 : 082 z: previewed ? 10 : 0
8183
@@ -106,7 +108,7 @@
106108
107 Rectangle {109 Rectangle {
108 anchors.fill: parent110 anchors.fill: parent
109 color: palette[mainColor]111 color: palette ? palette[mainColor] : "transparent"
110 border.width: color == theme.palette.normal.background ? units.dp(1) : 0112 border.width: color == theme.palette.normal.background ? units.dp(1) : 0
111 border.color: theme.palette.normal.backgroundText113 border.color: theme.palette.normal.backgroundText
112 }114 }
@@ -124,8 +126,8 @@
124 model: textColors126 model: textColors
125 Label {127 Label {
126 width: previewed ? implicitWidth : parent.width128 width: previewed ? implicitWidth : parent.width
127 text: previewed ? modelData : modelData.slice(0, 4)129 text: previewed ? modelData : modelData.slice(0, 10)
128 color: palette[modelData]130 color: palette ? palette[modelData] : "transparent"
129 textSize: previewed ? Label.Medium : Label.XSmall131 textSize: previewed ? Label.Medium : Label.XSmall
130 elide: Text.ElideRight132 elide: Text.ElideRight
131 }133 }
132134
=== modified file 'examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml'
--- examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml 2016-02-17 14:45:09 +0000
+++ examples/ubuntu-ui-toolkit-gallery/PageHeaders.qml 2016-05-18 10:22:28 +0000
@@ -26,7 +26,47 @@
26 className: "PageHeader"26 className: "PageHeader"
2727
28 Label {28 Label {
29 text: "Use the icons in the header."29 text: "Use the icons in the header for search and edit header."
30 }
31
32 Grid {
33 id: switchGrid
34 columns: 2
35 spacing: units.gu(1)
36 anchors {
37 left: parent.left
38 leftMargin: units.gu(5)
39 }
40
41 Switch {
42 id: lockedSwitch
43 checked: standardHeader.extension
44 onTriggered: {
45 if (standardHeader.extension) {
46 standardHeader.extension = null;
47 } else {
48 standardHeader.extension = sections;
49 }
50 }
51 }
52 Label {
53 text: "Sections"
54 }
55
56 Switch {
57 id: subtitleSwitch
58 checked: standardHeader.subtitle
59 onTriggered: {
60 if (standardHeader.subtitle) {
61 standardHeader.subtitle = "";
62 } else {
63 standardHeader.subtitle = "Hello, this is your subtitle";
64 }
65 }
66 }
67 Label {
68 text: "Subtitle"
69 }
30 }70 }
31 }71 }
3272
@@ -44,19 +84,6 @@
44 iconName: "edit"84 iconName: "edit"
45 text: "Edit"85 text: "Edit"
46 onTriggered: page.header = editHeader86 onTriggered: page.header = editHeader
47 },
48 Action {
49 iconName: standardHeader.extension === sections
50 ? "media-playback-stop"
51 : "filters"
52 text: "Sections"
53 onTriggered: {
54 if (standardHeader.extension) {
55 standardHeader.extension = null;
56 } else {
57 standardHeader.extension = sections;
58 }
59 }
60 }87 }
61 ]88 ]
6289
6390
=== modified file 'examples/ubuntu-ui-toolkit-gallery/SwipeAreaPage.qml'
--- examples/ubuntu-ui-toolkit-gallery/SwipeAreaPage.qml 2015-11-09 14:46:02 +0000
+++ examples/ubuntu-ui-toolkit-gallery/SwipeAreaPage.qml 2016-05-18 10:22:28 +0000
@@ -28,8 +28,8 @@
28 TemplateRow {28 TemplateRow {
29 title: i18n.tr("Upwards")29 title: i18n.tr("Upwards")
30 Rectangle {30 Rectangle {
31 width: units.gu(40)31 width: parent.width / 1.5
32 height: units.gu(20)32 height: width / 2
33 color: theme.palette.normal.foreground33 color: theme.palette.normal.foreground
3434
35 SwipeArea {35 SwipeArea {
@@ -56,8 +56,8 @@
56 TemplateRow {56 TemplateRow {
57 title: i18n.tr("Downwards")57 title: i18n.tr("Downwards")
58 Rectangle {58 Rectangle {
59 width: units.gu(40)59 width: parent.width / 1.5
60 height: units.gu(20)60 height: width / 2
61 color: theme.palette.normal.foreground61 color: theme.palette.normal.foreground
6262
63 SwipeArea {63 SwipeArea {
@@ -84,8 +84,8 @@
84 TemplateRow {84 TemplateRow {
85 title: i18n.tr("Rightwards")85 title: i18n.tr("Rightwards")
86 Rectangle {86 Rectangle {
87 width: units.gu(40)87 width: parent.width / 1.5
88 height: units.gu(20)88 height: width / 2
89 color: theme.palette.normal.foreground89 color: theme.palette.normal.foreground
9090
91 SwipeArea {91 SwipeArea {
@@ -114,8 +114,8 @@
114 TemplateRow {114 TemplateRow {
115 title: i18n.tr("Leftwards")115 title: i18n.tr("Leftwards")
116 Rectangle {116 Rectangle {
117 width: units.gu(40)117 width: parent.width / 1.5
118 height: units.gu(20)118 height: width / 2
119 color: theme.palette.normal.foreground119 color: theme.palette.normal.foreground
120120
121 SwipeArea {121 SwipeArea {
122122
=== modified file 'src/Ubuntu/Components/1.3/AdaptivePageLayout.qml'
--- src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2016-03-16 09:15:39 +0000
+++ src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2016-05-18 10:22:28 +0000
@@ -788,7 +788,7 @@
788 bottom: parent.bottom788 bottom: parent.bottom
789 left: parent.left789 left: parent.left
790 right: parent.right790 right: parent.right
791 rightMargin: dividerThickness791 rightMargin: dividerThickness + verticalDivider.width
792 }792 }
793 Item {793 Item {
794 id: hiddenItem794 id: hiddenItem
@@ -806,6 +806,7 @@
806 left: parent.left806 left: parent.left
807 top: parent.top807 top: parent.top
808 right: parent.right808 right: parent.right
809 rightMargin: dividerThickness + verticalDivider.width
809 }810 }
810 height: body.headerHeight811 height: body.headerHeight
811812
@@ -856,7 +857,7 @@
856 right: parent.right857 right: parent.right
857 rightMargin: dividerThickness858 rightMargin: dividerThickness
858 }859 }
859 width: (column == (d.columns - 1)) || !pageWrapper ? 0 : units.dp(1)860 width: (column == (d.columns - 1)) ? 0 : units.dp(1)
860 color: theme.palette.normal.base861 color: theme.palette.normal.base
861 MouseArea {862 MouseArea {
862 id: resizerSensing863 id: resizerSensing
@@ -923,7 +924,7 @@
923 wrapper.active = false;924 wrapper.active = false;
924 subHeader.config = null;925 subHeader.config = null;
925 pageWrapper = null;926 pageWrapper = null;
926 wrapper.parent = hiddenPool;927 wrapper.parent = hiddenItem;
927 wrapper.pageHolder = null;928 wrapper.pageHolder = null;
928 return wrapper;929 return wrapper;
929 }930 }
930931
=== modified file 'src/Ubuntu/Components/1.3/Tabs.qml'
--- src/Ubuntu/Components/1.3/Tabs.qml 2015-12-08 18:34:40 +0000
+++ src/Ubuntu/Components/1.3/Tabs.qml 2016-05-18 10:22:28 +0000
@@ -49,12 +49,6 @@
49 anchors.centerIn: parent49 anchors.centerIn: parent
50 text: "A centered label"50 text: "A centered label"
51 }51 }
52 tools: ToolbarItems {
53 ToolbarButton {
54 text: "action"
55 onTriggered: print("action triggered")
56 }
57 }
58 }52 }
59 }53 }
60 Tab {54 Tab {
6155
=== modified file 'src/Ubuntu/Components/1.3/TextArea.qml'
--- src/Ubuntu/Components/1.3/TextArea.qml 2016-04-26 05:33:41 +0000
+++ src/Ubuntu/Components/1.3/TextArea.qml 2016-05-18 10:22:28 +0000
@@ -769,6 +769,7 @@
769 property string displayText: editor.getText(0, editor.length)769 property string displayText: editor.getText(0, editor.length)
770 property real frameSpacing: control.__styleInstance.frameSpacing770 property real frameSpacing: control.__styleInstance.frameSpacing
771 property real minimumSize: units.gu(4)771 property real minimumSize: units.gu(4)
772 property real scrollbarSpacing: rightScrollbar.__interactive ? units.gu(2) : 0
772773
773 function linesHeight(lines)774 function linesHeight(lines)
774 {775 {
@@ -824,15 +825,6 @@
824 }825 }
825826
826 //scrollbars and flickable827 //scrollbars and flickable
827 Scrollbar {
828 id: rightScrollbar
829 flickableItem: flicker
830 }
831 Scrollbar {
832 id: bottomScrollbar
833 flickableItem: flicker
834 align: Qt.AlignBottom
835 }
836 Flickable {828 Flickable {
837 id: flicker829 id: flicker
838 objectName: "input_scroller"830 objectName: "input_scroller"
@@ -853,7 +845,7 @@
853 objectName: "text_input"845 objectName: "text_input"
854 readOnly: false846 readOnly: false
855 id: editor847 id: editor
856 width: control.contentWidth848 width: control.contentWidth - internal.scrollbarSpacing
857 height: Math.max(control.contentHeight, editor.contentHeight)849 height: Math.max(control.contentHeight, editor.contentHeight)
858 wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere850 wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
859 mouseSelectionMode: TextEdit.SelectWords851 mouseSelectionMode: TextEdit.SelectWords
@@ -883,6 +875,20 @@
883 }875 }
884 }876 }
885 }877 }
878 Scrollbar {
879 id: rightScrollbar
880 flickableItem: flicker
881 // Attach right inside the frame
882 // Flickable uses anchors.margins relative to the frame
883 // rather than *Margin which would scroll with the content
884 anchors.topMargin: -internal.frameSpacing
885 anchors.rightMargin: -internal.frameSpacing
886 anchors.bottomMargin: -internal.frameSpacing
887 Ubuntu.StyleHints {
888 // No background color
889 troughColorSteppersStyle: Qt.rgba(0, 0, 0, 0)
890 }
891 }
886892
887 styleName: "TextAreaStyle"893 styleName: "TextAreaStyle"
888}894}
889895
=== modified file 'src/Ubuntu/Components/1.3/TextField.qml'
--- src/Ubuntu/Components/1.3/TextField.qml 2016-04-26 05:33:41 +0000
+++ src/Ubuntu/Components/1.3/TextField.qml 2016-05-18 10:22:28 +0000
@@ -995,11 +995,11 @@
995 anchors {995 anchors {
996 left: leftPane.right996 left: leftPane.right
997 right: clearButton.left997 right: clearButton.left
998 top: parent.top
999 bottom: parent.bottom
1000 margins: internal.spacing998 margins: internal.spacing
999 verticalCenter: parent.verticalCenter
1001 }1000 }
1002 topMargin: internal.spacing1001 topMargin: internal.spacing
1002 bottomMargin: internal.spacing
1003 // do not allow rebounding1003 // do not allow rebounding
1004 boundsBehavior: Flickable.StopAtBounds1004 boundsBehavior: Flickable.StopAtBounds
1005 // need to forward events as events occurred on topMargin area are not grabbed by the MouseArea.1005 // need to forward events as events occurred on topMargin area are not grabbed by the MouseArea.
@@ -1008,13 +1008,12 @@
1008 clip: true1008 clip: true
1009 contentWidth: editor.contentWidth1009 contentWidth: editor.contentWidth
1010 contentHeight: editor.contentHeight1010 contentHeight: editor.contentHeight
1011 height: editor.contentHeight
10111012
1012 TextInput {1013 TextInput {
1013 id: editor1014 id: editor
1014 objectName: "text_input"1015 objectName: "text_input"
1015 // FocusScope will forward focus to this component1016 // FocusScope will forward focus to this component
1016 anchors.verticalCenter: parent.verticalCenter
1017 verticalAlignment: TextInput.AlignVCenter
1018 width: flicker.width1017 width: flicker.width
1019 height: flicker.height1018 height: flicker.height
1020 cursorDelegate: TextCursor {1019 cursorDelegate: TextCursor {
10211020
=== modified file 'src/Ubuntu/Components/1.3/ToolbarButton.qml'
--- src/Ubuntu/Components/1.3/ToolbarButton.qml 2015-09-28 14:36:54 +0000
+++ src/Ubuntu/Components/1.3/ToolbarButton.qml 2016-05-18 10:22:28 +0000
@@ -29,7 +29,7 @@
29 Example of different ways to define the toolbar button:29 Example of different ways to define the toolbar button:
30 \qml30 \qml
31 import QtQuick 2.431 import QtQuick 2.4
32 import Ubuntu.Components 1.332 import Ubuntu.Components 1.2
3333
34 MainView {34 MainView {
35 width: units.gu(50)35 width: units.gu(50)
3636
=== modified file 'src/Ubuntu/Components/1.3/UbuntuListView.qml'
--- src/Ubuntu/Components/1.3/UbuntuListView.qml 2016-03-01 14:53:44 +0000
+++ src/Ubuntu/Components/1.3/UbuntuListView.qml 2016-05-18 10:22:28 +0000
@@ -196,7 +196,9 @@
196196
197 // highlight current item197 // highlight current item
198 highlight: Rectangle {198 highlight: Rectangle {
199 color: theme.palette.selected.background199 color: root.activeFocus
200 ? theme.palette.focused.background
201 : theme.palette.selected.background
200 }202 }
201 highlightMoveDuration: 0203 highlightMoveDuration: 0
202}204}
203205
=== modified file 'src/Ubuntu/Components/Themes/1.3/Palette.qml'
--- src/Ubuntu/Components/Themes/1.3/Palette.qml 2016-03-01 15:06:38 +0000
+++ src/Ubuntu/Components/Themes/1.3/Palette.qml 2016-05-18 10:22:28 +0000
@@ -60,6 +60,11 @@
60 property PaletteValues disabled: PaletteValues{}60 property PaletteValues disabled: PaletteValues{}
6161
62 /*!62 /*!
63 Color palette to use when the widget is focused.
64 */
65 property PaletteValues focused: PaletteValues{}
66
67 /*!
63 Color palette to use when the widget is selected, for example when68 Color palette to use when the widget is selected, for example when
64 a tab is the current one.69 a tab is the current one.
65 */70 */
6671
=== modified file 'src/Ubuntu/Components/Themes/1.3/PaletteValues.qml'
--- src/Ubuntu/Components/Themes/1.3/PaletteValues.qml 2016-04-26 05:33:41 +0000
+++ src/Ubuntu/Components/Themes/1.3/PaletteValues.qml 2016-05-18 10:22:28 +0000
@@ -140,7 +140,7 @@
140 property color activityText140 property color activityText
141141
142 /*!142 /*!
143 Color applied to selected text in editable components.143 Color applied to selected text background in editable components.
144 */144 */
145 property color selection145 property color selection
146 /*!146 /*!
@@ -159,4 +159,14 @@
159 Color applied to elements placed on top of the \l focus color.159 Color applied to elements placed on top of the \l focus color.
160 */160 */
161 property color focusText161 property color focusText
162
163 /*!
164 Color applied to navigation elements' background.
165 */
166 property color position
167
168 /*!
169 Color applied to navigation elements to indicate current position.
170 */
171 property color positionText
162}172}
163173
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml 2016-04-26 05:33:41 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml 2016-05-18 10:22:28 +0000
@@ -24,7 +24,7 @@
24 backgroundSecondaryText: UbuntuColors.slate24 backgroundSecondaryText: UbuntuColors.slate
25 backgroundTertiaryText: UbuntuColors.ash25 backgroundTertiaryText: UbuntuColors.ash
26 base: UbuntuColors.silk26 base: UbuntuColors.silk
27 baseText: UbuntuColors.ash27 baseText: UbuntuColors.graphite
28 foreground: UbuntuColors.porcelain28 foreground: UbuntuColors.porcelain
29 foregroundText: UbuntuColors.jet29 foregroundText: UbuntuColors.jet
30 raised: "#FFFFFF"30 raised: "#FFFFFF"
@@ -45,4 +45,6 @@
45 negativeText: "#FFFFFF"45 negativeText: "#FFFFFF"
46 activity: UbuntuColors.blue46 activity: UbuntuColors.blue
47 activityText: "#FFFFFF"47 activityText: "#FFFFFF"
48 position: "#00000000"
49 positionText: UbuntuColors.blue
48}50}
4951
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml 2016-03-01 15:06:38 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml 2016-05-18 10:22:28 +0000
@@ -19,9 +19,8 @@
1919
20AmbianceNormal {20AmbianceNormal {
21 background: UbuntuColors.porcelain21 background: UbuntuColors.porcelain
22 backgroundText: UbuntuColors.blue
23 backgroundTertiaryText: UbuntuColors.blue
24 base: UbuntuColors.ash22 base: UbuntuColors.ash
25 baseText: UbuntuColors.blue23 baseText: UbuntuColors.inkstone
26 foreground: UbuntuColors.ash24 foreground: UbuntuColors.ash
25 overlay: UbuntuColors.porcelain
27}26}
2827
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml 2016-01-28 11:54:29 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml 2016-05-18 10:22:28 +0000
@@ -26,7 +26,7 @@
26 color: styledItem.enabled26 color: styledItem.enabled
27 ? theme.palette.normal.focus27 ? theme.palette.normal.focus
28 : theme.palette.disabled.focus28 : theme.palette.disabled.focus
29 thickness: units.gu(0.21)29 thickness: units.dp(1)
30 radius: units.gu(1.7)30 radius: units.gu(1.7)
31 visible: styledItem.keyNavigationFocus31 visible: styledItem.keyNavigationFocus
3232
3333
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml 2016-04-26 05:33:41 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml 2016-05-18 10:22:28 +0000
@@ -26,15 +26,18 @@
26 // specific disabled colors26 // specific disabled colors
27 var diff = {27 var diff = {
28 field: UbuntuColors.porcelain,28 field: UbuntuColors.porcelain,
29 positiveText: normal.positiveText,29 selection: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.1),
30 negativeText: normal.negativeText,30 positiveText: "#FFFFFF",
31 negativeText: "#FFFFFF",
32 activityText: "#FFFFFF",
33 focusText: "#FFFFFF"
31 };34 };
32 for (var p in normal) {35 for (var p in normal) {
33 // skip objectName and all change signals36 // skip objectName and all change signals
34 if (p === "objectName" || p.indexOf("Changed") > 0) continue;37 if (p === "objectName" || p.indexOf("Changed") > 0) continue;
35 disabled[p] = diff[p] || (38 disabled[p] = diff[p] || (
36 // if not specific, colors are 30% opaque normal39 // if not specific, colors are 30% opaque normal
37 Qt.rgba(normal[p].r, normal[p].g, normal[p].b, 0.3)40 Qt.rgba(normal[p].r, normal[p].g, normal[p].b, normal[p].a * 0.5)
38 );41 );
39 }42 }
40 }43 }
@@ -51,13 +54,18 @@
51 background: UbuntuColors.porcelain,54 background: UbuntuColors.porcelain,
52 base: UbuntuColors.porcelain,55 base: UbuntuColors.porcelain,
53 foreground: UbuntuColors.porcelain,56 foreground: UbuntuColors.porcelain,
57 selection: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.1),
58 positiveText: "#FFFFFF",
59 negativeText: "#FFFFFF",
60 activityText: "#FFFFFF",
61 focusText: "#FFFFFF"
54 };62 };
55 for (var p in selected) {63 for (var p in selected) {
56 // skip objectName and all change signals64 // skip objectName and all change signals
57 if (p === "objectName" || p.indexOf("Changed") > 0) continue;65 if (p === "objectName" || p.indexOf("Changed") > 0) continue;
58 selectedDisabled[p] = diff[p] || (66 selectedDisabled[p] = diff[p] || (
59 // if not specific, colors are 30% opaque normal67 // if not specific, colors are 30% opaque normal
60 Qt.rgba(selected[p].r, selected[p].g, selected[p].b, 0.3)68 Qt.rgba(selected[p].r, selected[p].g, selected[p].b, normal[p].a * 0.5)
61 );69 );
62 }70 }
63 }71 }
@@ -65,7 +73,15 @@
6573
66 highlighted: AmbianceNormal {74 highlighted: AmbianceNormal {
67 background: UbuntuColors.silk75 background: UbuntuColors.silk
68 base: UbuntuColors.jet76 base: UbuntuColors.ash
77 baseText: UbuntuColors.inkstone
69 foreground: UbuntuColors.silk78 foreground: UbuntuColors.silk
79 raised: UbuntuColors.silk
80 raisedText: UbuntuColors.inkstone
81 raisedSecondaryText: UbuntuColors.ash
82 }
83
84 focused: AmbianceNormal {
85 background: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.2)
70 }86 }
71}87}
7288
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/PullToRefreshStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/PullToRefreshStyle.qml 2015-12-16 11:53:01 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/PullToRefreshStyle.qml 2016-05-18 10:22:28 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2014 Canonical Ltd.2 * Copyright 2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -56,16 +56,22 @@
56 Local properties56 Local properties
57 */57 */
58 readonly property PullToRefresh control: styledItem58 readonly property PullToRefresh control: styledItem
59 // property to store Flickable's toipMargin at the time the pull or auto-refresh is started59 // property to control adding of control.height to the Flickable's topMargin.
60 property real flickableTopMargin: 0.060 property bool extendTopMargin: false
61 onExtendTopMarginChanged: {
62 if (extendTopMargin) {
63 control.target.topMargin += control.height;
64 } else {
65 control.target.topMargin -= control.height;
66 }
67 }
68
61 // store when the drag has happened at the beginning of the Flickable's content69 // store when the drag has happened at the beginning of the Flickable's content
62 property bool wasAtYBeginning: false70 property bool wasAtYBeginning: false
63 // initial contentY value when pull started71 // initial contentY value when pull started
64 property real initialContentY: 0.072 property real initialContentY: 0.0
65 // drives the refreshing state73 // drives the refreshing state
66 property bool refreshing: false74 property bool refreshing: false
67 // point of release used in rebind animation between the ready-to-refresh and refreshing states
68 property real pointOfRelease
69 // specifies the component completion75 // specifies the component completion
70 property bool ready: false76 property bool ready: false
71 // root item77 // root item
@@ -130,6 +136,17 @@
130 anchors.centerIn: parent136 anchors.centerIn: parent
131 }137 }
132138
139 onVisibleChanged: {
140 // Updates to contentY may be interrupted if the flickable becomes
141 // invisible (for example when a new Page is pushed on a stack
142 // while PullToRefresh is in refreshing state. See bug #1578619.
143 if (visible) {
144 // Make sure the flickable is back inside its bounds when
145 // the Page becomes visible again:
146 control.target.returnToBounds();
147 }
148 }
149
133 // state and content controlling150 // state and content controlling
134 Connections {151 Connections {
135 target: control152 target: control
@@ -138,8 +155,7 @@
138 return;155 return;
139 }156 }
140 if (!style.releaseToRefresh && target.refreshing) {157 if (!style.releaseToRefresh && target.refreshing) {
141 // not a manual refresh, update flickable's starting topMargin158 // not a manual refresh
142 style.flickableTopMargin = control.target.topMargin;
143 style.wasAtYBeginning = control.target.atYBeginning;159 style.wasAtYBeginning = control.target.atYBeginning;
144 }160 }
145 /*161 /*
@@ -162,13 +178,13 @@
162 style.refreshing = false;178 style.refreshing = false;
163 style.releaseToRefresh = false;179 style.releaseToRefresh = false;
164 }180 }
165 onMovementEnded: style.wasAtYBeginning = control.target.atYBeginning181 onMovementEnded: {
182 style.wasAtYBeginning = control.target.atYBeginning;
183 }
166184
167 // catch when to initiate refresh185 // catch when to initiate refresh
168 onDraggingChanged: {186 onDraggingChanged: {
169 if (!control.parent.dragging && style.releaseToRefresh) {187 if (!control.parent.dragging && style.releaseToRefresh) {
170 pointOfRelease = -(control.target.contentY - control.target.originY)
171 style.flickableTopMargin = control.target.topMargin;
172 style.refreshing = true;188 style.refreshing = true;
173 style.releaseToRefresh = false;189 style.releaseToRefresh = false;
174 }190 }
@@ -213,8 +229,8 @@
213 running: true229 running: true
214 }230 }
215 PropertyChanges {231 PropertyChanges {
216 target: control.target232 target: style
217 topMargin: style.flickableTopMargin + control.height233 extendTopMargin: true
218 }234 }
219 }235 }
220 ]236 ]
@@ -226,9 +242,8 @@
226 SequentialAnimation {242 SequentialAnimation {
227 UbuntuNumberAnimation {243 UbuntuNumberAnimation {
228 target: control.target244 target: control.target
229 property: "topMargin"245 property: "contentY"
230 from: style.pointOfRelease246 to: style.initialContentY - control.height
231 to: style.flickableTopMargin + control.height
232 }247 }
233 ScriptAction {248 ScriptAction {
234 script: control.refresh()249 script: control.refresh()
@@ -242,8 +257,7 @@
242 UbuntuNumberAnimation {257 UbuntuNumberAnimation {
243 target: control.target258 target: control.target
244 property: "contentY"259 property: "contentY"
245 from: -style.flickableTopMargin260 to: style.initialContentY - control.height
246 to: -style.flickableTopMargin - control.height
247 }261 }
248 },262 },
249 Transition {263 Transition {
@@ -253,6 +267,11 @@
253 target: control.target267 target: control.target
254 property: "topMargin"268 property: "topMargin"
255 }269 }
270 UbuntuNumberAnimation {
271 target: control.target
272 property: "contentY"
273 to: style.initialContentY
274 }
256 }275 }
257 ]276 ]
258}277}
259278
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsForPageHeadStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsForPageHeadStyle.qml 2016-02-19 11:18:51 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsForPageHeadStyle.qml 2016-05-18 10:22:28 +0000
@@ -35,8 +35,8 @@
35 The foreground color of the selected section.35 The foreground color of the selected section.
36 */36 */
37 property color selectedSectionColor: enabled37 property color selectedSectionColor: enabled
38 ? theme.palette.selected.backgroundTertiaryText38 ? theme.palette.selected.positionText
39 : theme.palette.selectedDisabled.backgroundTertiaryText39 : theme.palette.selectedDisabled.positionText
4040
41 /*!41 /*!
42 The background color for the pressed section button.42 The background color for the pressed section button.
4343
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml 2016-04-25 18:58:29 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/SectionsStyle.qml 2016-05-18 10:22:28 +0000
@@ -41,8 +41,8 @@
41 The foreground color of the selected section.41 The foreground color of the selected section.
42 */42 */
43 property color selectedSectionColor: enabled43 property color selectedSectionColor: enabled
44 ? theme.palette.selected.backgroundTertiaryText44 ? theme.palette.selected.positionText
45 : theme.palette.selectedDisabled.backgroundTertiaryText45 : theme.palette.selectedDisabled.positionText
4646
47 /*!47 /*!
48 The background color for the pressed section button.48 The background color for the pressed section button.
4949
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/TextCursorStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/TextCursorStyle.qml 2016-01-26 19:27:50 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/TextCursorStyle.qml 2016-05-18 10:22:28 +0000
@@ -55,8 +55,8 @@
55 Rectangle {55 Rectangle {
56 objectName: "text_cursor_style_" + styledItem.positionProperty56 objectName: "text_cursor_style_" + styledItem.positionProperty
57 width: cursorWidth57 width: cursorWidth
58 // FIXME: check with design whether should it be activity or something else58
59 color: theme.palette.normal.activity59 color: theme.palette.normal.positionText
60 visible: blinkTimer.timerShowCursor || !blinkTimer.running60 visible: blinkTimer.timerShowCursor || !blinkTimer.running
61 Timer {61 Timer {
62 id: blinkTimer62 id: blinkTimer
6363
=== modified file 'src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml'
--- src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml 2016-03-10 08:46:03 +0000
+++ src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml 2016-05-18 10:22:28 +0000
@@ -22,14 +22,23 @@
22Palette {22Palette {
23 normal: SuruDarkNormal {}23 normal: SuruDarkNormal {}
24 disabled: SuruDarkNormal {24 disabled: SuruDarkNormal {
25 field: UbuntuColors.inkstone
26 // inactive is 30% transparent normal
27 Component.onCompleted: {25 Component.onCompleted: {
26 // specific disabled colors
27 var diff = {
28 foreground: UbuntuColors.inkstone,
29 field: UbuntuColors.inkstone,
30 positiveText: UbuntuColors.porcelain,
31 negativeText: UbuntuColors.porcelain,
32 activityText: UbuntuColors.porcelain,
33 focusText: UbuntuColors.porcelain
34 };
28 for (var p in normal) {35 for (var p in normal) {
29 // skip objectName and all change signals36 // skip objectName and all change signals
30 if (p == "objectName"|| p.indexOf("Changed") > 037 if (p == "objectName"|| p.indexOf("Changed") > 0) continue;
31 || p == "field" || p == "foreground" ) continue;38 disabled[p] = diff[p] || (
32 disabled[p] = Qt.rgba(normal[p].r, normal[p].g, normal[p].b, 0.3);39 // if not specific, colors are 30% opaque normal
40 Qt.rgba(normal[p].r, normal[p].g, normal[p].b, normal[p].a * 0.5)
41 );
33 }42 }
34 }43 }
35 }44 }
@@ -39,24 +48,39 @@
3948
40 // selected differs from normal in background, base, foreground49 // selected differs from normal in background, base, foreground
41 selectedDisabled: SuruDarkSelected {50 selectedDisabled: SuruDarkSelected {
42 background: UbuntuColors.inkstone
43 base: UbuntuColors.inkstone
44 foreground: UbuntuColors.inkstone
45 // inactive is 30% transparent normal
46 Component.onCompleted: {51 Component.onCompleted: {
52 var diff = {
53 background: UbuntuColors.inkstone,
54 base: UbuntuColors.inkstone,
55 foreground: UbuntuColors.inkstone,
56 positiveText: UbuntuColors.porcelain,
57 negativeText: UbuntuColors.porcelain,
58 activityText: UbuntuColors.porcelain,
59 focusText: UbuntuColors.porcelain
60 };
47 for (var p in selected) {61 for (var p in selected) {
48 // skip objectName and all change signals62 // skip objectName and all change signals
49 if (p == "objectName"|| p.indexOf("Changed") > 063 if (p == "objectName"|| p.indexOf("Changed") > 0) continue;
50 || p == "field" || p == "foreground" ) continue;64 selectedDisabled[p] = diff[p] || (
51 selectedDisabled[p] = Qt.rgba(selected[p].r, selected[p].g, selected[p].b, 0.3);65 // if not specific, colors are 30% opaque normal
66 Qt.rgba(selected[p].r, selected[p].g, selected[p].b, normal[p].a * 0.5)
67 );
52 }68 }
53 }69 }
54 }70 }
5571
56 highlighted: SuruDarkNormal {72 highlighted: SuruDarkNormal {
57 background: UbuntuColors.slate73 background: UbuntuColors.slate
58 base: UbuntuColors.graphite74 base: UbuntuColors.slate
75 baseText: UbuntuColors.silk
59 foreground: UbuntuColors.slate76 foreground: UbuntuColors.slate
77 raised: UbuntuColors.silk
78 raisedText: UbuntuColors.inkstone
79 raisedSecondaryText: UbuntuColors.ash
80 }
81
82 focused: SuruDarkNormal {
83 background: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.4)
60 }84 }
61}85}
62//![0]86//![0]
6387
=== modified file 'src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml'
--- src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml 2016-04-26 05:33:41 +0000
+++ src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml 2016-05-18 10:22:28 +0000
@@ -24,7 +24,7 @@
24 backgroundSecondaryText: UbuntuColors.silk24 backgroundSecondaryText: UbuntuColors.silk
25 backgroundTertiaryText: UbuntuColors.ash25 backgroundTertiaryText: UbuntuColors.ash
26 base: UbuntuColors.graphite26 base: UbuntuColors.graphite
27 baseText: UbuntuColors.ash27 baseText: UbuntuColors.silk
28 foreground: UbuntuColors.inkstone28 foreground: UbuntuColors.inkstone
29 foregroundText: "#FFFFFF"29 foregroundText: "#FFFFFF"
30 raised: "#FFFFFF"30 raised: "#FFFFFF"
@@ -45,4 +45,6 @@
45 negativeText: "#FFFFFF"45 negativeText: "#FFFFFF"
46 activity: UbuntuColors.blue46 activity: UbuntuColors.blue
47 activityText: "#FFFFFF"47 activityText: "#FFFFFF"
48 position: "#00000000"
49 positionText: UbuntuColors.blue
48}50}
4951
=== modified file 'src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml'
--- src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml 2016-03-01 15:06:38 +0000
+++ src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml 2016-05-18 10:22:28 +0000
@@ -20,10 +20,8 @@
2020
21SuruDarkNormal {21SuruDarkNormal {
22 background: UbuntuColors.inkstone22 background: UbuntuColors.inkstone
23 backgroundText: UbuntuColors.blue23 base: UbuntuColors.inkstone
24 backgroundTertiaryText: UbuntuColors.blue24 baseText: UbuntuColors.ash
25 base: UbuntuColors.ash
26 baseText:UbuntuColors.blue
27 foreground: UbuntuColors.slate25 foreground: UbuntuColors.slate
26 overlay: UbuntuColors.slate
28}27}
29
3028
=== modified file 'src/Ubuntu/Components/plugin/ucheader.cpp'
--- src/Ubuntu/Components/plugin/ucheader.cpp 2016-04-20 15:26:25 +0000
+++ src/Ubuntu/Components/plugin/ucheader.cpp 2016-05-18 10:22:28 +0000
@@ -40,7 +40,7 @@
40 import QtQuick 2.440 import QtQuick 2.4
41 import Ubuntu.Components 1.341 import Ubuntu.Components 1.3
4242
43 Item {43 Page {
44 width: units.gu(50)44 width: units.gu(50)
45 height: units.gu(70)45 height: units.gu(70)
4646
4747
=== modified file 'src/Ubuntu/Components/plugin/uclistitem.cpp'
--- src/Ubuntu/Components/plugin/uclistitem.cpp 2016-04-26 10:21:32 +0000
+++ src/Ubuntu/Components/plugin/uclistitem.cpp 2016-05-18 10:22:28 +0000
@@ -1140,9 +1140,6 @@
1140 updateNode = true;1140 updateNode = true;
1141 }1141 }
1142 QRectF rect(boundingRect());1142 QRectF rect(boundingRect());
1143 // FIXME: The 1dp margin is here so that part of the focus frame
1144 // is not hidden by the APL divider. See bug #1575060.
1145 rect -= QMarginsF(0, 0, UCUnits::instance()->dp(1), 0);
1146 d->divider->setOpacity(paintFocus ? 0.0 : 1.0);1143 d->divider->setOpacity(paintFocus ? 0.0 : 1.0);
1147 rectNode->setRect(rect);1144 rectNode->setRect(rect);
11481145
11491146
=== modified file 'src/Ubuntu/Components/plugin/ucmainviewbase.cpp'
--- src/Ubuntu/Components/plugin/ucmainviewbase.cpp 2016-04-04 04:47:11 +0000
+++ src/Ubuntu/Components/plugin/ucmainviewbase.cpp 2016-05-18 10:22:28 +0000
@@ -53,7 +53,9 @@
5353
54 m_actionContext->setObjectName(QStringLiteral("RootContext"));54 m_actionContext->setObjectName(QStringLiteral("RootContext"));
55 m_actionContext->setActive(true);55 m_actionContext->setActive(true);
56 q->setActive(true);56 // setActive(true) is called in componentComplete to wait
57 // until the MainView (and all its children) are complete
58 // to prevent bug #1570886.
5759
58 QObject::connect(m_actionManager,&UCActionManager::quit, [](){60 QObject::connect(m_actionManager,&UCActionManager::quit, [](){
59 // FIXME Wire this up to the application lifecycle management API instead of quit().61 // FIXME Wire this up to the application lifecycle management API instead of quit().
@@ -307,6 +309,9 @@
307{309{
308 Q_D(UCMainViewBase);310 Q_D(UCMainViewBase);
309 UCPageTreeNode::componentComplete();311 UCPageTreeNode::componentComplete();
312 // Do not call setActive() in d->init() but postpone until the
313 // component is complete to avoid bug #1570886.
314 this->setActive(true);
310 d->doAutoTheme();315 d->doAutoTheme();
311316
312 if (d->m_actionContext)317 if (d->m_actionContext)
313318
=== modified file 'src/Ubuntu/Components/plugin/ucstyleditembase.cpp'
--- src/Ubuntu/Components/plugin/ucstyleditembase.cpp 2016-04-25 10:45:41 +0000
+++ src/Ubuntu/Components/plugin/ucstyleditembase.cpp 2016-05-18 10:22:28 +0000
@@ -37,6 +37,32 @@
37{37{
38}38}
3939
40/*!
41 * \qmlproperty string StyledItem::keyNavigationFocus
42 * If \l activeFocusOnTab is true and Tab or Shift+Tab is used to focus
43 * the item this property will be true - unlike \l activeFocus which is also
44 * true if the item gained focus by click, tap or programmatically.
45 * Note that only one component at a time has \b keyNavigationFocus. The
46 * parent will have \l activeFocus and usually won't draw a focus ring.
47 *
48 * In case of complex components arrow keys may be the preferred way to move
49 * between children that can take focus. Examples of that are ListView and
50 * ListItem. This currently requires overriding \b keyNavigationFocus in C++.
51 *
52 * The implementation of focus rings as provided by the default Ambiance theme
53 * sets \l activeFocusOnTab in the style of each component and only indicates
54 * focus as long as \b keyNavigationFocus is true, similar to the below example.
55 * \qml
56 * StyledItem {
57 * id: myItem
58 * activeFocusOnTab: true
59 * Rectangle {
60 * anchors.fill: parent
61 * color: keyNavigationFocus ? UbuntuColors.orange : UbuntuColors.blue
62 * }
63 * }
64 * \endqml
65 */
40bool UCStyledItemBase::keyNavigationFocus() const66bool UCStyledItemBase::keyNavigationFocus() const
41{67{
42 Q_D(const UCStyledItemBase);68 Q_D(const UCStyledItemBase);
@@ -44,6 +70,9 @@
44}70}
45void UCStyledItemBase::setKeyNavigationFocus(bool v)71void UCStyledItemBase::setKeyNavigationFocus(bool v)
46{72{
73 // FIXME: Behavior of nested StyledItem is currently undefined
74 // Docs should be updated once the behavior is sorted out
75 // See https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1575257
47 Q_D(UCStyledItemBase);76 Q_D(UCStyledItemBase);
48 if (d->keyNavigationFocus == v)77 if (d->keyNavigationFocus == v)
49 return;78 return;
5079
=== modified file 'tests/packaging-sorting.sh'
--- tests/packaging-sorting.sh 2016-03-07 14:21:53 +0000
+++ tests/packaging-sorting.sh 2016-05-18 10:22:28 +0000
@@ -27,6 +27,8 @@
27cp -a ../debian $tmpdir27cp -a ../debian $tmpdir
2828
29wrap-and-sort -a -t -d $tmpdir/debian/29wrap-and-sort -a -t -d $tmpdir/debian/
30# Verify control.gles which otherwise isn't picked up
31wrap-and-sort -a -t -d $tmpdir/debian/ -f $tmpdir/debian/control.gles
3032
31diff -urN ../debian $tmpdir/debian33diff -urN ../debian $tmpdir/debian
3234
3335
=== added file 'tests/unit_x11/tst_components/logo.png'
34Binary files tests/unit_x11/tst_components/logo.png 1970-01-01 00:00:00 +0000 and tests/unit_x11/tst_components/logo.png 2016-05-18 10:22:28 +0000 differ36Binary files tests/unit_x11/tst_components/logo.png 1970-01-01 00:00:00 +0000 and tests/unit_x11/tst_components/logo.png 2016-05-18 10:22:28 +0000 differ
=== modified file 'tests/unit_x11/tst_components/tst_pulltorefresh_listview.qml'
--- tests/unit_x11/tst_components/tst_pulltorefresh_listview.qml 2015-03-03 13:20:06 +0000
+++ tests/unit_x11/tst_components/tst_pulltorefresh_listview.qml 2016-05-18 10:22:28 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2014 Canonical Ltd.2 * Copyright 2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
66
=== added file 'tests/unit_x11/tst_components/tst_pulltorefresh_pagestack_topmargin.qml'
--- tests/unit_x11/tst_components/tst_pulltorefresh_pagestack_topmargin.qml 1970-01-01 00:00:00 +0000
+++ tests/unit_x11/tst_components/tst_pulltorefresh_pagestack_topmargin.qml 2016-05-18 10:22:28 +0000
@@ -0,0 +1,86 @@
1/*
2 * Copyright 2016 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import Ubuntu.Components.ListItems 1.3
20import QtTest 1.0
21import Ubuntu.Test 1.3
22
23Item {
24 width: units.gu(40)
25 height: units.gu(71)
26
27 MainView {
28 anchors.fill: parent
29 PageStack {
30 id: pageStack
31 Page {
32 id: page0
33 title: "One"
34 visible: false
35
36 ListView {
37 id: view
38 anchors.fill: parent
39 model: 15
40 delegate: Standard {
41 width: ListView.view.width
42 height: units.gu(5)
43 text: index
44 }
45 PullToRefresh {
46 id: pullMe
47 onRefresh: {
48 refreshing = true;
49 refreshing = false;
50 pageStack.push(page1)
51 }
52 }
53 }
54 }
55 Page {
56 id: page1
57 title: "Two"
58 visible: false
59 Button {
60 anchors.centerIn: parent
61 onClicked: pageStack.pop()
62 text: "back"
63 }
64 }
65 Component.onCompleted: pageStack.push(page0)
66 }
67 }
68
69 UbuntuTestCase {
70 name: "PullToRefreshPageStackPushWhileRefreshing"
71 when: windowShown
72
73 function test_push_while_refreshing_bug1578619() {
74 var initialTopMargin = view.topMargin;
75 var initialContentY = view.contentY;
76 flick(view, view.width/2, units.gu(10), 0, units.gu(40));
77 wait(1000);
78 pageStack.pop();
79 tryCompare(view, "moving", false);
80 tryCompare(view, "topMargin", initialTopMargin, 500,
81 "Initial topMargin of flickable is not restored after refreshing.");
82 tryCompare(view, "contentY", initialContentY, 500,
83 "Initial contentY of flickable is not restored after refreshing.")
84 }
85 }
86}
087
=== added file 'tests/unit_x11/tst_components/tst_pulltorefresh_topmargin.qml'
--- tests/unit_x11/tst_components/tst_pulltorefresh_topmargin.qml 1970-01-01 00:00:00 +0000
+++ tests/unit_x11/tst_components/tst_pulltorefresh_topmargin.qml 2016-05-18 10:22:28 +0000
@@ -0,0 +1,59 @@
1/*
2 * Copyright 2016 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import QtTest 1.0
20import Ubuntu.Test 1.3
21
22Item {
23 width: units.gu(40)
24 height: units.gu(71)
25 id: root
26 Flickable {
27 id: view
28 anchors.fill: parent
29 contentHeight: 1.6*view.height
30 Label {
31 anchors.centerIn: parent
32 text: "void"
33 }
34 PullToRefresh {
35 id: pullToRefresh
36 parent: view
37 onRefresh: {
38 refreshing = true;
39 refreshing = false;
40 }
41 }
42 }
43
44 UbuntuTestCase {
45 name: "PullToRefreshTopMargin"
46 when: windowShown
47
48 function test_reposition_after_refresh_bug1578619() {
49 var initialTopMargin = view.topMargin;
50 var initialContentY = view.contentY;
51 flick(view, view.width/2, units.gu(10), 0, units.gu(40));
52 tryCompare(view, "moving", false);
53 tryCompare(view, "topMargin", initialTopMargin, 500,
54 "Initial topMargin of flickable is not restored after refreshing.");
55 tryCompare(view, "contentY", initialContentY, 500,
56 "Initial contentY of flickable is not restored after refreshing.")
57 }
58 }
59}
060
=== added file 'tests/unit_x11/tst_components/tst_tabs11.qml'
--- tests/unit_x11/tst_components/tst_tabs11.qml 1970-01-01 00:00:00 +0000
+++ tests/unit_x11/tst_components/tst_tabs11.qml 2016-05-18 10:22:28 +0000
@@ -0,0 +1,198 @@
1/*
2 * Copyright 2012-2016 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.2
18import Ubuntu.Test 1.0
19import Ubuntu.Components 1.1
20
21MainView {
22 id: mainView
23 width: units.gu(50)
24 height: units.gu(80)
25 useDeprecatedToolbar: false
26
27 Tabs {
28 id: tabs
29 Tab {
30 id: tab1
31 title: "tab 1"
32 page: Page {
33 id: page1
34 Button {
35 id: button
36 anchors.centerIn: parent
37 text: "click"
38 }
39 }
40 }
41 Tab {
42 id: tab2
43 title: "tab 2"
44 page: Page {
45 id: page2
46 }
47 }
48 Tab {
49 id: tab3
50 title: "tab 3"
51 page: Page {
52 id: page3
53 }
54 }
55 Tab {
56 id: tabFlick1
57 title: "flick"
58 page: Page {
59 Flickable {
60 id: flickable1
61 anchors.fill: parent
62 }
63 }
64 }
65 Tab {
66 id: tabFlick2
67 title: "flick 2"
68 page: Page {
69 Flickable {
70 id: flickable2
71 anchors.fill: parent
72 }
73 }
74 }
75 Tab {
76 id: tabFlickLoader
77 title: "load"
78 page: Loader {
79 id: loader
80 sourceComponent: tabs.selectedTabIndex != 5 ? null : pageComponent
81 }
82 }
83 Tab {
84 id: tabNoFlickLoader
85 title: "loadNoFlick"
86 page: Loader {
87 id: loaderNoFlick
88 anchors {
89 left: parent.left
90 right: parent.right
91 bottom: parent.bottom
92 }
93 // height compes from the loaded Page
94 sourceComponent: tabs.selectedTabIndex === 6 ? pageComponentNoFlick : null
95 }
96 }
97 Tab {
98 // Test for bug #1570886, see initTestCase().
99 id: tabWithTitleFromPage
100 page: Page {
101 title: "Title from Page"
102 }
103 }
104 }
105 Component {
106 id: pageComponent
107 Page {
108 title: "Loaded page"
109 property Flickable flick: loadedFlickable
110 Flickable {
111 id: loadedFlickable
112 anchors.fill: parent
113 contentHeight: 1000
114 }
115 }
116 }
117 Component {
118 id: pageComponentNoFlick
119 Page {
120 title: "Loaded page without flickable"
121 }
122 }
123
124 UbuntuTestCase {
125 name: "TabsAPINewHeader"
126 when: windowShown
127
128 function initTestCase() {
129 // Test for bug #1570886.
130 compare(mainView.__propagated.header.title, tab1.title,
131 "Incorrect initial header title.");
132 }
133
134 function test_tabsDefaults() {
135 compare(tabs.selectedTabIndex, 0, "The default selectedTabIndex is 0 when Tabs has contents");
136 compare(tabs.selectedTab, tab1, "The default selectedTab is the first tab");
137 compare(tabs.currentPage, page1, "The default currentPage is the page of the first tab");
138 }
139
140 function test_tabsSetSelectedTab() {
141 var tabArray = [tab1, tab2, tab3];
142 var pageArray = [page1, page2, page3];
143 for (var i=0; i < 3; i++) {
144 tabs.selectedTabIndex = i;
145 compare(tabs.selectedTabIndex, i, "Can set selectedTabIndex");
146 compare(tabs.selectedTab, tabArray[i], "Can update selectedTab by setting selectedTabIndex");
147 compare(tabs.currentPage, pageArray[i], "Can update currentPage by setting selectedTabIndex");
148 for (var j=0; j < 3; j++) {
149 compare(pageArray[j].active, j===i, "Only the page of the selected tab is active");
150 }
151 }
152 }
153
154 function test_flickable() {
155 // ensure that the flickable of the header is set to the flickable of the selected tab.
156 tabs.selectedTabIndex = 3;
157 compare(mainView.__propagated.header.flickable, flickable1, "Header flickable correctly initialized");
158 tabs.selectedTabIndex = 4;
159 compare(mainView.__propagated.header.flickable, flickable2, "Header flickable correctly updated");
160 tabs.selectedTabIndex = 0;
161 }
162
163 function test_pageLoader() {
164 tabs.selectedTabIndex = 0;
165 compare(loader.item, null, "Page not loaded when tab is not selected");
166 tabs.selectedTabIndex = 5;
167 compare(tabs.currentPage, loader, "Selected loader for current page");
168 compare(loader.item.title, "Loaded page", "Loaded item is a page");
169 tabs.selectedTabIndex = 0;
170 compare(loader.item, null, "Loaded page was properly unloaded");
171 }
172
173 function test_bug1088740() {
174 tabs.selectedTabIndex = 5;
175 compare(mainView.__propagated.header.flickable, loader.item.flick, "Header flickable correctly updated with Loader");
176 compare(loader.item.flick.contentHeight, 1000, "Header flickable is correct flickable");
177 tabs.selectedTabIndex = 0;
178 }
179
180 function test_pageHeightLoaderNoFlick_bug1259917() {
181 tabs.selectedTabIndex = 6;
182 compare(tabs.selectedTab, tabNoFlickLoader, "Tab 6 was selected.");
183 compare(mainView.__propagated.header.flickable, null, "Loaded page without flickable.");
184 compare(loaderNoFlick.item.height, mainView.height - mainView.__propagated.header.height,
185 "Correct height for loaded Page without flickable.");
186 }
187
188 function test_index() {
189 compare(tab1.index, 0, "tab1 is at 0");
190 compare(tab2.index, 1, "tab2 is at 1");
191 compare(tab3.index, 2, "tab3 is at 2");
192 compare(tabFlick1.index, 3, "tabFlick1 is at 3");
193 compare(tabFlick2.index, 4, "tabFlick2 is at 4");
194 compare(tabFlickLoader.index, 5, "tabFlickLoader is at 5");
195 compare(tabNoFlickLoader.index, 6, "tabNoFlickLoader is at 6");
196 }
197 }
198}
0199
=== renamed file 'tests/unit_x11/tst_components/tst_tabs.qml' => 'tests/unit_x11/tst_components/tst_tabs13.qml'
--- tests/unit_x11/tst_components/tst_tabs.qml 2015-09-03 11:44:38 +0000
+++ tests/unit_x11/tst_components/tst_tabs13.qml 2016-05-18 10:22:28 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2012-2014 Canonical Ltd.2 * Copyright 2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -14,15 +14,14 @@
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/>.
15 */15 */
1616
17import QtQuick 2.217import QtQuick 2.4
18import Ubuntu.Test 1.018import Ubuntu.Test 1.0
19import Ubuntu.Components 1.119import Ubuntu.Components 1.3
2020
21MainView {21MainView {
22 id: mainView22 id: mainView
23 width: units.gu(50)23 width: units.gu(50)
24 height: units.gu(80)24 height: units.gu(80)
25 useDeprecatedToolbar: false
2625
27 Tabs {26 Tabs {
28 id: tabs27 id: tabs
@@ -94,6 +93,13 @@
94 sourceComponent: tabs.selectedTabIndex === 6 ? pageComponentNoFlick : null93 sourceComponent: tabs.selectedTabIndex === 6 ? pageComponentNoFlick : null
95 }94 }
96 }95 }
96 Tab {
97 // Test for bug #1570886, see initTestCase().
98 id: tabWithTitleFromPage
99 page: Page {
100 title: "Title from Page"
101 }
102 }
97 }103 }
98 Component {104 Component {
99 id: pageComponent105 id: pageComponent
@@ -118,6 +124,12 @@
118 name: "TabsAPINewHeader"124 name: "TabsAPINewHeader"
119 when: windowShown125 when: windowShown
120126
127 function initTestCase() {
128 // Test for bug #1570886.
129 compare(mainView.__propagated.header.title, tab1.title,
130 "Incorrect initial header title.");
131 }
132
121 function test_tabsDefaults() {133 function test_tabsDefaults() {
122 compare(tabs.selectedTabIndex, 0, "The default selectedTabIndex is 0 when Tabs has contents");134 compare(tabs.selectedTabIndex, 0, "The default selectedTabIndex is 0 when Tabs has contents");
123 compare(tabs.selectedTab, tab1, "The default selectedTab is the first tab");135 compare(tabs.selectedTab, tab1, "The default selectedTab is the first tab");

Subscribers

People subscribed via source and target branches

to status/vote changes: