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
1=== modified file 'modules/Ubuntu/Components/ListItems/LabelVisual.qml'
2--- modules/Ubuntu/Components/ListItems/LabelVisual.qml 2013-07-04 21:36:23 +0000
3+++ modules/Ubuntu/Components/ListItems/LabelVisual.qml 2013-08-29 18:48:44 +0000
4@@ -23,8 +23,16 @@
5 property bool selected: false
6 property bool secondary: false
7
8+ // FIXME: very ugly hack to detect whether the list item is inside a Popover
9+ property bool overlay: isInsideOverlay(label)
10+ function isInsideOverlay(item) {
11+ if (!item.parent) return false;
12+ return item.parent.hasOwnProperty("pointerTarget") || label.isInsideOverlay(item.parent)
13+ }
14+
15 fontSize: "medium"
16 elide: Text.ElideRight
17- color: selected ? UbuntuColors.orange : secondary ? Theme.palette.normal.backgroundText : Theme.palette.selected.backgroundText
18+ color: selected ? UbuntuColors.orange : secondary ? overlay ? Theme.palette.normal.overlayText : Theme.palette.normal.backgroundText
19+ : overlay ? Theme.palette.selected.overlayText : Theme.palette.selected.backgroundText
20 opacity: label.enabled ? 1.0 : 0.5
21 }

Subscribers

People subscribed via source and target branches

to status/vote changes: