~unity-2d-team/unity-2d/shortcut-hint-overlay

« back to all changes in this revision

Viewing changes to spread/Windows.qml

  • Committer: Tiago Salem Herrmann
  • Date: 2012-03-19 15:28:41 UTC
  • mfrom: (771.40.182 unity-2d)
  • Revision ID: tiago.herrmann@canonical.com-20120319152841-2hfflo67muks7gca
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
        filterRegExp: RegExp("%1".arg(switcher.applicationFilter))
74
74
    }
75
75
 
 
76
    /* This proxy model takes care of removing all windows that are not on
 
77
       the screen of this spread. */
 
78
    SortFilterProxyModel {
 
79
        id: filteredByScreen
 
80
        model: filteredByApplication
 
81
        dynamicSortFilter: true
 
82
 
 
83
        filterRole: WindowInfo.RoleScreen
 
84
        filterRegExp: RegExp("%1".arg(declarativeView.screen.screen))
 
85
    }
 
86
 
76
87
    property int columns: Math.ceil(Math.sqrt(count))
77
88
    property int rows: Math.ceil(count / columns)
78
89
    property int cellSpacing: 10
84
95
     * initialization gets somehow messed up and the "columns" and "rows"
85
96
     * variables are set to those of the first workspace. */
86
97
    Component.onCompleted: {
87
 
        model = filteredByApplication
 
98
        model = filteredByScreen
88
99
    }
89
100
 
90
101
    delegate:
130
141
                property bool animateFollow: false
131
142
                property bool followCell: true
132
143
 
133
 
                isSelected: cell.activeFocus
 
144
                isSelected: cell.activeFocus && spreadManager.currentSwitcher == switcher
134
145
 
135
146
                onEntered: {
136
147
                    windows.currentIndex = index