Merge lp:~tpeeters/ubuntu-ui-toolkit/fix1205094 into lp:ubuntu-ui-toolkit

Proposed by Tim Peeters
Status: Merged
Approved by: Zsombor Egri
Approved revision: 729
Merged at revision: 729
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/fix1205094
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 21 lines (+9/-1)
1 file modified
modules/Ubuntu/Components/ListItems/LabelVisual.qml (+9/-1)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/fix1205094
Reviewer Review Type Date Requested Status
Zsombor Egri Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+182987@code.launchpad.net

Description of the change

Quick fix, completely untested. Might mess up apps with list items that do not use popovers. Have a look to see if you can use this code and it doesn't break anything.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

ugly, but there are not so many nicer ways to detect this...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'modules/Ubuntu/Components/ListItems/LabelVisual.qml'
--- modules/Ubuntu/Components/ListItems/LabelVisual.qml 2013-07-04 21:36:23 +0000
+++ modules/Ubuntu/Components/ListItems/LabelVisual.qml 2013-08-29 18:48:44 +0000
@@ -23,8 +23,16 @@
23 property bool selected: false23 property bool selected: false
24 property bool secondary: false24 property bool secondary: false
2525
26 // FIXME: very ugly hack to detect whether the list item is inside a Popover
27 property bool overlay: isInsideOverlay(label)
28 function isInsideOverlay(item) {
29 if (!item.parent) return false;
30 return item.parent.hasOwnProperty("pointerTarget") || label.isInsideOverlay(item.parent)
31 }
32
26 fontSize: "medium"33 fontSize: "medium"
27 elide: Text.ElideRight34 elide: Text.ElideRight
28 color: selected ? UbuntuColors.orange : secondary ? Theme.palette.normal.backgroundText : Theme.palette.selected.backgroundText35 color: selected ? UbuntuColors.orange : secondary ? overlay ? Theme.palette.normal.overlayText : Theme.palette.normal.backgroundText
36 : overlay ? Theme.palette.selected.overlayText : Theme.palette.selected.backgroundText
29 opacity: label.enabled ? 1.0 : 0.537 opacity: label.enabled ? 1.0 : 0.5
30}38}

Subscribers

People subscribed via source and target branches

to status/vote changes: