Merge lp:~gcollura/content-hub/fix-1384490 into lp:content-hub
| Status: | Needs review | ||||
|---|---|---|---|---|---|
| Proposed branch: | lp:~gcollura/content-hub/fix-1384490 | ||||
| Merge into: | lp:content-hub | ||||
| Diff against target: |
43 lines (+4/-4) 2 files modified
import/Ubuntu/Content/ContentPeerPicker10.qml (+2/-2) import/Ubuntu/Content/ContentPeerPicker11.qml (+2/-2) |
||||
| To merge this branch: | bzr merge lp:~gcollura/content-hub/fix-1384490 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Michael Sheldon (community) | 2014-10-30 | Needs Fixing on 2014-11-04 | |
|
Review via email:
|
|||
Commit Message
Fix bug #1384490 by setting a different background color for ContentPeerPicker.
Description of the Change
I changed the default background of the ContentPeerPicker to Theme.palette.
Let me know what you think about this idea.
Thanks in advance,
Giulio
| Giulio Collura (gcollura) wrote : | # |
Thanks for the review!
> I'll have a bit of look into this and get back to you on what I
> find.
Ok, thanks a lot :)
> Aside from that it looks like you've got a couple of typos for Qt.rgba listed
> as Qt.rbga (g and b switched around),
Ops, sorry for the typo. (fixed it)
> so dark layouts still get the white
> background.
The alpha layer is set to 0.1, so it's just a bit lighter, but still a dark grey (at least in my tests)
> However, with these corrected the apps box for light backgrounds
> becomes gray, so we might need to think about that a bit more.
I thought it would have been better to remove that background color of the Rectangle and leave everything of the same color, tell me what you think :)
Thanks again for the review
Giulio
- 161. By Giulio Collura on 2014-11-04
-
fix rgba typo. make rectangle color transparent
| Michael Sheldon (michael-sheldon) wrote : | # |
At this stage it'd be best to keep the design the same for use cases that already work in apps (i.e. with light coloured backgrounds). We can use the same technique the UITK uses to determine whether something has a light background or not via ColorUtils, so if it has a light background set a white apps area, otherwise leave it transparent for darker backgrounds, for example:
color: ColorUtils.
Should do the trick.
I still need to figure out what the UITK does with the background colour though, as the colour that gets set as Theme.palette.
- 162. By Giulio Collura on 2014-11-07
-
use ColorUtils.
luminance to determine background color
| Giulio Collura (gcollura) wrote : | # |
I updated my branch using your suggestion.
| Michael Sheldon (michael-sheldon) wrote : | # |
Sorry! We've decided to take another approach to fixing this bug, since it isn't really possible for us to mimic the application's colours correctly without the developer having to explicitly set headerColor/
| Michael Hall (mhall119) wrote : | # |
Not having a proper way to change the ContentPeerPicker colors makes it less ideal for apps that define their own colors. Which means those developers will either avoid using it and roll their own, or do some nasty hacks to force it to change color (I'm currently doing the later).
Unmerged revisions
- 162. By Giulio Collura on 2014-11-07
-
use ColorUtils.
luminance to determine background color - 161. By Giulio Collura on 2014-11-04
-
fix rgba typo. make rectangle color transparent
- 160. By Giulio Collura on 2014-10-30
-
Fix bug #1384490

I think it's best if we pick up the colour from the Theme palette as this is how the developer should be customising colour throughout the app, however I think we need to do some extra things to match the way the UITK uses these properties, I'll have a bit of look into this and get back to you on what I find.
Aside from that it looks like you've got a couple of typos for Qt.rgba listed as Qt.rbga (g and b switched around), so dark layouts still get the white background. However, with these corrected the apps box for light backgrounds becomes gray, so we might need to think about that a bit more.