Merge lp:~zsombi/ubuntu-ui-toolkit/colorFixes into lp:ubuntu-ui-toolkit/staging

Proposed by Zsombor Egri
Status: Merged
Approved by: Cris Dywan
Approved revision: 1898
Merged at revision: 1969
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/colorFixes
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 301 lines (+80/-35)
11 files modified
components.api (+1/-0)
examples/ubuntu-ui-toolkit-gallery/Colors.qml (+5/-5)
src/Ubuntu/Components/1.3/UbuntuListView.qml (+3/-1)
src/Ubuntu/Components/Themes/1.3/Palette.qml (+5/-0)
src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml (+1/-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/SuruDark/1.3/Palette.qml (+37/-13)
src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml (+1/-1)
src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml (+3/-5)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/colorFixes
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Cris Dywan Approve
Review via email: mp+288545@code.launchpad.net

Commit message

Fix palette colors, add focused palette value set.

To post a comment you must log in.
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
1897. By Zsombor Egri

API update

1898. By Zsombor Egri

staging sync

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

Looks sensible. I like that the color nuance tweak is a bit cleaner and more explicit (I might have to get used to the different focus ring width).

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components.api'
2--- components.api 2016-04-25 10:45:41 +0000
3+++ components.api 2016-05-03 04:48:27 +0000
4@@ -872,6 +872,7 @@
5 property PaletteValues selected
6 Ubuntu.Components.Themes.Palette 1.3: QtObject
7 property PaletteValues disabled
8+ property PaletteValues focused
9 property PaletteValues highlighted
10 property PaletteValues normal
11 property PaletteValues selected
12
13=== modified file 'examples/ubuntu-ui-toolkit-gallery/Colors.qml'
14--- examples/ubuntu-ui-toolkit-gallery/Colors.qml 2016-03-01 15:08:08 +0000
15+++ examples/ubuntu-ui-toolkit-gallery/Colors.qml 2016-05-03 04:48:27 +0000
16@@ -29,7 +29,7 @@
17 className: "Palette"
18 documentation: "qml-palette.html"
19
20- property var palettes: ["normal", "disabled", "selected", "selectedDisabled", "highlighted"]
21+ property var palettes: ["normal", "disabled", "selected", "selectedDisabled", "highlighted", "focused"]
22 property var paletteValues: [["background", ["backgroundText", "backgroundSecondaryText", "backgroundTertiaryText"]],
23 ["base", ["baseText"]],
24 ["foreground", ["foregroundText"]],
25@@ -75,7 +75,7 @@
26 property string mainColor: modelData[0]
27 property var textColors: modelData[1]
28 property bool previewed: paletteFlow.previewed == paletteColor
29- width: units.gu(4)
30+ width: units.gu(8)
31 height: units.gu(5)
32 z: previewed ? 10 : 0
33
34@@ -106,7 +106,7 @@
35
36 Rectangle {
37 anchors.fill: parent
38- color: palette[mainColor]
39+ color: palette ? palette[mainColor] : "transparent"
40 border.width: color == theme.palette.normal.background ? units.dp(1) : 0
41 border.color: theme.palette.normal.backgroundText
42 }
43@@ -124,8 +124,8 @@
44 model: textColors
45 Label {
46 width: previewed ? implicitWidth : parent.width
47- text: previewed ? modelData : modelData.slice(0, 4)
48- color: palette[modelData]
49+ text: previewed ? modelData : modelData.slice(0, 10)
50+ color: palette ? palette[modelData] : "transparent"
51 textSize: previewed ? Label.Medium : Label.XSmall
52 elide: Text.ElideRight
53 }
54
55=== modified file 'src/Ubuntu/Components/1.3/UbuntuListView.qml'
56--- src/Ubuntu/Components/1.3/UbuntuListView.qml 2016-03-01 14:53:44 +0000
57+++ src/Ubuntu/Components/1.3/UbuntuListView.qml 2016-05-03 04:48:27 +0000
58@@ -196,7 +196,9 @@
59
60 // highlight current item
61 highlight: Rectangle {
62- color: theme.palette.selected.background
63+ color: root.activeFocus
64+ ? theme.palette.focused.background
65+ : theme.palette.selected.background
66 }
67 highlightMoveDuration: 0
68 }
69
70=== modified file 'src/Ubuntu/Components/Themes/1.3/Palette.qml'
71--- src/Ubuntu/Components/Themes/1.3/Palette.qml 2016-03-01 15:06:38 +0000
72+++ src/Ubuntu/Components/Themes/1.3/Palette.qml 2016-05-03 04:48:27 +0000
73@@ -60,6 +60,11 @@
74 property PaletteValues disabled: PaletteValues{}
75
76 /*!
77+ Color palette to use when the widget is focused.
78+ */
79+ property PaletteValues focused: PaletteValues{}
80+
81+ /*!
82 Color palette to use when the widget is selected, for example when
83 a tab is the current one.
84 */
85
86=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml'
87--- src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml 2016-04-26 05:33:41 +0000
88+++ src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceNormal.qml 2016-05-03 04:48:27 +0000
89@@ -24,7 +24,7 @@
90 backgroundSecondaryText: UbuntuColors.slate
91 backgroundTertiaryText: UbuntuColors.ash
92 base: UbuntuColors.silk
93- baseText: UbuntuColors.ash
94+ baseText: UbuntuColors.graphite
95 foreground: UbuntuColors.porcelain
96 foregroundText: UbuntuColors.jet
97 raised: "#FFFFFF"
98
99=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml'
100--- src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml 2016-03-01 15:06:38 +0000
101+++ src/Ubuntu/Components/Themes/Ambiance/1.3/AmbianceSelected.qml 2016-05-03 04:48:27 +0000
102@@ -19,9 +19,8 @@
103
104 AmbianceNormal {
105 background: UbuntuColors.porcelain
106- backgroundText: UbuntuColors.blue
107- backgroundTertiaryText: UbuntuColors.blue
108 base: UbuntuColors.ash
109- baseText: UbuntuColors.blue
110+ baseText: UbuntuColors.inkstone
111 foreground: UbuntuColors.ash
112+ overlay: UbuntuColors.porcelain
113 }
114
115=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml'
116--- src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml 2016-01-28 11:54:29 +0000
117+++ src/Ubuntu/Components/Themes/Ambiance/1.3/FocusShape.qml 2016-05-03 04:48:27 +0000
118@@ -26,7 +26,7 @@
119 color: styledItem.enabled
120 ? theme.palette.normal.focus
121 : theme.palette.disabled.focus
122- thickness: units.gu(0.21)
123+ thickness: units.dp(1)
124 radius: units.gu(1.7)
125 visible: styledItem.keyNavigationFocus
126
127
128=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml'
129--- src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml 2016-04-26 05:33:41 +0000
130+++ src/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml 2016-05-03 04:48:27 +0000
131@@ -26,15 +26,18 @@
132 // specific disabled colors
133 var diff = {
134 field: UbuntuColors.porcelain,
135- positiveText: normal.positiveText,
136- negativeText: normal.negativeText,
137+ selection: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.1),
138+ positiveText: "#FFFFFF",
139+ negativeText: "#FFFFFF",
140+ activityText: "#FFFFFF",
141+ focusText: "#FFFFFF"
142 };
143 for (var p in normal) {
144 // skip objectName and all change signals
145 if (p === "objectName" || p.indexOf("Changed") > 0) continue;
146 disabled[p] = diff[p] || (
147 // if not specific, colors are 30% opaque normal
148- Qt.rgba(normal[p].r, normal[p].g, normal[p].b, 0.3)
149+ Qt.rgba(normal[p].r, normal[p].g, normal[p].b, 0.5)
150 );
151 }
152 }
153@@ -51,13 +54,18 @@
154 background: UbuntuColors.porcelain,
155 base: UbuntuColors.porcelain,
156 foreground: UbuntuColors.porcelain,
157+ selection: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.1),
158+ positiveText: "#FFFFFF",
159+ negativeText: "#FFFFFF",
160+ activityText: "#FFFFFF",
161+ focusText: "#FFFFFF"
162 };
163 for (var p in selected) {
164 // skip objectName and all change signals
165 if (p === "objectName" || p.indexOf("Changed") > 0) continue;
166 selectedDisabled[p] = diff[p] || (
167 // if not specific, colors are 30% opaque normal
168- Qt.rgba(selected[p].r, selected[p].g, selected[p].b, 0.3)
169+ Qt.rgba(selected[p].r, selected[p].g, selected[p].b, 0.5)
170 );
171 }
172 }
173@@ -65,7 +73,15 @@
174
175 highlighted: AmbianceNormal {
176 background: UbuntuColors.silk
177- base: UbuntuColors.jet
178+ base: UbuntuColors.ash
179+ baseText: UbuntuColors.inkstone
180 foreground: UbuntuColors.silk
181+ raised: UbuntuColors.silk
182+ raisedText: UbuntuColors.inkstone
183+ raisedSecondaryText: UbuntuColors.ash
184+ }
185+
186+ focused: AmbianceNormal {
187+ background: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.2)
188 }
189 }
190
191=== modified file 'src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml'
192--- src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml 2016-03-10 08:46:03 +0000
193+++ src/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml 2016-05-03 04:48:27 +0000
194@@ -22,14 +22,23 @@
195 Palette {
196 normal: SuruDarkNormal {}
197 disabled: SuruDarkNormal {
198- field: UbuntuColors.inkstone
199- // inactive is 30% transparent normal
200 Component.onCompleted: {
201+ // specific disabled colors
202+ var diff = {
203+ foreground: UbuntuColors.inkstone,
204+ field: UbuntuColors.inkstone,
205+ positiveText: UbuntuColors.porcelain,
206+ negativeText: UbuntuColors.porcelain,
207+ activityText: UbuntuColors.porcelain,
208+ focusText: UbuntuColors.porcelain
209+ };
210 for (var p in normal) {
211 // skip objectName and all change signals
212- if (p == "objectName"|| p.indexOf("Changed") > 0
213- || p == "field" || p == "foreground" ) continue;
214- disabled[p] = Qt.rgba(normal[p].r, normal[p].g, normal[p].b, 0.3);
215+ if (p == "objectName"|| p.indexOf("Changed") > 0) continue;
216+ disabled[p] = diff[p] || (
217+ // if not specific, colors are 30% opaque normal
218+ Qt.rgba(normal[p].r, normal[p].g, normal[p].b, 0.5)
219+ );
220 }
221 }
222 }
223@@ -39,24 +48,39 @@
224
225 // selected differs from normal in background, base, foreground
226 selectedDisabled: SuruDarkSelected {
227- background: UbuntuColors.inkstone
228- base: UbuntuColors.inkstone
229- foreground: UbuntuColors.inkstone
230- // inactive is 30% transparent normal
231 Component.onCompleted: {
232+ var diff = {
233+ background: UbuntuColors.inkstone,
234+ base: UbuntuColors.inkstone,
235+ foreground: UbuntuColors.inkstone,
236+ positiveText: UbuntuColors.porcelain,
237+ negativeText: UbuntuColors.porcelain,
238+ activityText: UbuntuColors.porcelain,
239+ focusText: UbuntuColors.porcelain
240+ };
241 for (var p in selected) {
242 // skip objectName and all change signals
243- if (p == "objectName"|| p.indexOf("Changed") > 0
244- || p == "field" || p == "foreground" ) continue;
245- selectedDisabled[p] = Qt.rgba(selected[p].r, selected[p].g, selected[p].b, 0.3);
246+ if (p == "objectName"|| p.indexOf("Changed") > 0) continue;
247+ selectedDisabled[p] = diff[p] || (
248+ // if not specific, colors are 30% opaque normal
249+ Qt.rgba(selected[p].r, selected[p].g, selected[p].b, 0.5)
250+ );
251 }
252 }
253 }
254
255 highlighted: SuruDarkNormal {
256 background: UbuntuColors.slate
257- base: UbuntuColors.graphite
258+ base: UbuntuColors.slate
259+ baseText: UbuntuColors.silk
260 foreground: UbuntuColors.slate
261+ raised: UbuntuColors.silk
262+ raisedText: UbuntuColors.inkstone
263+ raisedSecondaryText: UbuntuColors.ash
264+ }
265+
266+ focused: SuruDarkNormal {
267+ background: Qt.rgba(UbuntuColors.blue.r, UbuntuColors.blue.g, UbuntuColors.blue.b, 0.4)
268 }
269 }
270 //![0]
271
272=== modified file 'src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml'
273--- src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml 2016-04-26 05:33:41 +0000
274+++ src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkNormal.qml 2016-05-03 04:48:27 +0000
275@@ -24,7 +24,7 @@
276 backgroundSecondaryText: UbuntuColors.silk
277 backgroundTertiaryText: UbuntuColors.ash
278 base: UbuntuColors.graphite
279- baseText: UbuntuColors.ash
280+ baseText: UbuntuColors.silk
281 foreground: UbuntuColors.inkstone
282 foregroundText: "#FFFFFF"
283 raised: "#FFFFFF"
284
285=== modified file 'src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml'
286--- src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml 2016-03-01 15:06:38 +0000
287+++ src/Ubuntu/Components/Themes/SuruDark/1.3/SuruDarkSelected.qml 2016-05-03 04:48:27 +0000
288@@ -20,10 +20,8 @@
289
290 SuruDarkNormal {
291 background: UbuntuColors.inkstone
292- backgroundText: UbuntuColors.blue
293- backgroundTertiaryText: UbuntuColors.blue
294- base: UbuntuColors.ash
295- baseText:UbuntuColors.blue
296+ base: UbuntuColors.inkstone
297+ baseText: UbuntuColors.ash
298 foreground: UbuntuColors.slate
299+ overlay: UbuntuColors.slate
300 }
301-

Subscribers

People subscribed via source and target branches