~mterry/+junk/unity8

« back to all changes in this revision

Viewing changes to qml/Dash/GenericScopeView.qml

  • Committer: CI bot
  • Author(s): Albert Astals
  • Date: 2014-06-23 11:16:48 UTC
  • mfrom: (942.4.17 dashviews_integration)
  • Revision ID: ps-jenkins@lists.canonical.com-20140623111648-kjvczpy41hm2dv72
Add VerticalJournal integration to Dash/scopes/QML Fixes: 1326467

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2013 Canonical, Ltd.
 
2
 * Copyright (C) 2013-2014 Canonical, Ltd.
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License as published by
147
147
                source: {
148
148
                    switch (cardTool.categoryLayout) {
149
149
                        case "carousel": return "CardCarousel.qml";
 
150
                        case "vertical-journal": return "CardVerticalJournal.qml";
150
151
                        case "running-apps": return "Apps/RunningApplicationsGrid.qml";
151
152
                        case "grid":
152
153
                        default: return "CardFilterGrid.qml";
202
203
                        previewListView.currentIndex = index;
203
204
                        previewListView.open = true
204
205
                    }
 
206
                    onExpandableChanged: {
 
207
                        // This can happen with the VJ that doesn't know how height it will be on creation
 
208
                        // so doesn't set expandable until a bit too late for onLoaded
 
209
                        if (rendererLoader.item.expandable) {
 
210
                            var shouldFilter = baseItem.category != categoryView.expandedCategoryId;
 
211
                            rendererLoader.item.setFilter(shouldFilter, false /*animate*/);
 
212
                        }
 
213
                    }
205
214
                }
206
215
                Connections {
207
216
                    target: categoryView