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
=== modified file 'themes/Ambiance/qmltheme/CheckBoxDelegate.qml'
--- themes/Ambiance/qmltheme/CheckBoxDelegate.qml 2013-01-10 15:10:38 +0000
+++ themes/Ambiance/qmltheme/CheckBoxDelegate.qml 2013-02-01 11:52:25 +0000
@@ -27,7 +27,12 @@
27 anchors.fill: parent27 anchors.fill: parent
28 color: item.checked ? StyleUtils.itemStyleProperty("checkedColor") : StyleUtils.itemStyleProperty("uncheckedColor")28 color: item.checked ? StyleUtils.itemStyleProperty("checkedColor") : StyleUtils.itemStyleProperty("uncheckedColor")
29 gradientColor: "transparent"29 gradientColor: "transparent"
30 Behavior on color { animation: StyleUtils.itemStyleProperty("backgroundColorAnimation") }30 Behavior on color {
31 ColorAnimation {
32 duration: StyleUtils.itemStyleProperty("backgroundColorAnimation").duration
33 easing: StyleUtils.itemStyleProperty("backgroundColorAnimation").easing
34 }
35 }
31 }36 }
3237
33 Image {38 Image {
3439
=== modified file 'themes/Ambiance/qmltheme/ScrollbarDelegate.qml'
--- themes/Ambiance/qmltheme/ScrollbarDelegate.qml 2013-01-11 17:44:58 +0000
+++ themes/Ambiance/qmltheme/ScrollbarDelegate.qml 2013-02-01 11:52:25 +0000
@@ -239,11 +239,17 @@
239239
240 Behavior on width {240 Behavior on width {
241 enabled: (!isVertical)241 enabled: (!isVertical)
242 animation: StyleUtils.itemStyleProperty("sliderAnimation")242 NumberAnimation {
243 duration: StyleUtils.itemStyleProperty("sliderAnimation").duration
244 easing: StyleUtils.itemStyleProperty("sliderAnimation").easing
245 }
243 }246 }
244 Behavior on height {247 Behavior on height {
245 enabled: (isVertical)248 enabled: (isVertical)
246 animation: StyleUtils.itemStyleProperty("sliderAnimation")249 NumberAnimation {
250 duration: StyleUtils.itemStyleProperty("sliderAnimation").duration
251 easing: StyleUtils.itemStyleProperty("sliderAnimation").easing
252 }
247 }253 }
248254
249 function scroll(amount) {255 function scroll(amount) {
@@ -271,7 +277,12 @@
271 }277 }
272 color: StyleUtils.itemStyleProperty("thumbConnectorColor", "white")278 color: StyleUtils.itemStyleProperty("thumbConnectorColor", "white")
273 opacity: thumb.shown ? 1.0 : 0.0279 opacity: thumb.shown ? 1.0 : 0.0
274 Behavior on opacity { animation: StyleUtils.itemStyleProperty("thumbConnectorFading") }280 Behavior on opacity {
281 NumberAnimation {
282 duration: StyleUtils.itemStyleProperty("thumbConnectorFading").duration
283 easing: StyleUtils.itemStyleProperty("thumbConnectorFading").easing
284 }
285 }
275 }286 }
276287
277 MouseArea {288 MouseArea {
@@ -432,7 +443,12 @@
432 }443 }
433444
434 opacity: shown ? (thumbArea.containsMouse || thumbArea.drag.active ? 1.0 : 0.5) : 0.0445 opacity: shown ? (thumbArea.containsMouse || thumbArea.drag.active ? 1.0 : 0.5) : 0.0
435 Behavior on opacity { animation: StyleUtils.itemStyleProperty("thumbFading") }446 Behavior on opacity {
447 NumberAnimation {
448 duration: StyleUtils.itemStyleProperty("thumbFading").duration
449 easing: StyleUtils.itemStyleProperty("thumbFading").easing
450 }
451 }
436452
437 property url backwardPressed: StyleUtils.itemStyleProperty("backwardThumbPressed", "")453 property url backwardPressed: StyleUtils.itemStyleProperty("backwardThumbPressed", "")
438 property url backwardReleased: StyleUtils.itemStyleProperty("backwardThumbReleased", "")454 property url backwardReleased: StyleUtils.itemStyleProperty("backwardThumbReleased", "")
439455
=== modified file 'themes/Ambiance/qmltheme/SwitchDelegate.qml'
--- themes/Ambiance/qmltheme/SwitchDelegate.qml 2013-01-15 20:29:48 +0000
+++ themes/Ambiance/qmltheme/SwitchDelegate.qml 2013-02-01 11:52:25 +0000
@@ -43,8 +43,18 @@
43 : StyleUtils.itemStyleProperty("uncheckedThumbColor", "grey")43 : StyleUtils.itemStyleProperty("uncheckedThumbColor", "grey")
44 gradientColor: "transparent"44 gradientColor: "transparent"
4545
46 Behavior on x { animation: StyleUtils.itemStyleProperty("moveThumbAnimation") }46 Behavior on x {
47 Behavior on color { animation: StyleUtils.itemStyleProperty("thumbColorAnimation") }47 NumberAnimation {
48 duration: StyleUtils.itemStyleProperty("moveThumbAnimation").duration
49 easing: StyleUtils.itemStyleProperty("moveThumbAnimation").easing
50 }
51 }
52 Behavior on color {
53 ColorAnimation {
54 duration: StyleUtils.itemStyleProperty("thumbColorAnimation").duration
55 easing: StyleUtils.itemStyleProperty("thumbColorAnimation").easing
56 }
57 }
48 }58 }
4959
50 Item {60 Item {

Subscribers

People subscribed via source and target branches

to status/vote changes: