~ubuntu-branches/ubuntu/saucy/webbrowser-app/saucy

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/Extras/Browser/TimelineView.qml

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Olivier Tilloy, Ubuntu daily release
  • Date: 2013-07-16 08:26:00 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20130716082600-gqv7v02wu7gldgh4
Tags: 0.21+13.10.20130716-0ubuntu1
[ Olivier Tilloy ]
* Display thumbnails of the web pages in the activity view.
* Refactor the models to group history entries by domain name, not by
  host.
* Ensure the header of the activity view is opaque. (LP: #1201094)

[ Ubuntu daily release ]
* Automatic snapshot from revision 225

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 
58
58
        header: TabsList {
59
59
            width: parent.width
60
 
            height: units.gu(20)
 
60
            height: units.gu(23)
61
61
 
62
62
            model: tabsModel
63
63
 
74
74
        delegate: Column {
75
75
            readonly property int timelineIndex: index
76
76
 
77
 
            visible: hostsView.count > 0
78
 
            height: visible ? header.height + hostsView.height + entriesView.height + spacing * (2 + (timeline.currentIndex >= 0)) : 0
 
77
            visible: domainsView.count > 0
 
78
            height: visible ? header.height + domainsView.height + entriesView.height + spacing * (2 + (timeline.currentIndex >= 0)) : 0
79
79
            width: parent.width
80
80
            clip: true
81
81
            spacing: units.gu(2)
100
100
            }
101
101
 
102
102
            ListView {
103
 
                id: hostsView
 
103
                id: domainsView
104
104
 
105
105
                anchors {
106
106
                    left: parent.left
107
107
                    right: parent.right
108
108
                    margins: units.gu(2)
109
109
                }
110
 
                height: units.gu(12)
 
110
                height: units.gu(14)
111
111
 
112
112
                spacing: units.gu(2)
113
113
                orientation: ListView.Horizontal
114
114
 
115
 
                model: HistoryHostListModel {
 
115
                model: HistoryDomainListModel {
116
116
                    sourceModel: HistoryTimeframeModel {
117
117
                        sourceModel: historyModel
118
118
                        start: {
160
160
 
161
161
                delegate: PageDelegate {
162
162
                    width: units.gu(12)
163
 
                    height: units.gu(12)
164
 
                    color: "white"
 
163
                    height: units.gu(14)
165
164
 
166
 
                    title: model.host ? model.host : i18n.tr("(local files)")
 
165
                    label: {
 
166
                        if (model.domain === "(local)") {
 
167
                            return i18n.tr("(local files)")
 
168
                        } else if (model.domain === "(none)") {
 
169
                            return i18n.tr("(other)")
 
170
                        } else {
 
171
                            return model.domain
 
172
                        }
 
173
                    }
 
174
                    thumbnail: model.thumbnail
167
175
 
168
176
                    MouseArea {
169
177
                        anchors.fill: parent
196
204
 
197
205
                delegate: PageDelegate {
198
206
                    width: units.gu(12)
199
 
                    height: units.gu(12)
200
 
                    color: "white"
201
 
 
202
 
                    title: model.title
 
207
                    height: units.gu(14)
 
208
 
 
209
                    label: model.title ? model.title : model.url
 
210
 
 
211
                    property url thumbnailSource: "image://webthumbnail/" + model.url
 
212
                    thumbnail: WebThumbnailer.thumbnailExists(model.url) ? thumbnailSource : ""
203
213
 
204
214
                    MouseArea {
205
215
                        anchors.fill: parent
213
223
                        when: timelineIndex == timeline.currentIndex
214
224
                        PropertyChanges {
215
225
                            target: entriesView
216
 
                            height: units.gu(12)
 
226
                            height: units.gu(14)
 
227
                            clip: false
217
228
                        }
218
229
                    }
219
230
                ]