~qqworini/aesydict/online-improve

« back to all changes in this revision

Viewing changes to app/search/PageSearch.qml

  • Committer: Joey Chan
  • Date: 2015-04-01 10:30:25 UTC
  • Revision ID: qqworini@gmail.com-20150401103025-bcliu7w842bwr1qr
add content-hub (not-done)
add dict center (not-done)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import QtQuick 2.2
2
2
import Ubuntu.Components 1.1
 
3
import Ubuntu.Components.ListItems 1.0 as ListItem
 
4
import Ubuntu.Components.Popups 1.0
 
5
import "../components"
 
6
import "../dict"
3
7
 
4
8
Page {
5
9
    id: pageSearch
6
 
    title: "Click the icon"
7
 
    state: "default"
 
10
    title: i18n.tr("AesyDict")
 
11
    state: "search"
8
12
    states: [
9
13
        PageHeadState {
10
14
            name: "default"
11
15
            head: pageSearch.head
12
 
            actions: Action {
13
 
                iconName: "search"
14
 
                onTriggered: pageSearch.state = "search"
15
 
            }
 
16
            actions: [
 
17
                Action {
 
18
                    iconName: "search"
 
19
                    onTriggered: pageSearch.state = "search"
 
20
                }
 
21
                ,
 
22
                Action {
 
23
                    iconName: "attachment"
 
24
                    onTriggered: {
 
25
                        mainStack.push(Qt.resolvedUrl("../dict/PageDictCenter.qml"))
 
26
                    }
 
27
                }
 
28
            ]
16
29
        },
17
30
        PageHeadState {
18
31
            id: headerState
43
56
        }
44
57
    ]
45
58
 
 
59
    flickable: null
 
60
 
 
61
    Flickable {
 
62
        id: scrollArea
 
63
        boundsBehavior: (contentHeight > height) ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
 
64
        anchors.fill: parent
 
65
        contentWidth: width
 
66
        contentHeight: columnInnerArea.height + units.gu(3)
 
67
        clip: true
 
68
 
 
69
        Column {
 
70
            id: columnInnerArea
 
71
 
 
72
//            spacing: units.gu(1)
 
73
            anchors {
 
74
                top: parent.top;
 
75
                //                topMargin: units.gu(1)
 
76
                margins: units.gu(1)
 
77
                left: parent.left; right: parent.right
 
78
                //                leftMargin: units.gu(1); rightMargin: units.gu(1)
 
79
            }
 
80
            height: childrenRect.height
 
81
 
 
82
            ListItem.Caption {
 
83
                text: "English - Chinese Dictionary"
 
84
            }
 
85
            ListItem.ThinDivider {}
 
86
 
 
87
            ListItem.Standard {
 
88
                text: "aaa"
 
89
            }
 
90
 
 
91
            ListItem.Standard {
 
92
                text: "aaa"
 
93
            }
 
94
 
 
95
            ListItem.Standard {
 
96
                text: "aaa"
 
97
            }
 
98
 
 
99
            ListItem.Standard {
 
100
                text: "aaa"
 
101
            }
 
102
 
 
103
            ListItem.Caption {
 
104
                text: "English - Chinese Dictionary"
 
105
            }
 
106
            ListItem.ThinDivider {}
 
107
 
 
108
            ListItem.Standard {
 
109
                text: "aaa"
 
110
            }
 
111
 
 
112
            ListItem.Standard {
 
113
                text: "aaa"
 
114
            }
 
115
 
 
116
            ListItem.Standard {
 
117
                text: "aaa"
 
118
            }
 
119
 
 
120
            ListItem.Standard {
 
121
                text: "aaa"
 
122
            }
 
123
 
 
124
            ListItem.Caption {
 
125
                text: "English - Chinese Dictionary"
 
126
            }
 
127
            ListItem.ThinDivider {}
 
128
 
 
129
            ListItem.Standard {
 
130
                text: "aaa"
 
131
            }
 
132
 
 
133
            ListItem.Standard {
 
134
                text: "aaa"
 
135
            }
 
136
 
 
137
            ListItem.Standard {
 
138
                text: "aaa"
 
139
            }
 
140
 
 
141
            ListItem.Standard {
 
142
                text: "aaa"
 
143
            }
 
144
 
 
145
        } // columnInnerArea
 
146
    }
46
147
}
47
148