Merge lp://staging/~zsombi/ubuntu-ui-toolkit/50-custom-delegates into lp://staging/~zsombi/ubuntu-ui-toolkit/listitem-master

Proposed by Zsombor Egri
Status: Merged
Approved by: Tim Peeters
Approved revision: 1291
Merged at revision: 1275
Proposed branch: lp://staging/~zsombi/ubuntu-ui-toolkit/50-custom-delegates
Merge into: lp://staging/~zsombi/ubuntu-ui-toolkit/listitem-master
Prerequisite: lp://staging/~zsombi/ubuntu-ui-toolkit/45-selected-option-rebinds
Diff against target: 215 lines (+107/-7)
6 files modified
modules/Ubuntu/Components/Themes/Ambiance/ListItemPanel.qml (+3/-1)
modules/Ubuntu/Components/plugin/uclistitem.cpp (+1/-1)
modules/Ubuntu/Components/plugin/uclistitemactions.cpp (+63/-4)
modules/Ubuntu/Components/plugin/uclistitemactionsattached.cpp (+1/-1)
tests/resources/listitems/ListItemTest.qml (+16/-0)
tests/unit_x11/tst_components/tst_listitem.qml (+23/-0)
To merge this branch: bzr merge lp://staging/~zsombi/ubuntu-ui-toolkit/50-custom-delegates
Reviewer Review Type Date Requested Status
Tim Peeters Approve
Review via email: mp+235170@code.staging.launchpad.net

Commit message

Introducing custom delegates.

Description of the change

Introducing custom delegates.

To post a comment you must log in.
1251. By Zsombor Egri

prereq sync

1252. By Zsombor Egri

prereq sync

1253. By Zsombor Egri

prereq sync

1254. By Zsombor Egri

prereq sync

1255. By Zsombor Egri

fixing tests

1256. By Zsombor Egri

prereq sync

1257. By Zsombor Egri

prereq sync

1258. By Zsombor Egri

documentation fxed

1259. By Zsombor Egri

prereq sync

1260. By Zsombor Egri

prereq sync

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

proper rebounding fix in test

1269. By Zsombor Egri

prereq sync

1270. By Zsombor Egri

prereq sync

1271. By Zsombor Egri

prereq sync

1272. By Zsombor Egri

fixing documentation

1273. By Zsombor Egri

prereq sync

1274. By Zsombor Egri

tests fixed

1275. By Zsombor Egri

prereq sync

1276. By Zsombor Egri

prereq sync

1277. By Zsombor Egri

tests adjusted

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

prereq sync

1283. By Zsombor Egri

prereq sync

1284. By Zsombor Egri

prereq sync

1285. By Zsombor Egri

prereq sync

1286. By Zsombor Egri

documentation link fixed

1287. By Zsombor Egri

documentation link fixed

1288. By Zsombor Egri

more documentation fixes

1289. By Zsombor Egri

prereq sync

1290. By Zsombor Egri

remove typo from property documentation

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

58 + * The delegate height is set automatically by the panel item, and the width value
59 + * is clamped between height and the maximum width of the list item divided by the
60 + * number of actions in the list.

, and the width must be specified but will be clamped between....

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

Please expose a pressed attached property to the custom delegate as well.

I have no way now to detect inside the custom delegate whether it is pressed. I could add a MouseArea like this:

        ListItemActions {
            id: trailActions
            actions: [
                Action {
                    iconName: "save-to"
                    text: "Move"
                    onTriggered: print("Move" +value)
                }
            ]
            delegate: Rectangle {
                color: delegateArea.pressed ? "orange" : "yellow"
                width: units.gu(10)
                Label {
                    text: action.text
                    anchors.centerIn: parent
                }
                MouseArea {
                    anchors.fill: parent
                    id: delegateArea
                    onPressed: print("press")
                }
            }
        }

but that eats the mouse events and prevents the trigger() signal on clicked.

Revision history for this message
Tim Peeters (tpeeters) :
review: Needs Fixing
1291. By Zsombor Egri

review comments added

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

thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: