~ubuntu-branches/ubuntu/vivid/youker-assistant/vivid

« back to all changes in this revision

Viewing changes to qml/func/cleaner/CookiesItem.qml

  • Committer: Package Import Robot
  • Author(s): Aron Xu
  • Date: 2014-03-24 15:52:37 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140324155237-3kod0m3wr2a2ag39
Tags: 1.0.1-0ubuntu1
* New upstream release (LP: #1294936).
* Modify display mode of weather forecast and system settings.
* Add file manager and font style settings.
* Improve system settings and restoring default settings.
* Cache user account (not password).
* Change the position of window control buttons.
* Add configuration for Kingsoft KuaiPan cloud client.
* Add the instruction of Youker Assistant.
* Open related folders when scanning items got double-clicked.
* Notify users when operating the Kingsoft disk cloud configuration.
* Modify Dbus starting method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
Item {
19
19
    id: container
20
20
    property string fontName: "Helvetica"
21
 
    property int fontSize: 10
 
21
    property int fontSize: 12
22
22
    property color fontColor: "black"
23
23
    property bool fontBold: false
24
24
    property string text: ""
25
25
    property string descript: ""
26
26
    property string size_num: ""
27
 
    property string bgImage: '../../img/icons/list_item.png'
 
27
    property int item_index
 
28
    property string bgImage: "../../img/icons/green.png"
 
29
    property string bgImage2: "../../img/icons/blue.png"
28
30
    property string bgImageSelected: '../../img/icons/list_item_selected.png'
29
31
    property string bgImagePressed: '../../img/icons/list_item_pressed.png'
30
32
    property bool selected: false
65
67
        return need_str;
66
68
    }
67
69
 
68
 
    BorderImage {
 
70
//    BorderImage {
 
71
//        id: background
 
72
//        anchors {
 
73
//            left: parent.left
 
74
//            leftMargin: 20
 
75
//        }
 
76
////        border { top: 9; bottom: 36; left: 35; right: 35; }
 
77
////        source: bgImage
 
78
//        border {left: 35; right: 35; }
 
79
//        source: (container.item_index%2 == 0) ? bgImage : bgImage2
 
80
////        source: (container.item_index%2 == 0) ? "../../img/icons/green.png": "../../img/icons/blue.png"
 
81
//        anchors.fill: parent
 
82
//    }
 
83
 
 
84
    Rectangle {
69
85
        id: background
70
 
        border { top: 9; bottom: 36; left: 35; right: 35; }
71
 
        source: bgImage
72
86
        anchors.fill: parent
73
 
    }
 
87
        color: (container.item_index%2 == 0) ? "#d7ecfb" : "transparent"
 
88
//        color: (container.item_index%2 == 0) ? "#d0eafb" : "#d7eefd"
 
89
//         border.color: "black"
 
90
//         border.width: 5
 
91
//         radius: 10
 
92
     }
 
93
 
74
94
    Text {
75
95
        id: itemText
76
96
        anchors.verticalCenter: parent.verticalCenter
77
97
        anchors.left: parent.left
78
98
        anchors.leftMargin: 30
79
 
        font {
80
 
            family: container.fontName
81
 
            pointSize: container.fontSize
82
 
            bold: container.fontBold
83
 
        }
 
99
        font.pixelSize: container.fontSize
 
100
        font.family: container.fontName
84
101
        color: container.fontColor
85
102
        elide: Text.ElideRight
86
103
        text: container.split_status ? get_last_name(container.text) : container.text
95
112
            rightMargin: 40
96
113
            verticalCenter: container.verticalCenter
97
114
        }
 
115
        font.pixelSize: container.fontSize
 
116
        font.family: container.fontName
98
117
        color: container.fontColor
99
118
        elide: Text.ElideRight
100
119
        verticalAlignment: Text.AlignVCenter
117
136
 
118
137
    MouseArea {
119
138
        id: mouseArea
 
139
        hoverEnabled: true
120
140
        anchors.fill: itemText
121
 
        onReleased: selectable && !selected ? selected = true : selected = false
 
141
        onExited: container.state = ''
 
142
        onReleased: container.state = ''//selectable && !selected ? selected = true : selected = false
 
143
        onHoveredChanged:  {
 
144
            !selected ? selected = true : selected = false
 
145
        }
122
146
    }
123
 
 
124
147
    states: [
125
148
        State {
126
149
            name: 'pressed'; when: mouseArea.pressed
127
 
            PropertyChanges { target: background; source: bgImagePressed; border { left: 35; top: 35; right: 35; bottom: 10 } }
 
150
            PropertyChanges { target: background; color: "#cae7fa" }
128
151
        },
129
152
        State {
130
153
            name: 'selected'
131
 
            PropertyChanges { target: background; source: bgImageSelected; border { left: 35; top: 35; right: 35; bottom: 10 } }
 
154
            PropertyChanges { target: background; color: "#cae7fa" }
132
155
        }
133
156
    ]
 
157
 
 
158
//    states: [
 
159
//        State {
 
160
//            name: 'pressed'; when: mouseArea.pressed
 
161
//            PropertyChanges { target: background; source: bgImagePressed; border { left: 35; top: 35; right: 35; bottom: 10 } }
 
162
//        },
 
163
//        State {
 
164
//            name: 'selected'
 
165
//            PropertyChanges { target: background; source: bgImageSelected; border { left: 35; top: 35; right: 35; bottom: 10 } }
 
166
//        }
 
167
//    ]
134
168
}