~michael-sheldon/webbrowser-app/implement-download-folder

« back to all changes in this revision

Viewing changes to src/app/webbrowser/NewTabView.qml

  • Committer: Michael Sheldon
  • Date: 2015-10-26 11:09:25 UTC
  • mfrom: (1106.59.20 webbrowser-app)
  • Revision ID: michael.sheldon@canonical.com-20151026110925-2j9uswxlr5ipon7y
Merge from trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
Item {
27
27
    id: newTabView
28
28
 
29
 
    property QtObject bookmarksModel
30
29
    property Settings settingsObject
31
30
 
32
31
    signal bookmarkClicked(url url)
46
45
 
47
46
        property bool seeMoreBookmarksView: false
48
47
        property int bookmarksCountLimit: Math.min(4, numberOfBookmarks)
49
 
        property int numberOfBookmarks: bookmarksModel ? bookmarksModel.count : 0
 
48
        property int numberOfBookmarks: BookmarksModel.count
50
49
 
51
50
        // Force the topsites section to reappear when remove a bookmark while
52
51
        // the bookmarks list is expanded and there aren't anymore > 5
148
147
                height: status == Loader.Ready ? item.height : 0
149
148
 
150
149
                active: internal.seeMoreBookmarksView
151
 
                sourceComponent: BookmarksFolderListView {
152
 
                    model: newTabView.bookmarksModel
 
150
 
 
151
                sourceComponent: BookmarksFoldersView {
 
152
                    homeBookmarkUrl: newTabView.settingsObject.homepage
153
153
 
154
154
                    onBookmarkClicked: newTabView.bookmarkClicked(url)
155
155
                    onBookmarkRemoved: newTabView.bookmarkRemoved(url)
198
198
                    spacing: 0
199
199
                    limit: internal.bookmarksCountLimit
200
200
 
201
 
                    model: newTabView.bookmarksModel
 
201
                    model: BookmarksModel
202
202
 
203
203
                    onUrlClicked: newTabView.bookmarkClicked(url)
204
204
                    onUrlRemoved: newTabView.bookmarkRemoved(url)
301
301
                    visible: opacity > 0
302
302
                    interactive: false
303
303
 
 
304
                    // No highlight as this view doesn’t support keyboard navigation
 
305
                    highlight: null
 
306
 
304
307
                    model: LimitProxyModel {
305
308
                        limit: 10
306
309
                        sourceModel: topSitesModel