~andreagrandi/unity-2d/unity-2d-unused-dep

« back to all changes in this revision

Viewing changes to places/Home.qml

[dash] Implemented keyboard navigation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import QtQuick 1.0
20
20
import Unity2d 1.0 /* Necessary for SortFilterProxyModel and for the ImageProvider serving image://icons/theme_name/icon_name */
21
21
 
22
 
Item {
 
22
FocusScope {
23
23
    property variant model: PageModel {
24
24
        /* model.entrySearchQuery is copied over to all place entries's globalSearchQuery property */
25
25
        onEntrySearchQueryChanged: {
96
96
    ListViewWithScrollbar {
97
97
        id: globalSearch
98
98
 
 
99
        focus: globalSearchActive
99
100
        opacity: globalSearchActive ? 1 : 0
100
101
        anchors.fill: parent
101
102
 
124
125
        }
125
126
    }
126
127
 
127
 
    Rectangle {
 
128
    FocusScope {
128
129
        id: shortcuts
129
130
 
 
131
        focus: !globalSearchActive
130
132
        opacity: (!globalSearchActive && (shortcutsActive || dashView.dashMode == DashDeclarativeView.FullScreenMode)) ? 1 : 0
131
133
        anchors.horizontalCenter: parent.horizontalCenter
132
134
        anchors.verticalCenter: parent.verticalCenter
134
136
        width: 888
135
137
        height: 466
136
138
 
137
 
        radius: 5
138
 
        border.width: 1
139
 
        /* FIXME: wrong colors */
140
 
        border.color: Qt.rgba(1, 1, 1, 0.2)
141
 
        color: Qt.rgba(0, 0, 0, 0.3)
 
139
        Rectangle {
 
140
            anchors.fill: parent
 
141
            radius: 5
 
142
            border.width: 1
 
143
            /* FIXME: wrong colors */
 
144
            border.color: Qt.rgba(1, 1, 1, 0.2)
 
145
            color: Qt.rgba(0, 0, 0, 0.3)
 
146
        }
142
147
 
143
148
        Button {
144
149
            id: closeShortcutsButton
169
174
           on the default version if a custom one doesn’t exist. */
170
175
        Loader {
171
176
            id: customShortcutsLoader
 
177
            focus: status == Loader.Ready
172
178
            anchors.fill: parent
173
179
            source: "HomeShortcutsCustomized.qml"
174
180
        }
175
181
        Loader {
176
182
            id: defaultShortcutsLoader
 
183
            focus: !customShortcutsLoader.focus
177
184
            anchors.fill: parent
178
185
            source: (customShortcutsLoader.status == Loader.Error) ? "HomeShortcuts.qml" : ""
179
186
        }