~sladen/unity-2d/unity-2d-no-glow-lp933578

« back to all changes in this revision

Viewing changes to shell/dash/CategoryHeader.qml

  • Committer: Paul Sladen
  • Date: 2012-02-24 17:58:11 UTC
  • Revision ID: sladen@canonical.com-20120224175811-5g1rhs2nkhz2v16e
Drop DropShadow and associate /* HACK */ per
https://code.launchpad.net/~sladen/unity-2d/unity-2d-no-glow-lp933578/+merge/94560/comments/204013

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    property alias label: title.text
28
28
    property bool folded: true
29
29
    property int availableCount
30
 
    /* HACK: DropShadow causes visual artifacts while being moved. The previously painted
31
 
       DropShadow can remain in areas where nothing draws over it. Work around this by
32
 
       detecting the flicking movement and disable DropShadow when it happens.
33
 
       DropShadow not officially supported until Qt4.8, when hopefully this will be fixed.
34
 
    */
35
 
    property bool moving: false
36
30
 
37
31
    Accessible.name: "%1 %2 %3".arg(title.text).arg(label.text).arg(folded ? u2d.tr("not expanded") : u2d.tr("expanded"))
38
32
 
39
 
    effect: DropShadow {
40
 
                offset.x: 0
41
 
                offset.y: 0
42
 
                color: "white"
43
 
                enabled: ( categoryHeader.state == "pressed" && !moving )
44
 
            }
45
 
 
46
33
    Image {
47
34
        id: iconImage
48
35
 
80
67
                  || categoryHeader.state == "hovered" ) ? 1.0 : 0.5
81
68
        Behavior on opacity {NumberAnimation { duration: 100 }}
82
69
 
83
 
        effect: DropShadow {
84
 
                    offset.x: 0
85
 
                    offset.y: 0
86
 
                    color: "white"
87
 
                    enabled: ( moreResults.opacity == 1.0 && !moving )
88
 
                }
89
 
 
90
70
        TextCustom {
91
71
            id: label
92
72