Merge lp:~osomon/notes-app/new_theming_fixed into lp:notes-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 148
Merged at revision: 148
Proposed branch: lp:~osomon/notes-app/new_theming_fixed
Merge into: lp:notes-app
Diff against target: 115 lines (+12/-26)
7 files modified
CMakeLists.txt (+1/-1)
Components/CollapsedNoteDecorations.qml (+2/-1)
Components/ImageDelegate.qml (+2/-0)
Components/TextDelegate.qml (+6/-4)
NotesApp.qml (+0/-2)
notes-app.qmltheme (+0/-17)
tests/autopilot/notes_app/tests/test_create.py (+1/-1)
To merge this branch: bzr merge lp:~osomon/notes-app/new_theming_fixed
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+173139@code.launchpad.net

Commit message

Adapted to newer and simpler toolkit's theming infrastructure. The header is no longer yellow which is fine since a revamped visual design for that is underway.

The ItemStyle attached property has been removed and widgets now have a 'style' property equivalent to what ItemStyle.delegate was providing.

(original work by Florian, I merely fixed the failing tests)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Olivier Tilloy (osomon) wrote :

Jenkins is busted, it posts the same results twice, but marks them failed the second time for no good reason.
Still, it appears that the tests all pass. Hurray!

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-06-17 15:04:55 +0000
3+++ CMakeLists.txt 2013-07-05 07:12:26 +0000
4@@ -21,7 +21,7 @@
5 DESTINATION ${CMAKE_INSTALL_BINDIR}
6 )
7
8-file(GLOB QML_JS_FILES *.qml *.qmltheme)
9+file(GLOB QML_JS_FILES *.qml)
10
11 install(FILES ${QML_JS_FILES}
12 DESTINATION ${NOTES_APP_DIR}
13
14=== modified file 'Components/CollapsedNoteDecorations.qml'
15--- Components/CollapsedNoteDecorations.qml 2013-06-10 11:48:01 +0000
16+++ Components/CollapsedNoteDecorations.qml 2013-07-05 07:12:26 +0000
17@@ -34,12 +34,13 @@
18
19 Label {
20 id: noteDate
21- ItemStyle.class: "note-date"
22 anchors {
23 bottom: parent.bottom
24 right: parent.right
25 margins: units.gu(1)
26 }
27+ fontSize: "x-small"
28+ color: "#c7af87"
29 }
30
31 Behavior on opacity {
32
33=== modified file 'Components/ImageDelegate.qml'
34--- Components/ImageDelegate.qml 2013-05-02 23:45:59 +0000
35+++ Components/ImageDelegate.qml 2013-07-05 07:12:26 +0000
36@@ -20,6 +20,8 @@
37 Item {
38 id: item
39
40+ readonly property string type: "image"
41+
42 property string source
43 signal clicked(bool atTop)
44 signal activateClipboard()
45
46=== modified file 'Components/TextDelegate.qml'
47--- Components/TextDelegate.qml 2013-05-31 16:34:00 +0000
48+++ Components/TextDelegate.qml 2013-07-05 07:12:26 +0000
49@@ -16,15 +16,17 @@
50
51 import QtQuick 2.0
52 import Ubuntu.Components 0.1
53+import Ubuntu.Components.Themes.Ambiance 0.1
54
55 TextArea {
56 id: textArea
57
58- /* WORKAROUND for but in the SDK:
59- https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1168006
60- which makes the app crash when loading the theme */
61- ItemStyle.delegate: Item {}
62+ readonly property string type: "text"
63
64+ style: TextAreaStyle {
65+ frameSpacing: 0
66+ background: Item {}
67+ }
68 signal deletePrevious()
69
70 autoSize: true
71
72=== modified file 'NotesApp.qml'
73--- NotesApp.qml 2013-05-31 16:34:00 +0000
74+++ NotesApp.qml 2013-07-05 07:12:26 +0000
75@@ -63,8 +63,6 @@
76 }
77 }
78
79- Component.onCompleted: Theme.loadTheme(Qt.resolvedUrl("notes-app.qmltheme"))
80-
81 Page {
82 anchors.fill: parent
83 title: i18n.tr("Notes")
84
85=== removed file 'notes-app.qmltheme'
86--- notes-app.qmltheme 2013-03-25 11:12:44 +0000
87+++ notes-app.qmltheme 1970-01-01 00:00:00 +0000
88@@ -1,17 +0,0 @@
89-@import url(system:/Ambiance/qmltheme/default.qmltheme);
90-
91-@qml-mapping(.textarea, TextAreaStyle, );
92-
93-.textarea {
94- frameSpacing: 8
95-}
96-
97-.note-date {
98- fontSize: "x-small";
99- color: "#c7af87";
100-}
101-
102-.header {
103- backgroundColor: "#f9edc1";
104- backgroundSource: "";
105-}
106
107=== modified file 'tests/autopilot/notes_app/tests/test_create.py'
108--- tests/autopilot/notes_app/tests/test_create.py 2013-05-15 16:46:44 +0000
109+++ tests/autopilot/notes_app/tests/test_create.py 2013-07-05 07:12:26 +0000
110@@ -148,4 +148,4 @@
111 self.pointing_device.click()
112
113 content = self.main_window.get_note_content(note)
114- self.assertThat(content.activeFocus, Equals(True))
115+ self.assertThat(content.activeFocus, Eventually(Equals(True)))

Subscribers

People subscribed via source and target branches