Merge lp:~zsombi/ubuntu-ui-toolkit/fix-behavior-crashes into lp:ubuntu-ui-toolkit

Proposed by Zsombor Egri
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 305
Merged at revision: 305
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/fix-behavior-crashes
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 94 lines (+38/-7)
3 files modified
themes/Ambiance/qmltheme/CheckBoxDelegate.qml (+6/-1)
themes/Ambiance/qmltheme/ScrollbarDelegate.qml (+20/-4)
themes/Ambiance/qmltheme/SwitchDelegate.qml (+12/-2)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/fix-behavior-crashes
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Pending
Zoltan Balogh Pending
Review via email: mp+146100@code.launchpad.net

Commit message

Fix crashing on styled Behaviors in delegates.

Description of the change

Fix crashing on styled Behaviors in delegates.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'themes/Ambiance/qmltheme/CheckBoxDelegate.qml'
2--- themes/Ambiance/qmltheme/CheckBoxDelegate.qml 2013-01-10 15:10:38 +0000
3+++ themes/Ambiance/qmltheme/CheckBoxDelegate.qml 2013-02-01 11:52:25 +0000
4@@ -27,7 +27,12 @@
5 anchors.fill: parent
6 color: item.checked ? StyleUtils.itemStyleProperty("checkedColor") : StyleUtils.itemStyleProperty("uncheckedColor")
7 gradientColor: "transparent"
8- Behavior on color { animation: StyleUtils.itemStyleProperty("backgroundColorAnimation") }
9+ Behavior on color {
10+ ColorAnimation {
11+ duration: StyleUtils.itemStyleProperty("backgroundColorAnimation").duration
12+ easing: StyleUtils.itemStyleProperty("backgroundColorAnimation").easing
13+ }
14+ }
15 }
16
17 Image {
18
19=== modified file 'themes/Ambiance/qmltheme/ScrollbarDelegate.qml'
20--- themes/Ambiance/qmltheme/ScrollbarDelegate.qml 2013-01-11 17:44:58 +0000
21+++ themes/Ambiance/qmltheme/ScrollbarDelegate.qml 2013-02-01 11:52:25 +0000
22@@ -239,11 +239,17 @@
23
24 Behavior on width {
25 enabled: (!isVertical)
26- animation: StyleUtils.itemStyleProperty("sliderAnimation")
27+ NumberAnimation {
28+ duration: StyleUtils.itemStyleProperty("sliderAnimation").duration
29+ easing: StyleUtils.itemStyleProperty("sliderAnimation").easing
30+ }
31 }
32 Behavior on height {
33 enabled: (isVertical)
34- animation: StyleUtils.itemStyleProperty("sliderAnimation")
35+ NumberAnimation {
36+ duration: StyleUtils.itemStyleProperty("sliderAnimation").duration
37+ easing: StyleUtils.itemStyleProperty("sliderAnimation").easing
38+ }
39 }
40
41 function scroll(amount) {
42@@ -271,7 +277,12 @@
43 }
44 color: StyleUtils.itemStyleProperty("thumbConnectorColor", "white")
45 opacity: thumb.shown ? 1.0 : 0.0
46- Behavior on opacity { animation: StyleUtils.itemStyleProperty("thumbConnectorFading") }
47+ Behavior on opacity {
48+ NumberAnimation {
49+ duration: StyleUtils.itemStyleProperty("thumbConnectorFading").duration
50+ easing: StyleUtils.itemStyleProperty("thumbConnectorFading").easing
51+ }
52+ }
53 }
54
55 MouseArea {
56@@ -432,7 +443,12 @@
57 }
58
59 opacity: shown ? (thumbArea.containsMouse || thumbArea.drag.active ? 1.0 : 0.5) : 0.0
60- Behavior on opacity { animation: StyleUtils.itemStyleProperty("thumbFading") }
61+ Behavior on opacity {
62+ NumberAnimation {
63+ duration: StyleUtils.itemStyleProperty("thumbFading").duration
64+ easing: StyleUtils.itemStyleProperty("thumbFading").easing
65+ }
66+ }
67
68 property url backwardPressed: StyleUtils.itemStyleProperty("backwardThumbPressed", "")
69 property url backwardReleased: StyleUtils.itemStyleProperty("backwardThumbReleased", "")
70
71=== modified file 'themes/Ambiance/qmltheme/SwitchDelegate.qml'
72--- themes/Ambiance/qmltheme/SwitchDelegate.qml 2013-01-15 20:29:48 +0000
73+++ themes/Ambiance/qmltheme/SwitchDelegate.qml 2013-02-01 11:52:25 +0000
74@@ -43,8 +43,18 @@
75 : StyleUtils.itemStyleProperty("uncheckedThumbColor", "grey")
76 gradientColor: "transparent"
77
78- Behavior on x { animation: StyleUtils.itemStyleProperty("moveThumbAnimation") }
79- Behavior on color { animation: StyleUtils.itemStyleProperty("thumbColorAnimation") }
80+ Behavior on x {
81+ NumberAnimation {
82+ duration: StyleUtils.itemStyleProperty("moveThumbAnimation").duration
83+ easing: StyleUtils.itemStyleProperty("moveThumbAnimation").easing
84+ }
85+ }
86+ Behavior on color {
87+ ColorAnimation {
88+ duration: StyleUtils.itemStyleProperty("thumbColorAnimation").duration
89+ easing: StyleUtils.itemStyleProperty("thumbColorAnimation").easing
90+ }
91+ }
92 }
93
94 Item {

Subscribers

People subscribed via source and target branches

to status/vote changes: