Merge lp:~fboucault/ubuntu-ui-toolkit/color_palette into lp:ubuntu-ui-toolkit
- color_palette
- Merge into trunk
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Tim Peeters | ||||||||
Approved revision: | 620 | ||||||||
Merged at revision: | 608 | ||||||||
Proposed branch: | lp:~fboucault/ubuntu-ui-toolkit/color_palette | ||||||||
Merge into: | lp:ubuntu-ui-toolkit | ||||||||
Diff against target: |
1136 lines (+306/-118) 42 files modified
examples/jokes/jokes.qml (+2/-2) examples/locale/locale.qml (+2/-2) examples/ubuntu-ui-toolkit-gallery/Dialog.qml (+1/-1) examples/ubuntu-ui-toolkit-gallery/ListItems.qml (+2/-2) examples/ubuntu-ui-toolkit-gallery/ListItemsSection.qml (+6/-13) examples/ubuntu-ui-toolkit-gallery/UbuntuShape.qml (+6/-6) examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml (+1/-1) modules/Ubuntu/Components/Label.qml (+1/-1) modules/Ubuntu/Components/ListItems/Caption.qml (+9/-19) modules/Ubuntu/Components/ListItems/Empty.qml (+1/-2) modules/Ubuntu/Components/ListItems/LabelVisual.qml (+2/-1) modules/Ubuntu/Components/ListItems/MultiValue.qml (+1/-0) modules/Ubuntu/Components/ListItems/Standard.qml (+2/-4) modules/Ubuntu/Components/ListItems/Subtitled.qml (+1/-0) modules/Ubuntu/Components/ListItems/ValueSelector.qml (+1/-1) modules/Ubuntu/Components/Panel.qml (+4/-4) modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml (+1/-0) modules/Ubuntu/Components/Popups/Popover.qml (+1/-1) modules/Ubuntu/Components/TextArea.qml (+5/-4) modules/Ubuntu/Components/TextField.qml (+5/-4) modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml (+2/-2) modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml (+2/-2) modules/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/NewTabBar.qml (+8/-3) modules/Ubuntu/Components/Themes/Ambiance/Palette.qml (+45/-0) modules/Ubuntu/Components/Themes/Ambiance/PointerStyleShader.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/PopoverForegroundStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/ScrollbarStyle.qml (+1/-3) modules/Ubuntu/Components/Themes/Ambiance/SliderStyle.qml (+3/-9) modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml (+3/-3) modules/Ubuntu/Components/Themes/Ambiance/TabsStyle.qml (+2/-6) modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml (+2/-4) modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml (+2/-2) modules/Ubuntu/Components/Themes/Ambiance/ToolbarButtonStyle.qml (+1/-1) modules/Ubuntu/Components/Themes/Ambiance/ToolbarStyle.qml (+1/-3) modules/Ubuntu/Components/Themes/Palette.qml (+59/-0) modules/Ubuntu/Components/Themes/PaletteValues.qml (+72/-0) modules/Ubuntu/Components/Themes/Themes.pro (+11/-0) modules/Ubuntu/Components/Themes/qmldir (+3/-0) modules/Ubuntu/Components/plugin/uctheme.cpp (+26/-1) modules/Ubuntu/Components/plugin/uctheme.h (+6/-0) tests/unit_x11/tst_components/tst_textfield.qml (+0/-8) |
||||||||
To merge this branch: | bzr merge lp:~fboucault/ubuntu-ui-toolkit/color_palette | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Peeters | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email: mp+173114@code.launchpad.net |
Commit message
Introduce new theme color palette API centralising the definition of the colors used by the widgets to draw themselves.
Adapted most widgets to use the theme color palette.
The color palette defined in the Ambiance theme is the one from the new visual design.
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
Tim Peeters (tpeeters) wrote : | # |
make check gives me failures for textarea
Tim Peeters (tpeeters) wrote : | # |
and the link for the failures: https:/
Tim Peeters (tpeeters) wrote : | # |
normal/selected for palette names and background/
Tim Peeters (tpeeters) wrote : | # |
perhaps my screen is not very good, but the contrast between secondary labels and the grey backgrounds of the mainview are quite low: http://
It will be tiring to read a lot with such low contrast.
Tim Peeters (tpeeters) wrote : | # |
There is a change in button colors that was not introduced in this MR, but it is related. Dialogs and Sheets (in uitk component gallery) can have two buttons (for example 'confirm' and 'cancel') which used to have strongly contrasting colors, and in the current version they are two different shades of orange. We need an updated design for this or revert to the "old" colors.
Tim Peeters (tpeeters) wrote : | # |
tim@ideapad:
that command should work right? It gives me a black window and a lot of error output: https:/
Tim Peeters (tpeeters) wrote : | # |
> normal/selected for palette names and background/
> specific names in a certain use case. Is there a way we could generalize
> these, and get colors using, for example something like color:
> Theme.paletteCo
Do we have different options for the interface for defining and using palettes? Is there a doc to compare them?
Florian Boucault (fboucault) wrote : | # |
> normal/selected for palette names and background/
> specific names in a certain use case. Is there a way we could generalize
> these, and get colors using, for example something like color:
> Theme.paletteCo
The main idea behind the palette is to ensure consistency, hence we will by design keep the number of colors (base, background, etc.) very low. It's likely not to grow beyond what we have now.
Florian Boucault (fboucault) wrote : | # |
> There is a change in button colors that was not introduced in this MR, but it
> is related. Dialogs and Sheets (in uitk component gallery) can have two
> buttons (for example 'confirm' and 'cancel') which used to have strongly
> contrasting colors, and in the current version they are two different shades
> of orange. We need an updated design for this or revert to the "old" colors.
Fixed in latest commit.
- 612. By Florian Boucault
-
Added FIXME.
- 613. By Florian Boucault
-
Made dialog cancel button use grey gradient.
Florian Boucault (fboucault) wrote : | # |
> tim@ideapad:
> UBUNTU_
> tests/resources
>
> that command should work right? It gives me a black window and a lot of error
> output: https:/
It does not work here either however the following works:
QML2_IMPORT_
Strange.
Florian Boucault (fboucault) wrote : | # |
> > normal/selected for palette names and background/
> are
> > specific names in a certain use case. Is there a way we could generalize
> > these, and get colors using, for example something like color:
> > Theme.paletteCo
>
> Do we have different options for the interface for defining and using
> palettes? Is there a doc to compare them?
I'm not sure what you mean by that.
Florian Boucault (fboucault) wrote : | # |
> perhaps my screen is not very good, but the contrast between secondary labels
> and the grey backgrounds of the mainview are quite low:
> http://
> It will be tiring to read a lot with such low contrast.
I added a few small fixes:
- the gallery was using an extra Rectangle behind the lists that I just removed.
- the color of the text alpha value was an approximation from 50% to 7F, so I rounded up to 81.
- the PNG with the noise tiled over the background color was incorrect and making the background darker than it should be.
Can you tell if it looks the same as in there for you? That's the mockup from design.
http://
Florian Boucault (fboucault) wrote : | # |
> and the link for the failures: https:/
I don't see how this MR could have broken that. Hmm
Tim Peeters (tpeeters) wrote : | # |
> > perhaps my screen is not very good, but the contrast between secondary
> labels
> > and the grey backgrounds of the mainview are quite low:
> > http://
> > It will be tiring to read a lot with such low contrast.
>
> I added a few small fixes:
> - the gallery was using an extra Rectangle behind the lists that I just
> removed.
> - the color of the text alpha value was an approximation from 50% to 7F, so I
> rounded up to 81.
> - the PNG with the noise tiled over the background color was incorrect and
> making the background darker than it should be.
>
> Can you tell if it looks the same as in there for you? That's the mockup from
> design.
> http://
Color seems the same, but in the gallery the fonts are a lot smaller, so there is probably some anti-aliasing which makes the edges of the letters lighter. I'd say it is an issue for design.
- 614. By Florian Boucault
-
Tuned colors for background.
- 615. By Florian Boucault
-
Removed background Rectangle behind list items in gallery.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:613
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Tim Peeters (tpeeters) wrote : | # |
> > > normal/selected for palette names and background/
> > are
> > > specific names in a certain use case. Is there a way we could generalize
> > > these, and get colors using, for example something like color:
> > > Theme.paletteCo
> >
> > Do we have different options for the interface for defining and using
> > palettes? Is there a doc to compare them?
>
> I'm not sure what you mean by that.
If PaletteValues should be considered as part of our API, it needs more discussion, and an overview of alternatives (such as the Theme.paletteCo
But I'm not sure if we consider PaletteValues as such. Can each Theme deffine its own PaletteValues properties?
Florian Boucault (fboucault) wrote : | # |
> > > > normal/selected for palette names and background/
> colors
> > > are
> > > > specific names in a certain use case. Is there a way we could generalize
> > > > these, and get colors using, for example something like color:
> > > > Theme.paletteCo
> > >
> > > Do we have different options for the interface for defining and using
> > > palettes? Is there a doc to compare them?
> >
> > I'm not sure what you mean by that.
>
> If PaletteValues should be considered as part of our API, it needs more
> discussion, and an overview of alternatives (such as the
> Theme.paletteCo
> (do we need a nameText in addition to every property name, is "Text" the best
> name since it can also be an image, ..) would also be part of that discussion.
The names were agreed upon by design. The *Text suffix follows the convention used by Qt.
http://
>
> But I'm not sure if we consider PaletteValues as such. Can each Theme deffine
> its own PaletteValues properties?
No, it's meant to be a single palette API for everybody, like in Qt.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:615
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Tim Peeters (tpeeters) wrote : | # |
"field" colors are never used. Are they needed?
- 616. By Florian Boucault
-
Updated background noise with asset provided by Rosie.
- 617. By Florian Boucault
-
Removed pointless color tests.
- 618. By Florian Boucault
-
Merged trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:618
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 619. By Florian Boucault
-
Added missing documentation.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:619
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
- 620. By Florian Boucault
-
Merged from trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:620
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Florian Boucault (fboucault) wrote : | # |
Everything is good to go now.
Andrea Cimitan (cimi) wrote : | # |
I was wondering whether normal and selected are enough, or we will need something like 'insensitive' (imagine a button you can't press because is disabled, like in an indicator or a system setting..)
Florian Boucault (fboucault) wrote : | # |
> I was wondering whether normal and selected are enough, or we will need
> something like 'insensitive' (imagine a button you can't press because is
> disabled, like in an indicator or a system setting..)
These things will be added later as we need them.
Tim Peeters (tpeeters) wrote : | # |
qt patched to fix the tabs header font color (opacity) problem.
Preview Diff
1 | === modified file 'examples/jokes/jokes.qml' |
2 | --- examples/jokes/jokes.qml 2013-05-02 00:34:47 +0000 |
3 | +++ examples/jokes/jokes.qml 2013-07-08 02:02:26 +0000 |
4 | @@ -88,7 +88,7 @@ |
5 | } |
6 | |
7 | UbuntuShape { |
8 | - color: "#888888" |
9 | + color: Theme.palette.normal.base |
10 | radius: "medium" |
11 | anchors.centerIn: parent |
12 | anchors.margins: units.gu(10) |
13 | @@ -106,7 +106,7 @@ |
14 | anchors.fill: parent |
15 | text: "Tap here!" |
16 | fontSize: "large" |
17 | - color: "#f1f1f1" |
18 | + color: Theme.palette.normal.baseText |
19 | textFormat: Text.RichText |
20 | horizontalAlignment: Text.AlignHCenter |
21 | verticalAlignment: Text.AlignVCenter |
22 | |
23 | === modified file 'examples/locale/locale.qml' |
24 | --- examples/locale/locale.qml 2013-05-02 00:01:27 +0000 |
25 | +++ examples/locale/locale.qml 2013-07-08 02:02:26 +0000 |
26 | @@ -89,7 +89,7 @@ |
27 | highlight: Rectangle { |
28 | height: units.gu(2) |
29 | width: view.width |
30 | - color: "pink" |
31 | + color: Theme.palette.selected.background |
32 | } |
33 | } |
34 | } |
35 | @@ -100,7 +100,7 @@ |
36 | leftMargin: units.gu(0.5) |
37 | bottom: parent.bottom |
38 | } |
39 | - color: "lightgrey" |
40 | + color: Theme.palette.normal.base |
41 | width: parent.width |
42 | Column { |
43 | anchors.fill: parent |
44 | |
45 | === modified file 'examples/ubuntu-ui-toolkit-gallery/Dialog.qml' |
46 | --- examples/ubuntu-ui-toolkit-gallery/Dialog.qml 2013-07-01 05:54:33 +0000 |
47 | +++ examples/ubuntu-ui-toolkit-gallery/Dialog.qml 2013-07-08 02:02:26 +0000 |
48 | @@ -43,11 +43,11 @@ |
49 | |
50 | Button { |
51 | text: "Cancel" |
52 | + gradient: UbuntuColors.greyGradient |
53 | onClicked: PopupUtils.close(dialogue) |
54 | } |
55 | Button { |
56 | text: "Delete" |
57 | - color: UbuntuColors.orange |
58 | onClicked: PopupUtils.close(dialogue) |
59 | } |
60 | } |
61 | |
62 | === modified file 'examples/ubuntu-ui-toolkit-gallery/ListItems.qml' |
63 | --- examples/ubuntu-ui-toolkit-gallery/ListItems.qml 2013-06-19 09:43:01 +0000 |
64 | +++ examples/ubuntu-ui-toolkit-gallery/ListItems.qml 2013-07-08 02:02:26 +0000 |
65 | @@ -107,7 +107,7 @@ |
66 | removable: true |
67 | backgroundIndicator: Rectangle { |
68 | anchors.fill: parent |
69 | - color: "gray" |
70 | + color: Theme.palette.normal.base |
71 | } |
72 | } |
73 | } |
74 | @@ -117,7 +117,7 @@ |
75 | className: "Header" |
76 | |
77 | Rectangle { |
78 | - color: "#f7f7f7" |
79 | + color: Qt.rgba(0.0, 0.0, 0.0, 0.01) |
80 | anchors.left: parent.left |
81 | anchors.right: parent.right |
82 | height: groupedList.height |
83 | |
84 | === modified file 'examples/ubuntu-ui-toolkit-gallery/ListItemsSection.qml' |
85 | --- examples/ubuntu-ui-toolkit-gallery/ListItemsSection.qml 2013-04-24 17:09:29 +0000 |
86 | +++ examples/ubuntu-ui-toolkit-gallery/ListItemsSection.qml 2013-07-08 02:02:26 +0000 |
87 | @@ -22,21 +22,14 @@ |
88 | property alias delegate: repeater.delegate |
89 | documentation: "qml-ubuntu-components-listitems0-%1.html".arg(className.toLowerCase()) |
90 | |
91 | - Rectangle { |
92 | - color: "#f7f7f7" |
93 | + Column { |
94 | + id: column |
95 | anchors.left: parent.left |
96 | anchors.right: parent.right |
97 | - height: column.height |
98 | - |
99 | - Column { |
100 | - id: column |
101 | - anchors.left: parent.left |
102 | - anchors.right: parent.right |
103 | - |
104 | - Repeater { |
105 | - id: repeater |
106 | - model: 4 |
107 | - } |
108 | + |
109 | + Repeater { |
110 | + id: repeater |
111 | + model: 4 |
112 | } |
113 | } |
114 | } |
115 | |
116 | === modified file 'examples/ubuntu-ui-toolkit-gallery/UbuntuShape.qml' |
117 | --- examples/ubuntu-ui-toolkit-gallery/UbuntuShape.qml 2013-07-01 05:54:33 +0000 |
118 | +++ examples/ubuntu-ui-toolkit-gallery/UbuntuShape.qml 2013-07-08 02:02:26 +0000 |
119 | @@ -66,27 +66,27 @@ |
120 | UbuntuShape { |
121 | objectName: "ubuntushape_radius_small" |
122 | |
123 | - color: "#dd4814" |
124 | + color: Theme.palette.normal.foreground |
125 | radius: "small" |
126 | |
127 | Label { |
128 | anchors.centerIn: parent |
129 | text: "small" |
130 | fontSize: "x-small" |
131 | - color: "#f1f1f1" |
132 | + color: Theme.palette.normal.foregroundText |
133 | } |
134 | } |
135 | |
136 | UbuntuShape { |
137 | objectName: "ubuntushape_radius_medium" |
138 | - color: "#dd4814" |
139 | + color: Theme.palette.normal.foreground |
140 | radius: "medium" |
141 | |
142 | Label { |
143 | anchors.centerIn: parent |
144 | text: "medium" |
145 | fontSize: "x-small" |
146 | - color: "#f1f1f1" |
147 | + color: Theme.palette.normal.foregroundText |
148 | } |
149 | } |
150 | } |
151 | @@ -98,7 +98,7 @@ |
152 | |
153 | UbuntuShape { |
154 | objectName: "ubuntushape_sizes_15_6" |
155 | - color: "#dd4814" |
156 | + color: Theme.palette.normal.foreground |
157 | width: units.gu(15) |
158 | height: units.gu(6) |
159 | anchors.verticalCenter: parent.verticalCenter |
160 | @@ -106,7 +106,7 @@ |
161 | |
162 | UbuntuShape { |
163 | objectName: "ubuntushape_sizes_10_14" |
164 | - color: "#dd4814" |
165 | + color: Theme.palette.normal.foreground |
166 | width: units.gu(10) |
167 | height: units.gu(14) |
168 | } |
169 | |
170 | === modified file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml' |
171 | --- examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2013-06-19 10:17:28 +0000 |
172 | +++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2013-07-08 02:02:26 +0000 |
173 | @@ -76,7 +76,7 @@ |
174 | flickable: widgetList |
175 | |
176 | Rectangle { |
177 | - color: "#e0e0e0" |
178 | + color: Qt.rgba(0.0, 0.0, 0.0, 0.01) |
179 | anchors.fill: parent |
180 | |
181 | ListView { |
182 | |
183 | === modified file 'modules/Ubuntu/Components/Label.qml' |
184 | --- modules/Ubuntu/Components/Label.qml 2013-07-01 05:54:33 +0000 |
185 | +++ modules/Ubuntu/Components/Label.qml 2013-07-08 02:02:26 +0000 |
186 | @@ -56,5 +56,5 @@ |
187 | |
188 | font.pixelSize: FontUtils.sizeToPixels(fontSize) |
189 | font.family: "Ubuntu" |
190 | - color: UbuntuColors.coolGrey |
191 | + color: Theme.palette.selected.backgroundText |
192 | } |
193 | |
194 | === modified file 'modules/Ubuntu/Components/ListItems/Caption.qml' |
195 | --- modules/Ubuntu/Components/ListItems/Caption.qml 2012-11-29 18:13:17 +0000 |
196 | +++ modules/Ubuntu/Components/ListItems/Caption.qml 2013-07-08 02:02:26 +0000 |
197 | @@ -38,7 +38,7 @@ |
198 | \b{This component is under heavy development.} |
199 | */ |
200 | Item { |
201 | - height: framing.height |
202 | + height: captionText.height + units.gu(1) |
203 | width: parent ? parent.width : units.gu(31) |
204 | |
205 | /*! |
206 | @@ -48,23 +48,13 @@ |
207 | */ |
208 | property alias text: captionText.text |
209 | |
210 | - Rectangle { |
211 | - id: framing |
212 | - color: "#e0e0e0" |
213 | - anchors { |
214 | - left: parent.left |
215 | - right: parent.right |
216 | - } |
217 | - height: captionText.height + units.gu(1) |
218 | - |
219 | - Label { |
220 | - id: captionText |
221 | - anchors.centerIn: parent |
222 | - width: parent.width - units.gu(1) |
223 | - wrapMode: Text.Wrap |
224 | - color: Qt.rgba(0.4, 0.4, 0.4, 1.0) |
225 | - horizontalAlignment: Text.AlignLeft |
226 | - fontSize: "small" |
227 | - } |
228 | + Label { |
229 | + id: captionText |
230 | + anchors.centerIn: parent |
231 | + width: parent.width - units.gu(1) |
232 | + wrapMode: Text.Wrap |
233 | + color: Theme.palette.normal.backgroundText |
234 | + horizontalAlignment: Text.AlignLeft |
235 | + fontSize: "small" |
236 | } |
237 | } |
238 | |
239 | === modified file 'modules/Ubuntu/Components/ListItems/Empty.qml' |
240 | --- modules/Ubuntu/Components/ListItems/Empty.qml 2013-06-12 18:22:07 +0000 |
241 | +++ modules/Ubuntu/Components/ListItems/Empty.qml 2013-07-08 02:02:26 +0000 |
242 | @@ -283,8 +283,7 @@ |
243 | top: parent.top |
244 | } |
245 | height: emptyListItem.height - bottomDividerLine.height |
246 | - color: "#E6E6E6" |
247 | - opacity: 0.7 |
248 | + color: Theme.palette.selected.background |
249 | } |
250 | |
251 | |
252 | |
253 | === modified file 'modules/Ubuntu/Components/ListItems/LabelVisual.qml' |
254 | --- modules/Ubuntu/Components/ListItems/LabelVisual.qml 2013-07-01 05:54:33 +0000 |
255 | +++ modules/Ubuntu/Components/ListItems/LabelVisual.qml 2013-07-08 02:02:26 +0000 |
256 | @@ -21,9 +21,10 @@ |
257 | Label { |
258 | id: label |
259 | property bool selected: false |
260 | + property bool secondary: false |
261 | |
262 | fontSize: "medium" |
263 | elide: Text.ElideRight |
264 | - color: selected ? UbuntuColors.orange : Qt.rgba(0.4, 0.4, 0.4, 1.0) |
265 | + color: selected ? UbuntuColors.orange : secondary ? Theme.palette.normal.backgroundText : Theme.palette.selected.backgroundText |
266 | opacity: label.enabled ? 1.0 : 0.5 |
267 | } |
268 | |
269 | === modified file 'modules/Ubuntu/Components/ListItems/MultiValue.qml' |
270 | --- modules/Ubuntu/Components/ListItems/MultiValue.qml 2013-06-12 18:25:32 +0000 |
271 | +++ modules/Ubuntu/Components/ListItems/MultiValue.qml 2013-07-08 02:02:26 +0000 |
272 | @@ -77,6 +77,7 @@ |
273 | LabelVisual { |
274 | id: valueLabel |
275 | selected: multiValueListItem.selected |
276 | + secondary: true |
277 | anchors { |
278 | top: label.bottom |
279 | left: parent.left |
280 | |
281 | === modified file 'modules/Ubuntu/Components/ListItems/Standard.qml' |
282 | --- modules/Ubuntu/Components/ListItems/Standard.qml 2013-06-25 16:46:30 +0000 |
283 | +++ modules/Ubuntu/Components/ListItems/Standard.qml 2013-07-08 02:02:26 +0000 |
284 | @@ -160,8 +160,7 @@ |
285 | bottom: parent.bottom |
286 | left: parent.left |
287 | } |
288 | - color: "#E6E6E6" |
289 | - opacity: 0.7 |
290 | + color: Theme.palette.selected.background |
291 | } |
292 | |
293 | Rectangle { |
294 | @@ -174,8 +173,7 @@ |
295 | bottom: parent.bottom |
296 | right: parent.right |
297 | } |
298 | - color: "#E6E6E6" |
299 | - opacity: 0.7 |
300 | + color: Theme.palette.selected.background |
301 | } |
302 | |
303 | IconVisual { |
304 | |
305 | === modified file 'modules/Ubuntu/Components/ListItems/Subtitled.qml' |
306 | --- modules/Ubuntu/Components/ListItems/Subtitled.qml 2013-02-05 16:10:59 +0000 |
307 | +++ modules/Ubuntu/Components/ListItems/Subtitled.qml 2013-07-08 02:02:26 +0000 |
308 | @@ -104,6 +104,7 @@ |
309 | LabelVisual { |
310 | id: subLabel |
311 | selected: subtitledListItem.selected |
312 | + secondary: true |
313 | anchors { |
314 | |
315 | left: parent.left |
316 | |
317 | === modified file 'modules/Ubuntu/Components/ListItems/ValueSelector.qml' |
318 | --- modules/Ubuntu/Components/ListItems/ValueSelector.qml 2013-06-12 18:25:32 +0000 |
319 | +++ modules/Ubuntu/Components/ListItems/ValueSelector.qml 2013-07-08 02:02:26 +0000 |
320 | @@ -248,7 +248,7 @@ |
321 | |
322 | model: selector.values |
323 | Rectangle { |
324 | - color: "#e0e0e0" |
325 | + color: Qt.lighter(Theme.palette.normal.base) |
326 | height: valueRepeater.valueHeight |
327 | width: parent.width |
328 | |
329 | |
330 | === modified file 'modules/Ubuntu/Components/Panel.qml' |
331 | --- modules/Ubuntu/Components/Panel.qml 2013-06-26 19:25:09 +0000 |
332 | +++ modules/Ubuntu/Components/Panel.qml 2013-07-08 02:02:26 +0000 |
333 | @@ -55,7 +55,7 @@ |
334 | |
335 | Rectangle { |
336 | anchors.fill: parent |
337 | - color: "black" |
338 | + color: Theme.palette.normal.overlay |
339 | |
340 | Button { |
341 | anchors.centerIn: parent |
342 | @@ -110,7 +110,7 @@ |
343 | import Ubuntu.Components 0.1 |
344 | |
345 | Rectangle { |
346 | - color: "grey" |
347 | + color: Theme.palette.normal.background |
348 | width: units.gu(40) |
349 | height: units.gu(40) |
350 | |
351 | @@ -124,13 +124,13 @@ |
352 | height: units.gu(8) |
353 | |
354 | Rectangle { |
355 | - color: "white" |
356 | + color: Theme.palette.normal.overlay |
357 | anchors.fill: parent |
358 | Rectangle { |
359 | width: units.gu(8) |
360 | height: units.gu(4) |
361 | anchors.centerIn: parent |
362 | - color: "red" |
363 | + color: Theme.palette.normal.foreground |
364 | signal clicked() |
365 | onClicked: print("The red rectangle was clicked"); |
366 | } |
367 | |
368 | === modified file 'modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml' |
369 | --- modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml 2013-06-26 19:25:09 +0000 |
370 | +++ modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml 2013-07-08 02:02:26 +0000 |
371 | @@ -116,6 +116,7 @@ |
372 | horizontalCenter: parent.horizontalCenter |
373 | } |
374 | wrapMode: Text.Wrap |
375 | + color: Theme.palette.normal.overlayText |
376 | } |
377 | /*! \internal */ |
378 | onTriggered: popover.hide() |
379 | |
380 | === modified file 'modules/Ubuntu/Components/Popups/Popover.qml' |
381 | --- modules/Ubuntu/Components/Popups/Popover.qml 2013-06-27 15:20:12 +0000 |
382 | +++ modules/Ubuntu/Components/Popups/Popover.qml 2013-07-08 02:02:26 +0000 |
383 | @@ -37,7 +37,7 @@ |
384 | import Ubuntu.Components.Popups 0.1 |
385 | |
386 | Rectangle { |
387 | - color: "grey" |
388 | + color: Theme.palette.normal.background |
389 | width: units.gu(80) |
390 | height: units.gu(80) |
391 | Component { |
392 | |
393 | === modified file 'modules/Ubuntu/Components/TextArea.qml' |
394 | --- modules/Ubuntu/Components/TextArea.qml 2013-06-30 20:54:11 +0000 |
395 | +++ modules/Ubuntu/Components/TextArea.qml 2013-07-08 02:02:26 +0000 |
396 | @@ -723,6 +723,8 @@ |
397 | |
398 | //internals |
399 | |
400 | + opacity: enabled ? 1.0 : 0.3 |
401 | + |
402 | /*!\internal */ |
403 | onVisibleChanged: { |
404 | if (!visible) |
405 | @@ -888,7 +890,6 @@ |
406 | |
407 | // holding default values |
408 | Label { id: fontHolder } |
409 | - SystemPalette { id: systemColors } |
410 | |
411 | //hint |
412 | Label { |
413 | @@ -899,7 +900,7 @@ |
414 | } |
415 | // hint is shown till user types something in the field |
416 | visible: (editor.getText(0, editor.length) == "") && !editor.inputMethodComposing |
417 | - color: Qt.rgba(0.5, 0.5, 0.5, 0.5) |
418 | + color: Theme.palette.normal.backgroundText |
419 | fontSize: "medium" |
420 | elide: Text.ElideRight |
421 | wrapMode: Text.WordWrap |
422 | @@ -958,8 +959,8 @@ |
423 | selectByMouse: false |
424 | cursorDelegate: cursor |
425 | color: control.__styleInstance.color |
426 | - selectedTextColor: "#F3F3E7" |
427 | - selectionColor: "#19B6EE" |
428 | + selectedTextColor: Theme.palette.selected.foregroundText |
429 | + selectionColor: Theme.palette.selected.foreground |
430 | font.pixelSize: FontUtils.sizeToPixels("medium") |
431 | // forward keys to the root element so it can be captured outside of it |
432 | Keys.forwardTo: [control] |
433 | |
434 | === modified file 'modules/Ubuntu/Components/TextField.qml' |
435 | --- modules/Ubuntu/Components/TextField.qml 2013-07-03 10:30:54 +0000 |
436 | +++ modules/Ubuntu/Components/TextField.qml 2013-07-08 02:02:26 +0000 |
437 | @@ -786,6 +786,8 @@ |
438 | |
439 | // internals |
440 | |
441 | + opacity: enabled ? 1.0 : 0.3 |
442 | + |
443 | /*! \internal */ |
444 | onVisibleChanged: { |
445 | if (!visible) |
446 | @@ -801,7 +803,6 @@ |
447 | } |
448 | |
449 | Text { id: fontHolder } |
450 | - SystemPalette { id: systemColors } |
451 | |
452 | //internals |
453 | /*! \internal */ |
454 | @@ -959,7 +960,7 @@ |
455 | } |
456 | // hint is shown till user types something in the field |
457 | visible: (editor.text == "") && !editor.inputMethodComposing |
458 | - color: Qt.rgba(0.5, 0.5, 0.5, 0.5) |
459 | + color: Theme.palette.normal.backgroundText |
460 | fontSize: "medium" |
461 | elide: Text.ElideRight |
462 | } |
463 | @@ -981,8 +982,8 @@ |
464 | onTextChanged: internal.textChanged = true |
465 | cursorDelegate: cursor |
466 | color: control.__styleInstance.color |
467 | - selectedTextColor: "#F3F3E7" |
468 | - selectionColor: "#19B6EE" |
469 | + selectedTextColor: Theme.palette.selected.foregroundText |
470 | + selectionColor: Theme.palette.selected.foreground |
471 | font.pixelSize: FontUtils.sizeToPixels("medium") |
472 | passwordCharacter: "\u2022" |
473 | // forward keys to the root element so it can be captured outside of it |
474 | |
475 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml' |
476 | --- modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml 2013-07-01 22:26:49 +0000 |
477 | +++ modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml 2013-07-08 02:02:26 +0000 |
478 | @@ -20,8 +20,8 @@ |
479 | Item { |
480 | id: visuals |
481 | // styling properties |
482 | - property color checkedColor: "#DD4814" |
483 | - property color uncheckedColor: Qt.rgba(0.0, 0.0, 0.0, 0.1) |
484 | + property color checkedColor: Theme.palette.selected.foreground |
485 | + property color uncheckedColor: Theme.palette.normal.foreground |
486 | |
487 | /*! |
488 | The image to show inside the checkbox when it is checked. |
489 | |
490 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml' |
491 | --- modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml 2013-06-27 15:20:12 +0000 |
492 | +++ modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml 2013-07-08 02:02:26 +0000 |
493 | @@ -27,7 +27,7 @@ |
494 | /*! |
495 | The background color of the header. |
496 | */ |
497 | - property color backgroundColor: "#ededf0" |
498 | + property color backgroundColor: Theme.palette.normal.background |
499 | |
500 | /*! |
501 | The source of the background image of the header. If the image is has (semi-)transparent |
502 | @@ -50,7 +50,7 @@ |
503 | |
504 | property int fontWeight: Font.Light |
505 | property string fontSize: "x-large" |
506 | - property color textColor: Qt.rgba(0.51, 0.51, 0.51, 0.9) |
507 | + property color textColor: Theme.palette.selected.backgroundText |
508 | property real textLeftMargin: units.gu(2) |
509 | |
510 | implicitHeight: headerStyle.contentHeight + separator.height + separatorBottom.height |
511 | |
512 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml' |
513 | --- modules/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml 2013-06-27 15:20:12 +0000 |
514 | +++ modules/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml 2013-07-08 02:02:26 +0000 |
515 | @@ -25,7 +25,7 @@ |
516 | /*! |
517 | The background color of the main view. |
518 | */ |
519 | - property color backgroundColor: "#ededf0" |
520 | + property color backgroundColor: Theme.palette.normal.background |
521 | |
522 | /*! |
523 | The background texture of the main view. The image will be drawn over the background color, |
524 | |
525 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/NewTabBar.qml' |
526 | --- modules/Ubuntu/Components/Themes/Ambiance/NewTabBar.qml 2013-06-26 22:44:07 +0000 |
527 | +++ modules/Ubuntu/Components/Themes/Ambiance/NewTabBar.qml 2013-07-08 02:02:26 +0000 |
528 | @@ -22,8 +22,6 @@ |
529 | // styling properties |
530 | property color headerTextColor |
531 | property color headerTextSelectedColor |
532 | - property real headerTextOpacity |
533 | - property real headerTextSelectedOpacity |
534 | property int headerTextFadeDuration |
535 | property url indicatorImageSource |
536 | |
537 | @@ -109,7 +107,7 @@ |
538 | |
539 | // Use opacity 0 to hide instead of setting visibility to false in order to |
540 | // make fading work well, and not to mess up width/offset computations |
541 | - opacity: isVisible() ? (selected ? headerTextSelectedOpacity : headerTextOpacity) : 0 |
542 | + opacity: isVisible() ? 1.0 : 0.0 |
543 | function isVisible() { |
544 | if (selected) return true; |
545 | if (!tabBar.active) return false; |
546 | @@ -159,6 +157,13 @@ |
547 | id: text |
548 | color: selected ? headerTextSelectedColor : headerTextColor |
549 | |
550 | + Behavior on color { |
551 | + ColorAnimation { |
552 | + duration: headerTextFadeDuration |
553 | + easing.type: Easing.InOutQuad |
554 | + } |
555 | + } |
556 | + |
557 | anchors { |
558 | left: parent.left |
559 | leftMargin: headerTextLeftMargin |
560 | |
561 | === added file 'modules/Ubuntu/Components/Themes/Ambiance/Palette.qml' |
562 | --- modules/Ubuntu/Components/Themes/Ambiance/Palette.qml 1970-01-01 00:00:00 +0000 |
563 | +++ modules/Ubuntu/Components/Themes/Ambiance/Palette.qml 2013-07-08 02:02:26 +0000 |
564 | @@ -0,0 +1,45 @@ |
565 | +/* |
566 | + * Copyright 2013 Canonical Ltd. |
567 | + * |
568 | + * This program is free software; you can redistribute it and/or modify |
569 | + * it under the terms of the GNU Lesser General Public License as published by |
570 | + * the Free Software Foundation; version 3. |
571 | + * |
572 | + * This program is distributed in the hope that it will be useful, |
573 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
574 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
575 | + * GNU Lesser General Public License for more details. |
576 | + * |
577 | + * You should have received a copy of the GNU Lesser General Public License |
578 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
579 | + */ |
580 | + |
581 | +import QtQuick 2.0 |
582 | +import Ubuntu.Components.Themes 0.1 |
583 | + |
584 | +Palette { |
585 | + normal: PaletteValues { |
586 | + background: "#EDEDED" |
587 | + backgroundText: "#81888888" |
588 | + base: "#1A000000" |
589 | + baseText: "#888888" |
590 | + foreground: "#888888" |
591 | + foregroundText: "#F3F3E7" |
592 | + overlay: "#FDFDFD" |
593 | + overlayText: "#888888" |
594 | + field: "#1A000000" |
595 | + fieldText: "#888888" |
596 | + } |
597 | + selected: PaletteValues { |
598 | + /* FIXME: 'background' does not come from design |
599 | + it is used solely in the list items for the selection highlight |
600 | + that will go away with the new design. |
601 | + */ |
602 | + background: "#B2E6E6E6" |
603 | + backgroundText: "#888888" |
604 | + foreground: "#DD4814" |
605 | + foregroundText: "#F3F3E7" |
606 | + field: "#FFFFFF" |
607 | + fieldText: "#888888" |
608 | + } |
609 | +} |
610 | |
611 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/PointerStyleShader.qml' |
612 | --- modules/Ubuntu/Components/Themes/Ambiance/PointerStyleShader.qml 2013-06-27 15:20:12 +0000 |
613 | +++ modules/Ubuntu/Components/Themes/Ambiance/PointerStyleShader.qml 2013-07-08 02:02:26 +0000 |
614 | @@ -23,7 +23,7 @@ |
615 | id: effect |
616 | anchors.fill: parent |
617 | |
618 | - property color color: "white" |
619 | + property color color: Theme.palette.normal.overlay |
620 | |
621 | // FIXME: It would be nicer to have a single transformation matrix that flips and rotates, |
622 | // but I did not manage to get a 3x3 matrix from QML into the shader. |
623 | |
624 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/PopoverForegroundStyle.qml' |
625 | --- modules/Ubuntu/Components/Themes/Ambiance/PopoverForegroundStyle.qml 2013-07-01 22:13:31 +0000 |
626 | +++ modules/Ubuntu/Components/Themes/Ambiance/PopoverForegroundStyle.qml 2013-07-08 02:02:26 +0000 |
627 | @@ -22,7 +22,7 @@ |
628 | id: frame |
629 | // styling properties |
630 | property string radius: "medium" |
631 | - property color color: "white" |
632 | + property color color: Theme.palette.normal.overlay |
633 | |
634 | property alias contentItem: body |
635 | |
636 | |
637 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/ScrollbarStyle.qml' |
638 | --- modules/Ubuntu/Components/Themes/Ambiance/ScrollbarStyle.qml 2013-06-27 15:20:12 +0000 |
639 | +++ modules/Ubuntu/Components/Themes/Ambiance/ScrollbarStyle.qml 2013-07-08 02:02:26 +0000 |
640 | @@ -70,7 +70,7 @@ |
641 | property PropertyAnimation thumbConnectorFading: UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } |
642 | property PropertyAnimation thumbFading: UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } |
643 | |
644 | - property color sliderColor: Qt.rgba(0.5, 0.5, 0.5, 0.7) |
645 | + property color sliderColor: Theme.palette.normal.base |
646 | property real sliderRadius: units.gu(0.5) |
647 | property color thumbConnectorColor: "white" |
648 | property url forwardThumbReleased: (styledItem.align === Qt.AlignLeading || styledItem.align === Qt.AlignTrailing) ? "artwork/ScrollbarBottomIdle.png" : "artwork/ScrollbarRightIdle.png" |
649 | @@ -177,8 +177,6 @@ |
650 | return Qt.point(map.x, map.y) |
651 | } |
652 | |
653 | - SystemPalette { id: systemColors } |
654 | - |
655 | SmoothedAnimation { |
656 | id: scrollAnimation |
657 | |
658 | |
659 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/SliderStyle.qml' |
660 | --- modules/Ubuntu/Components/Themes/Ambiance/SliderStyle.qml 2013-06-30 20:54:11 +0000 |
661 | +++ modules/Ubuntu/Components/Themes/Ambiance/SliderStyle.qml 2013-07-08 02:02:26 +0000 |
662 | @@ -25,19 +25,15 @@ |
663 | - backgroundColor: color for the slider bar |
664 | - thumbColor: color for the thumb |
665 | - thumbSpacing: spacing between the thumb and the bar |
666 | - - backgroundOpacity: transparency for the background |
667 | - - thumbOpacity: transparency for the thumb |
668 | */ |
669 | |
670 | Item { |
671 | id: main |
672 | // styling properties |
673 | |
674 | - property color backgroundColor: "#c0c0c0" |
675 | - property color thumbColor: "#bbbbbb" |
676 | + property color backgroundColor: Theme.palette.normal.base |
677 | + property color thumbColor: Theme.palette.selected.foreground |
678 | property real thumbSpacing: units.dp(2) |
679 | - property real backgroundOpacity: 0.1 |
680 | - property real thumbOpacity: 1.0 |
681 | |
682 | // visuals |
683 | anchors.fill: parent |
684 | @@ -58,7 +54,6 @@ |
685 | |
686 | anchors.fill: parent |
687 | color: main.backgroundColor |
688 | - opacity: main.backgroundOpacity |
689 | } |
690 | |
691 | UbuntuShape { |
692 | @@ -69,7 +64,6 @@ |
693 | width: thumbWidth |
694 | height: backgroundShape.height - (2.0 * thumbSpacing) |
695 | color: main.thumbColor |
696 | - opacity: main.thumbOpacity |
697 | } |
698 | |
699 | Label { |
700 | @@ -82,7 +76,7 @@ |
701 | horizontalAlignment: Text.AlignHCenter |
702 | text: styledItem.formatValue(MathUtils.clamp(liveValue, styledItem.minimumValue, styledItem.maximumValue)) |
703 | fontSize: "medium" |
704 | - color: "white" |
705 | + color: Theme.palette.selected.foregroundText |
706 | font.weight: Font.Bold |
707 | } |
708 | } |
709 | |
710 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml' |
711 | --- modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml 2013-07-01 22:26:49 +0000 |
712 | +++ modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml 2013-07-08 02:02:26 +0000 |
713 | @@ -38,11 +38,11 @@ |
714 | /*! |
715 | Color of the thumb when the switch is checked. |
716 | */ |
717 | - property color checkedThumbColor: "#DD4814" |
718 | + property color checkedThumbColor: Theme.palette.selected.foreground |
719 | /*! |
720 | Color of the thumb when the switch is not checked. |
721 | */ |
722 | - property color uncheckedThumbColor: "#bbbbbb" |
723 | + property color uncheckedThumbColor: Theme.palette.normal.foreground |
724 | /*! |
725 | The animation to fade the color from checkedColor to uncheckedColor and vice versa. |
726 | */ |
727 | @@ -52,7 +52,7 @@ |
728 | */ |
729 | property NumberAnimation moveThumbAnimation: UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } |
730 | |
731 | - property color backgroundColor: Qt.rgba(0.78, 0.78, 0.78, 0.1) |
732 | + property color backgroundColor: Theme.palette.normal.base |
733 | property real thumbWidth: units.gu(4) |
734 | property real thumbHeight: units.gu(4) |
735 | |
736 | |
737 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/TabsStyle.qml' |
738 | --- modules/Ubuntu/Components/Themes/Ambiance/TabsStyle.qml 2013-06-27 15:20:12 +0000 |
739 | +++ modules/Ubuntu/Components/Themes/Ambiance/TabsStyle.qml 2013-07-08 02:02:26 +0000 |
740 | @@ -38,10 +38,8 @@ |
741 | */ |
742 | onSwipeToSwitchTabsChanged: print("swipeToSwitchTabs property is DEPRECATED.") |
743 | |
744 | - property color headerTextColor: "#333333" |
745 | - property color headerTextSelectedColor: "#333333" |
746 | - property real headerTextOpacity: 0.4 |
747 | - property real headerTextSelectedOpacity: 0.9 |
748 | + property color headerTextColor: Theme.palette.normal.backgroundText |
749 | + property color headerTextSelectedColor: Theme.palette.selected.backgroundText |
750 | property int headerTextFadeDuration: 350 |
751 | property string headerFontSize: "x-large" |
752 | property int headerFontWeight: Font.Light |
753 | @@ -78,8 +76,6 @@ |
754 | //height: tabBarHeight |
755 | headerTextColor: tabsStyle.headerTextColor |
756 | headerTextSelectedColor: tabsStyle.headerTextSelectedColor |
757 | - headerTextOpacity: tabsStyle.headerTextOpacity |
758 | - headerTextSelectedOpacity: tabsStyle.headerTextSelectedOpacity |
759 | headerTextFadeDuration: tabsStyle.headerTextFadeDuration |
760 | indicatorImageSource: tabsStyle.indicatorImageSource |
761 | headerFontSize: tabsStyle.headerFontSize |
762 | |
763 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml' |
764 | --- modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml 2013-07-01 05:54:33 +0000 |
765 | +++ modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml 2013-07-08 02:02:26 +0000 |
766 | @@ -25,13 +25,12 @@ |
767 | // FIXME: needs type checking in themes to define the proper type to be used |
768 | // if color type is used, alpha value gets lost |
769 | |
770 | - property color color: (styledItem.enabled) ? "#757373" : "darkgray" |
771 | + property color color: (styledItem.focus || styledItem.highlighted) ? Theme.palette.selected.fieldText : Theme.palette.normal.fieldText |
772 | /*! |
773 | Background fill color |
774 | */ |
775 | - property color backgroundColor: (styledItem.focus || styledItem.highlighted) ? "white" : Qt.rgba(0, 0, 0, 0.1) |
776 | + property color backgroundColor: (styledItem.focus || styledItem.highlighted) ? Theme.palette.selected.field : Theme.palette.normal.field |
777 | property color errorColor: UbuntuColors.orange |
778 | - property real backgroundOpacity: styledItem.enabled ? 1.0 : 0.1 |
779 | |
780 | /*! |
781 | Spacing between the frame and the text editor area |
782 | @@ -48,7 +47,6 @@ |
783 | onErrorChanged: (error) ? visuals.errorColor : visuals.backgroundColor; |
784 | color: visuals.backgroundColor; |
785 | anchors.fill: parent |
786 | - opacity: visuals.backgroundOpacity |
787 | |
788 | MouseArea { |
789 | anchors.fill: parent |
790 | |
791 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml' |
792 | --- modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml 2013-06-27 15:20:12 +0000 |
793 | +++ modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml 2013-07-08 02:02:26 +0000 |
794 | @@ -21,7 +21,7 @@ |
795 | /*! |
796 | Cursor color |
797 | */ |
798 | - property color color: Qt.rgba(0.4, 0.4, 0.4, 1.0) |
799 | + property color color: Theme.palette.selected.foreground |
800 | |
801 | /*! |
802 | Properties driving cursor blinking. If either of these values are 0, no |
803 | @@ -36,7 +36,7 @@ |
804 | */ |
805 | property var pinSize: units.gu(1.2) |
806 | property var pinSensingOffset: units.dp(4) |
807 | - property color pinColor: "blue" |
808 | + property color pinColor: Theme.palette.selected.foreground |
809 | |
810 | anchors.fill: parent |
811 | Rectangle { |
812 | |
813 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/ToolbarButtonStyle.qml' |
814 | --- modules/Ubuntu/Components/Themes/Ambiance/ToolbarButtonStyle.qml 2013-06-27 15:20:12 +0000 |
815 | +++ modules/Ubuntu/Components/Themes/Ambiance/ToolbarButtonStyle.qml 2013-07-08 02:02:26 +0000 |
816 | @@ -51,7 +51,7 @@ |
817 | width: paintedWidth |
818 | text: styledItem.text |
819 | fontSize: "x-small" |
820 | - color: "#888888" |
821 | + color: Theme.palette.normal.overlayText |
822 | } |
823 | } |
824 | |
825 | |
826 | === modified file 'modules/Ubuntu/Components/Themes/Ambiance/ToolbarStyle.qml' |
827 | --- modules/Ubuntu/Components/Themes/Ambiance/ToolbarStyle.qml 2013-06-27 15:20:12 +0000 |
828 | +++ modules/Ubuntu/Components/Themes/Ambiance/ToolbarStyle.qml 2013-07-08 02:02:26 +0000 |
829 | @@ -19,8 +19,7 @@ |
830 | Item { |
831 | id: visuals |
832 | // styling properties |
833 | - property color color: "white" |
834 | - property real barOpacity: 0.9 |
835 | + property color color: Theme.palette.normal.overlay |
836 | |
837 | anchors.fill: parent |
838 | |
839 | @@ -28,7 +27,6 @@ |
840 | id: background |
841 | anchors.fill: parent |
842 | color: visuals.color |
843 | - opacity: visuals.barOpacity |
844 | } |
845 | |
846 | Image { |
847 | |
848 | === added file 'modules/Ubuntu/Components/Themes/Ambiance/artwork/background_paper@27.png' |
849 | Binary files modules/Ubuntu/Components/Themes/Ambiance/artwork/background_paper@27.png 1970-01-01 00:00:00 +0000 and modules/Ubuntu/Components/Themes/Ambiance/artwork/background_paper@27.png 2013-07-08 02:02:26 +0000 differ |
850 | === removed file 'modules/Ubuntu/Components/Themes/Ambiance/artwork/background_paper@30.png' |
851 | Binary files modules/Ubuntu/Components/Themes/Ambiance/artwork/background_paper@30.png 2013-02-26 16:58:55 +0000 and modules/Ubuntu/Components/Themes/Ambiance/artwork/background_paper@30.png 1970-01-01 00:00:00 +0000 differ |
852 | === added file 'modules/Ubuntu/Components/Themes/Palette.qml' |
853 | --- modules/Ubuntu/Components/Themes/Palette.qml 1970-01-01 00:00:00 +0000 |
854 | +++ modules/Ubuntu/Components/Themes/Palette.qml 2013-07-08 02:02:26 +0000 |
855 | @@ -0,0 +1,59 @@ |
856 | +/* |
857 | + * Copyright 2013 Canonical Ltd. |
858 | + * |
859 | + * This program is free software; you can redistribute it and/or modify |
860 | + * it under the terms of the GNU Lesser General Public License as published by |
861 | + * the Free Software Foundation; version 3. |
862 | + * |
863 | + * This program is distributed in the hope that it will be useful, |
864 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
865 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
866 | + * GNU Lesser General Public License for more details. |
867 | + * |
868 | + * You should have received a copy of the GNU Lesser General Public License |
869 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
870 | + */ |
871 | + |
872 | +import QtQuick 2.0 |
873 | + |
874 | +/*! |
875 | + \qmltype Palette |
876 | + \inqmlmodule Ubuntu.Components.Themes 0.1 |
877 | + \ingroup theming |
878 | + \brief Palette of colors from the theme that widgets use to draw themselves. |
879 | + |
880 | + Palette provides access to colors defined by the current theme. The actual |
881 | + color palette to use depends on the state of the widget being drawn. |
882 | + |
883 | + A color palette (\l PaletteValues) has various roles to choose from depending |
884 | + on what part of the widget is being drawn (the base of the widget, the |
885 | + foreground, etc.). |
886 | + |
887 | + For each color there is a corresponding 'text' color that is guaranteed to |
888 | + provide good legibility for text or icons placed on top of a background |
889 | + of the corresponding color. |
890 | + |
891 | + Example of a Text on top of a background Rectangle: |
892 | + \qml |
893 | + Item { |
894 | + Rectangle { |
895 | + color: Theme.palette.normal.base |
896 | + } |
897 | + |
898 | + Text { |
899 | + color: Theme.palette.normal.baseText |
900 | + } |
901 | + } |
902 | + \endqml |
903 | +*/ |
904 | +QtObject { |
905 | + /*! |
906 | + Color palette to use when the widget is not in any particular state. |
907 | + */ |
908 | + property PaletteValues normal |
909 | + /*! |
910 | + Color palette to use when the widget is selected, for example when |
911 | + a tab is the current one. |
912 | + */ |
913 | + property PaletteValues selected |
914 | +} |
915 | |
916 | === added file 'modules/Ubuntu/Components/Themes/PaletteValues.qml' |
917 | --- modules/Ubuntu/Components/Themes/PaletteValues.qml 1970-01-01 00:00:00 +0000 |
918 | +++ modules/Ubuntu/Components/Themes/PaletteValues.qml 2013-07-08 02:02:26 +0000 |
919 | @@ -0,0 +1,72 @@ |
920 | +/* |
921 | + * Copyright 2013 Canonical Ltd. |
922 | + * |
923 | + * This program is free software; you can redistribute it and/or modify |
924 | + * it under the terms of the GNU Lesser General Public License as published by |
925 | + * the Free Software Foundation; version 3. |
926 | + * |
927 | + * This program is distributed in the hope that it will be useful, |
928 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
929 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
930 | + * GNU Lesser General Public License for more details. |
931 | + * |
932 | + * You should have received a copy of the GNU Lesser General Public License |
933 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
934 | + */ |
935 | + |
936 | +import QtQuick 2.0 |
937 | + |
938 | +/*! |
939 | + \qmltype PaletteValues |
940 | + \inqmlmodule Ubuntu.Components.Themes 0.1 |
941 | + \ingroup theming |
942 | + \brief Color values used for a given widget state. |
943 | +*/ |
944 | +QtObject { |
945 | + /*! |
946 | + Color applied to the background of the application. |
947 | + */ |
948 | + property color background |
949 | + /*! |
950 | + Color applied to elements placed on top of the \l background color. |
951 | + Typically used for labels and images. |
952 | + */ |
953 | + property color backgroundText |
954 | + /*! |
955 | + Color applied to the background of widgets. |
956 | + */ |
957 | + property color base |
958 | + /*! |
959 | + Color applied to elements placed on top of the \l base color. |
960 | + Typically used for labels and images. |
961 | + */ |
962 | + property color baseText |
963 | + /*! |
964 | + Color applied to widgets on top of the base colour. |
965 | + */ |
966 | + property color foreground |
967 | + /*! |
968 | + Color applied to elements placed on top of the \l foreground color. |
969 | + Typically used for labels and images. |
970 | + */ |
971 | + property color foregroundText |
972 | + /*! |
973 | + Color applied to the background of widgets floating over other widgets. |
974 | + For example: popovers, Toolbar. |
975 | + */ |
976 | + property color overlay |
977 | + /*! |
978 | + Color applied to elements placed on top of the \l overlay color. |
979 | + Typically used for labels and images. |
980 | + */ |
981 | + property color overlayText |
982 | + /*! |
983 | + Colour applied to the backgrouhnd of text input fields. |
984 | + */ |
985 | + property color field |
986 | + /*! |
987 | + Color applied to elements placed on top of the \l field color. |
988 | + Typically used for labels and images. |
989 | + */ |
990 | + property color fieldText |
991 | +} |
992 | |
993 | === modified file 'modules/Ubuntu/Components/Themes/Themes.pro' |
994 | --- modules/Ubuntu/Components/Themes/Themes.pro 2013-06-30 13:04:37 +0000 |
995 | +++ modules/Ubuntu/Components/Themes/Themes.pro 2013-07-08 02:02:26 +0000 |
996 | @@ -1,2 +1,13 @@ |
997 | TEMPLATE = subdirs |
998 | SUBDIRS += Ambiance |
999 | + |
1000 | +uri = Ubuntu.Components.Themes |
1001 | +installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) |
1002 | + |
1003 | +qmldir_file.path = $$installPath |
1004 | +qmldir_file.files = qmldir |
1005 | + |
1006 | +qml_files.path = $$installPath |
1007 | +qml_files.files = *.qml |
1008 | + |
1009 | +INSTALLS += qmldir_file qml_files |
1010 | |
1011 | === added file 'modules/Ubuntu/Components/Themes/qmldir' |
1012 | --- modules/Ubuntu/Components/Themes/qmldir 1970-01-01 00:00:00 +0000 |
1013 | +++ modules/Ubuntu/Components/Themes/qmldir 2013-07-08 02:02:26 +0000 |
1014 | @@ -0,0 +1,3 @@ |
1015 | +module Ubuntu.Components.Themes |
1016 | +Palette 0.1 Palette.qml |
1017 | +PaletteValues 0.1 PaletteValues.qml |
1018 | |
1019 | === modified file 'modules/Ubuntu/Components/plugin/uctheme.cpp' |
1020 | --- modules/Ubuntu/Components/plugin/uctheme.cpp 2013-07-01 16:03:38 +0000 |
1021 | +++ modules/Ubuntu/Components/plugin/uctheme.cpp 2013-07-08 02:02:26 +0000 |
1022 | @@ -19,6 +19,7 @@ |
1023 | |
1024 | #include "uctheme.h" |
1025 | #include "listener.h" |
1026 | +#include "quickutils.h" |
1027 | |
1028 | #include <QtQml/qqml.h> |
1029 | #include <QtQml/QQmlEngine> |
1030 | @@ -71,12 +72,17 @@ |
1031 | |
1032 | UCTheme::UCTheme(QObject *parent) : |
1033 | QObject(parent), |
1034 | - m_name("") |
1035 | + m_name(""), |
1036 | + m_palette(NULL) |
1037 | { |
1038 | m_name = m_themeSettings.themeName(); |
1039 | QObject::connect(&m_themeSettings, &UCThemeSettings::themeNameChanged, |
1040 | this, &UCTheme::onThemeNameChanged); |
1041 | updateThemePaths(); |
1042 | + |
1043 | + loadPalette(); |
1044 | + QObject::connect(this, &UCTheme::nameChanged, |
1045 | + this, &UCTheme::loadPalette, Qt::UniqueConnection); |
1046 | } |
1047 | |
1048 | void UCTheme::onThemeNameChanged() |
1049 | @@ -132,6 +138,16 @@ |
1050 | } |
1051 | } |
1052 | |
1053 | +/*! |
1054 | + \qmlproperty Palette Theme::palette |
1055 | + |
1056 | + The palette of the current theme. |
1057 | +*/ |
1058 | +QObject* UCTheme::palette() const |
1059 | +{ |
1060 | + return m_palette; |
1061 | +} |
1062 | + |
1063 | QUrl UCTheme::styleUrl(QString styleName) |
1064 | { |
1065 | QUrl styleUrl; |
1066 | @@ -191,3 +207,12 @@ |
1067 | QObject::connect(this, SIGNAL(nameChanged()), |
1068 | &themeChangeListener, SLOT(updateContextProperty())); |
1069 | } |
1070 | + |
1071 | +void UCTheme::loadPalette() |
1072 | +{ |
1073 | + if (m_palette != NULL) { |
1074 | + delete m_palette; |
1075 | + } |
1076 | + m_palette = QuickUtils::instance().createQmlObject((styleUrl("Palette.qml"))); |
1077 | + Q_EMIT paletteChanged(); |
1078 | +} |
1079 | |
1080 | === modified file 'modules/Ubuntu/Components/plugin/uctheme.h' |
1081 | --- modules/Ubuntu/Components/plugin/uctheme.h 2013-07-01 00:36:03 +0000 |
1082 | +++ modules/Ubuntu/Components/plugin/uctheme.h 2013-07-08 02:02:26 +0000 |
1083 | @@ -32,6 +32,7 @@ |
1084 | Q_OBJECT |
1085 | |
1086 | Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) |
1087 | + Q_PROPERTY(QObject* palette READ palette NOTIFY paletteChanged) |
1088 | public: |
1089 | static UCTheme& instance() { |
1090 | static UCTheme instance; |
1091 | @@ -43,12 +44,14 @@ |
1092 | // getter/setters |
1093 | QString name() const; |
1094 | void setName(QString name); |
1095 | + QObject* palette() const; |
1096 | |
1097 | Q_INVOKABLE QQmlComponent* createStyleComponent(QString styleName, QObject* parent); |
1098 | void registerToContext(QQmlContext* context); |
1099 | |
1100 | Q_SIGNALS: |
1101 | void nameChanged(); |
1102 | + void paletteChanged(); |
1103 | |
1104 | private Q_SLOTS: |
1105 | void onThemeNameChanged(); |
1106 | @@ -56,8 +59,11 @@ |
1107 | void updateThemePaths(); |
1108 | QUrl styleUrl(QString styleName); |
1109 | QString parentThemeName(QString themeName); |
1110 | + void loadPalette(); |
1111 | + |
1112 | private: |
1113 | QString m_name; |
1114 | + QObject* m_palette; |
1115 | QList<QUrl> m_themePaths; |
1116 | UCThemeSettings m_themeSettings; |
1117 | }; |
1118 | |
1119 | === modified file 'tests/unit_x11/tst_components/tst_textfield.qml' |
1120 | --- tests/unit_x11/tst_components/tst_textfield.qml 2013-07-03 10:20:24 +0000 |
1121 | +++ tests/unit_x11/tst_components/tst_textfield.qml 2013-07-08 02:02:26 +0000 |
1122 | @@ -205,14 +205,6 @@ |
1123 | compare(textField.selectByMouse, true, "selectByMouse default") |
1124 | } |
1125 | |
1126 | - function test_0_selectedTextColor() { |
1127 | - compare(textField.selectedTextColor, "#f3f3e7", "selectedTextColor default") |
1128 | - } |
1129 | - |
1130 | - function test_0_selectionColor() { |
1131 | - compare(textField.selectionColor, "#19b6ee", "selectionColor default") |
1132 | - } |
1133 | - |
1134 | function test_0_placeholderText() { |
1135 | compare(textField.placeholderText, "", "placeholderText is '' by default") |
1136 | } |
PASSED: Continuous integration, rev:611 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- ci/274/ jenkins. qa.ubuntu. com/job/ generic- mediumtests- saucy/735 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- saucy-amd64- ci/131 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- saucy-armhf- ci/131 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- saucy-armhf- ci/131/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy/737 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy/737/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- saucy/660
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ ubuntu- ui-toolkit- ci/274/ rebuild
http://