Merge lp:~zsombi/ubuntu-ui-toolkit/67-fix-disabled-listitem into lp:ubuntu-ui-toolkit/staging
- 67-fix-disabled-listitem
- Merge into staging
Status: | Superseded |
---|---|
Proposed branch: | lp:~zsombi/ubuntu-ui-toolkit/67-fix-disabled-listitem |
Merge into: | lp:ubuntu-ui-toolkit/staging |
Prerequisite: | lp:~zsombi/ubuntu-ui-toolkit/65-last-divider-invisible |
Diff against target: |
121 lines (+51/-0) 4 files modified
modules/Ubuntu/Components/plugin/uclistitem.cpp (+19/-0) modules/Ubuntu/Components/plugin/uclistitem.h (+1/-0) modules/Ubuntu/Components/plugin/uclistitem_p.h (+2/-0) tests/unit_x11/tst_components/tst_listitem.qml (+29/-0) |
To merge this branch: | bzr merge lp:~zsombi/ubuntu-ui-toolkit/67-fix-disabled-listitem |
Related bugs: | |
Related blueprints: |
SDK: Design a new ListItem and layouts
(Undefined)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Needs Fixing | |
Ubuntu SDK team | Pending | ||
Review via email: mp+233668@code.launchpad.net |
Commit message
ListItem dimmed when disabled.
Description of the change
- 1243. By Zsombor Egri
-
fix provided
PS Jenkins bot (ps-jenkins) wrote : | # |
- 1244. By Zsombor Egri
-
prereq
- 1245. By Zsombor Egri
-
fixing test count
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1245
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1246. By Zsombor Egri
-
prereq
- 1247. By Zsombor Egri
-
prereq
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1246
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1247
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1248. By Zsombor Egri
-
prereq
- 1249. By Zsombor Egri
-
prereq
- 1250. By Zsombor Egri
-
prereq
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1248
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1250
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1251. By Zsombor Egri
-
prereq
- 1252. By Zsombor Egri
-
prereq
- 1253. By Zsombor Egri
-
prereq
- 1254. By Zsombor Egri
-
prereq
- 1255. By Zsombor Egri
-
prereq
- 1256. By Zsombor Egri
-
prereq
- 1257. By Zsombor Egri
-
prereq
- 1258. By Zsombor Egri
-
prereq
- 1259. By Zsombor Egri
-
prereq
- 1260. By Zsombor Egri
-
prereq
- 1261. By Zsombor Egri
-
prereq sync
- 1262. By Zsombor Egri
-
prereq sync
- 1263. By Zsombor Egri
-
prereq sync
- 1264. By Zsombor Egri
-
prereq sync
- 1265. By Zsombor Egri
-
prereq sync
- 1266. By Zsombor Egri
-
prereq sync
- 1267. By Zsombor Egri
-
prereq sync
- 1268. By Zsombor Egri
-
prereq sync
- 1269. By Zsombor Egri
-
prereq sync
- 1270. By Zsombor Egri
-
prereq sync
- 1271. By Zsombor Egri
-
prereq sync
- 1272. By Zsombor Egri
-
prereq sync
- 1273. By Zsombor Egri
-
prereq sync
- 1274. By Zsombor Egri
-
prereq sync
- 1275. By Zsombor Egri
-
disabled action shown dimmed
- 1276. By Zsombor Egri
-
prereq sync
- 1277. By Zsombor Egri
-
property assignment duplicity fixed
- 1278. By Zsombor Egri
-
prereq sync
- 1279. By Zsombor Egri
-
prereq sync
- 1280. By Zsombor Egri
-
prereq sync
- 1281. By Zsombor Egri
-
prereq sync
- 1282. By Zsombor Egri
-
removed connection restored
- 1283. By Zsombor Egri
-
prereq sync
- 1284. By Zsombor Egri
-
prereq sync
- 1285. By Zsombor Egri
-
prereq sync
- 1286. By Zsombor Egri
-
prereq sync
- 1287. By Zsombor Egri
-
prereq sync
- 1288. By Zsombor Egri
-
prereq sync
- 1289. By Zsombor Egri
-
prereq sync
- 1290. By Zsombor Egri
-
prereq sync
- 1291. By Zsombor Egri
-
prereq sync
- 1292. By Zsombor Egri
-
prereq sync
- 1293. By Zsombor Egri
-
prereq sync
- 1294. By Zsombor Egri
-
prereq sync
- 1295. By Zsombor Egri
-
prereq sync
- 1296. By Zsombor Egri
-
rebind when swiped over the actions panel
- 1297. By Zsombor Egri
-
remove wrong commit
- 1298. By Zsombor Egri
-
prereq sync
- 1299. By Zsombor Egri
-
typo fix
- 1300. By Zsombor Egri
-
opacity handling removed
- 1301. By Zsombor Egri
-
some leftovers removed
Unmerged revisions
Preview Diff
1 | === modified file 'modules/Ubuntu/Components/plugin/uclistitem.cpp' | |||
2 | --- modules/Ubuntu/Components/plugin/uclistitem.cpp 2014-09-11 12:07:09 +0000 | |||
3 | +++ modules/Ubuntu/Components/plugin/uclistitem.cpp 2014-09-11 12:07:10 +0000 | |||
4 | @@ -251,6 +251,7 @@ | |||
5 | 251 | , xAxisMoveThresholdGU(1.5) | 251 | , xAxisMoveThresholdGU(1.5) |
6 | 252 | , reboundAnimation(0) | 252 | , reboundAnimation(0) |
7 | 253 | , flickableInteractive(0) | 253 | , flickableInteractive(0) |
8 | 254 | , disabledOpacity(0) | ||
9 | 254 | , contentItem(new UCListItemContent) | 255 | , contentItem(new UCListItemContent) |
10 | 255 | , divider(new UCListItemDivider) | 256 | , divider(new UCListItemDivider) |
11 | 256 | , leadingOptions(0) | 257 | , leadingOptions(0) |
12 | @@ -260,6 +261,7 @@ | |||
13 | 260 | UCListItemPrivate::~UCListItemPrivate() | 261 | UCListItemPrivate::~UCListItemPrivate() |
14 | 261 | { | 262 | { |
15 | 262 | delete flickableInteractive; | 263 | delete flickableInteractive; |
16 | 264 | delete disabledOpacity; | ||
17 | 263 | } | 265 | } |
18 | 264 | 266 | ||
19 | 265 | void UCListItemPrivate::init() | 267 | void UCListItemPrivate::init() |
20 | @@ -282,6 +284,9 @@ | |||
21 | 282 | QObject::connect(&UCUnits::instance(), SIGNAL(gridUnitChanged()), q, SLOT(_q_updateSize())); | 284 | QObject::connect(&UCUnits::instance(), SIGNAL(gridUnitChanged()), q, SLOT(_q_updateSize())); |
22 | 283 | _q_updateSize(); | 285 | _q_updateSize(); |
23 | 284 | 286 | ||
24 | 287 | // watch enabledChanged() | ||
25 | 288 | QObject::connect(q, SIGNAL(enabledChanged()), q, SLOT(_q_dimmDisabled()), Qt::DirectConnection); | ||
26 | 289 | |||
27 | 285 | // create rebound animation | 290 | // create rebound animation |
28 | 286 | UCUbuntuAnimation animationCodes; | 291 | UCUbuntuAnimation animationCodes; |
29 | 287 | reboundAnimation = new QQuickPropertyAnimation(q); | 292 | reboundAnimation = new QQuickPropertyAnimation(q); |
30 | @@ -300,6 +305,20 @@ | |||
31 | 300 | q->setFiltersChildMouseEvents(true); | 305 | q->setFiltersChildMouseEvents(true); |
32 | 301 | } | 306 | } |
33 | 302 | 307 | ||
34 | 308 | void UCListItemPrivate::_q_dimmDisabled() | ||
35 | 309 | { | ||
36 | 310 | Q_Q(UCListItem); | ||
37 | 311 | if (q->isEnabled()) { | ||
38 | 312 | PropertyChange::restore(disabledOpacity); | ||
39 | 313 | } else if (opacity() != 0.5) { | ||
40 | 314 | // this is the first time we need to create the property change | ||
41 | 315 | if (!disabledOpacity) { | ||
42 | 316 | disabledOpacity = new PropertyChange(q, "opacity"); | ||
43 | 317 | } | ||
44 | 318 | PropertyChange::setValue(disabledOpacity, 0.5); | ||
45 | 319 | } | ||
46 | 320 | } | ||
47 | 321 | |||
48 | 303 | void UCListItemPrivate::_q_rebound() | 322 | void UCListItemPrivate::_q_rebound() |
49 | 304 | { | 323 | { |
50 | 305 | setPressed(false); | 324 | setPressed(false); |
51 | 306 | 325 | ||
52 | === modified file 'modules/Ubuntu/Components/plugin/uclistitem.h' | |||
53 | --- modules/Ubuntu/Components/plugin/uclistitem.h 2014-09-11 12:07:09 +0000 | |||
54 | +++ modules/Ubuntu/Components/plugin/uclistitem.h 2014-09-11 12:07:10 +0000 | |||
55 | @@ -71,6 +71,7 @@ | |||
56 | 71 | Q_DECLARE_PRIVATE(UCListItem) | 71 | Q_DECLARE_PRIVATE(UCListItem) |
57 | 72 | QQmlListProperty<QObject> data(); | 72 | QQmlListProperty<QObject> data(); |
58 | 73 | QQmlListProperty<QQuickItem> children(); | 73 | QQmlListProperty<QQuickItem> children(); |
59 | 74 | Q_PRIVATE_SLOT(d_func(), void _q_dimmDisabled()) | ||
60 | 74 | Q_PRIVATE_SLOT(d_func(), void _q_rebound()) | 75 | Q_PRIVATE_SLOT(d_func(), void _q_rebound()) |
61 | 75 | Q_PRIVATE_SLOT(d_func(), void _q_updateSize()) | 76 | Q_PRIVATE_SLOT(d_func(), void _q_updateSize()) |
62 | 76 | Q_PRIVATE_SLOT(d_func(), void _q_completeRebinding()) | 77 | Q_PRIVATE_SLOT(d_func(), void _q_completeRebinding()) |
63 | 77 | 78 | ||
64 | === modified file 'modules/Ubuntu/Components/plugin/uclistitem_p.h' | |||
65 | --- modules/Ubuntu/Components/plugin/uclistitem_p.h 2014-09-11 12:07:09 +0000 | |||
66 | +++ modules/Ubuntu/Components/plugin/uclistitem_p.h 2014-09-11 12:07:10 +0000 | |||
67 | @@ -45,6 +45,7 @@ | |||
68 | 45 | // override setFocusable() | 45 | // override setFocusable() |
69 | 46 | void setFocusable(); | 46 | void setFocusable(); |
70 | 47 | 47 | ||
71 | 48 | void _q_dimmDisabled(); | ||
72 | 48 | void _q_rebound(); | 49 | void _q_rebound(); |
73 | 49 | void _q_updateSize(); | 50 | void _q_updateSize(); |
74 | 50 | void _q_completeRebinding(); | 51 | void _q_completeRebinding(); |
75 | @@ -70,6 +71,7 @@ | |||
76 | 70 | QPointer<QQuickFlickable> flickable; | 71 | QPointer<QQuickFlickable> flickable; |
77 | 71 | QQuickPropertyAnimation *reboundAnimation; | 72 | QQuickPropertyAnimation *reboundAnimation; |
78 | 72 | PropertyChange *flickableInteractive; | 73 | PropertyChange *flickableInteractive; |
79 | 74 | PropertyChange *disabledOpacity; | ||
80 | 73 | UCListItemContent *contentItem; | 75 | UCListItemContent *contentItem; |
81 | 74 | UCListItemDivider *divider; | 76 | UCListItemDivider *divider; |
82 | 75 | UCListItemOptions *leadingOptions; | 77 | UCListItemOptions *leadingOptions; |
83 | 76 | 78 | ||
84 | === modified file 'tests/unit_x11/tst_components/tst_listitem.qml' | |||
85 | --- tests/unit_x11/tst_components/tst_listitem.qml 2014-09-11 12:07:09 +0000 | |||
86 | +++ tests/unit_x11/tst_components/tst_listitem.qml 2014-09-11 12:07:10 +0000 | |||
87 | @@ -446,5 +446,34 @@ | |||
88 | 446 | actionSpy.wait(); | 446 | actionSpy.wait(); |
89 | 447 | compare(action.param, data.result, "Action parameter differs"); | 447 | compare(action.param, data.result, "Action parameter differs"); |
90 | 448 | } | 448 | } |
91 | 449 | |||
92 | 450 | SignalSpy { | ||
93 | 451 | id: panelItemSpy | ||
94 | 452 | signalName: "onXChanged" | ||
95 | 453 | } | ||
96 | 454 | |||
97 | 455 | function test_disabled_item_locked_data() { | ||
98 | 456 | var item0 = findChild(listView, "listItem0"); | ||
99 | 457 | return [ | ||
100 | 458 | // drag same amount as height is | ||
101 | 459 | {tag: "Simple item, leading", item: testItem, enabled: false, dx: testItem.height}, | ||
102 | 460 | {tag: "Simple item, trailing", item: testItem, enabled: false, dx: -testItem.height}, | ||
103 | 461 | {tag: "ListView item, leading", item: item0, enabled: false, dx: item0.height}, | ||
104 | 462 | {tag: "ListView item, trailing", item: item0, enabled: false, dx: -item0.height}, | ||
105 | 463 | ]; | ||
106 | 464 | } | ||
107 | 465 | function test_disabled_item_locked(data) { | ||
108 | 466 | var oldEnabled = data.item.enabled; | ||
109 | 467 | panelItemSpy.clear(); | ||
110 | 468 | panelItemSpy.target = data.item; | ||
111 | 469 | data.item.enabled = false; | ||
112 | 470 | // tug | ||
113 | 471 | flick(data.item.contentItem, centerOf(data.item.contentItem).x, centerOf(data.item.contentItem).y, data.dx, 0); | ||
114 | 472 | compare(panelItemSpy.count, 0, "Item had been tugged despite being disabled!"); | ||
115 | 473 | // check opacity | ||
116 | 474 | fuzzyCompare(data.item.opacity, 0.5, 0.1, "Disabled item must be 50% transparent"); | ||
117 | 475 | //cleanup | ||
118 | 476 | data.item.enabled = oldEnabled; | ||
119 | 477 | } | ||
120 | 449 | } | 478 | } |
121 | 450 | } | 479 | } |
FAILED: Continuous integration, rev:1243 jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- ci/1000/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- utopic- touch/4585 jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- utopic- amd64-ci/ 832 jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- utopic- armhf-ci/ 832 jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- utopic- armhf-ci/ 832/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- utopic- i386-ci/ 832 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- mako/4369 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/5837 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/5837/ artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 12842
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/ubuntu- sdk-team- ubuntu- ui-toolkit- staging- ci/1000/ rebuild
http://