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
=== modified file 'components.api'
--- components.api 2016-04-25 10:45:41 +0000
+++ components.api 2016-05-03 04:48:27 +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
878879
=== 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-03 04:48:27 +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"]],
@@ -75,7 +75,7 @@
75 property string mainColor: modelData[0]75 property string mainColor: modelData[0]
76 property var textColors: modelData[1]76 property var textColors: modelData[1]
77 property bool previewed: paletteFlow.previewed == paletteColor77 property bool previewed: paletteFlow.previewed == paletteColor
78 width: units.gu(4)78 width: units.gu(8)
79 height: units.gu(5)79 height: units.gu(5)
80 z: previewed ? 10 : 080 z: previewed ? 10 : 0
8181
@@ -106,7 +106,7 @@
106106
107 Rectangle {107 Rectangle {
108 anchors.fill: parent108 anchors.fill: parent
109 color: palette[mainColor]109 color: palette ? palette[mainColor] : "transparent"
110 border.width: color == theme.palette.normal.background ? units.dp(1) : 0110 border.width: color == theme.palette.normal.background ? units.dp(1) : 0
111 border.color: theme.palette.normal.backgroundText111 border.color: theme.palette.normal.backgroundText
112 }112 }
@@ -124,8 +124,8 @@
124 model: textColors124 model: textColors
125 Label {125 Label {
126 width: previewed ? implicitWidth : parent.width126 width: previewed ? implicitWidth : parent.width
127 text: previewed ? modelData : modelData.slice(0, 4)127 text: previewed ? modelData : modelData.slice(0, 10)
128 color: palette[modelData]128 color: palette ? palette[modelData] : "transparent"
129 textSize: previewed ? Label.Medium : Label.XSmall129 textSize: previewed ? Label.Medium : Label.XSmall
130 elide: Text.ElideRight130 elide: Text.ElideRight
131 }131 }
132132
=== 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-03 04:48:27 +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-03 04:48:27 +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/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-03 04:48:27 +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"
3131
=== 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-03 04:48:27 +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-03 04:48:27 +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-03 04:48:27 +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, 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, 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/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-03 04:48:27 +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, 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, 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-03 04:48:27 +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"
3131
=== 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-03 04:48:27 +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

Subscribers

People subscribed via source and target branches