Merge lp:~zsombi/ubuntu-ui-toolkit/mainview-bloop into lp:ubuntu-ui-toolkit

Proposed by Zsombor Egri
Status: Merged
Approved by: Tim Peeters
Approved revision: 937
Merged at revision: 986
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/mainview-bloop
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 31 lines (+10/-3)
1 file modified
modules/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml (+10/-3)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/mainview-bloop
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Tim Peeters Approve
Florian Boucault (community) Approve
Review via email: mp+205407@code.launchpad.net

Commit message

MainView binding loop fix when backgroundColor is changed runtime.

To post a comment you must log in.
Revision history for this message
Zsombor Egri (zsombi) wrote :

To test, add the following to any MainView:

backgroundColor: "brown"

Timer {
    running: true
    onTriggered: {
         gallery.backgroundColor = "white";
    }
}

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

looks good

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

LGTM, please merge with trunk

Revision history for this message
Florian Boucault (fboucault) :
review: Approve
935. By Zsombor Egri

trunk merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
936. By Zsombor Egri

trunk merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

Tests are running in CI@home for 4 hours already with lots of failures http://pastebin.ubuntu.com/7074800/
Maybe CI@home is broken.

Revision history for this message
Tim Peeters (tpeeters) wrote :

Code looks good, but we have to wait for qt 5.2 to land to fix some failures with android 4.4.

review: Approve
937. By Zsombor Egri

trunk merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

clock-app AP test OK (2 times)

Revision history for this message
Tim Peeters (tpeeters) wrote :

> clock-app AP test OK (2 times)

3 times 100% OK

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml'
2--- modules/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml 2013-07-12 06:02:43 +0000
3+++ modules/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml 2014-03-24 12:20:10 +0000
4@@ -51,11 +51,17 @@
5
6 QtObject {
7 id: internals
8- property bool isLight: ColorUtils.luminance(styledItem.backgroundColor) >= 0.85
9 property bool isGradient: styledItem.backgroundColor != styledItem.headerColor ||
10 styledItem.backgroundColor != styledItem.footerColor
11- property string theme: isLight ? "Ambiance" :
12- (isGradient ? "SuruGradient" : "SuruDark")
13+ /*
14+ As we don't know the order the property bindings and onXXXChanged signals are evaluated
15+ we should rely only on one property when changing the theme to avoid intermediate
16+ theme changes due to properties being evaluated separately.
17+
18+ Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
19+ */
20+ property string theme: (ColorUtils.luminance(styledItem.backgroundColor) >= 0.85) ? "Ambiance" :
21+ (isGradient ? "SuruGradient" : "SuruDark")
22 }
23
24 // automatically select the appropriate theme depending on the background colors
25@@ -63,5 +69,6 @@
26 target: Theme
27 property: "name"
28 value: "Ubuntu.Components.Themes.%1".arg(internals.theme)
29+ when: internals.theme !== ""
30 }
31 }

Subscribers

People subscribed via source and target branches

to status/vote changes: