~cimi/unity8/scope-settings

« back to all changes in this revision

Viewing changes to qml/Components/PageHeader.qml

  • Committer: Andrea Cimitan
  • Date: 2014-08-07 16:17:06 UTC
  • mfrom: (1109.1.25 unity8)
  • Revision ID: andrea.cimitan@gmail.com-20140807161706-j6ndy7bgz457xn4n
[ Michal Hruby ]
* Work with the scopes-v4 branch + departments->navigation renaming
[ Michał Sawicz ]
* Hardcode art shape size for click scope local and predefined
  categories While at it, drop the fillmode of cards
* Use the correct API in PageHeader. (LP: #1353048)
* Refactor dash activity indicator. (LP: #1351539)
[ Albert Astals ]
* Dash Departments fixes Update maxHeight manually since it depends on
  the position of the item and its parents and it can't know when the
  binding has to be updated Make parent stuff non interactive when the
  department list is shown
* PageHeader: when on search clip y-coordinates otherwise the
  background spills out when on search (LP: #1350398)
* Dash: Implement OverlayColor support in Cards
* Hardcode art shape size for click scope local and predefined
  categories While at it, drop the fillmode of cards
* Make test_departments test more stable There's various
  DashDepartments on the dash, make sure we're working over the one
  that is on screen, otherwise clicks don't end up where they should
* Work with the scopes-v4 branch + departments->navigation renaming
* Fixes for dash as app Load i18n catalog Process command line options
  Add the posibility to have a mouse touch adaptor (LP: #1353351)
* Implement the Expandable Preview Widget Now TextSummary is not
  expandable by itself anymore, you have to use it inside an
  Expandable to get the behaviour
* Add test prefix to xml output, seems CI needs it
[ Antti Kaijanmäki ]
* Indicators: Adds new ModemInfoItem to be used with indicator-network
  (LP: #1329204)
[ Michael Terry ]
* When the edge demo is running, don't show the greeter if the screen
  is turned off. This avoids an odd interaction where parts of the
  greeter are disabled but the edge demo isn't visible until you slide
  the greeter away. (LP: #1283425)
* Don't hardcode the phablet password in our testing script.
[ Ying-Chun Liu ]
* Add divider dots.
[ Mirco Müller ]
* Make sure the TextField of a snap-decision notification has the
  active focus upon creation, thus the osk shows up right away. (LP:
  #1346867)
[ Andrea Cimitan ]
* Add touchdown effect to dash cards.
* Import Ubuntu.Components for preview image gallery to pick up
  default flicking speeds.
[ Michael Zanetti ]
* Split the dash from the shell into a separate app (LP: #1232687)
[ Leo Arias ]
* Update the autopilot tests to work with the new dash app.
[ Daniel d'Andrada ]
* Split the dash from the shell into a separate app (LP: #1232687)

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    property bool settingsEnabled: false
34
34
    property ListModel searchHistory: SearchHistoryModel
35
35
    property alias searchQuery: searchTextField.text
36
 
    property bool searchInProgress: false
37
36
 
38
37
    property alias bottomItem: bottomContainer.children
 
38
    property int paginationCount: 0
 
39
    property int paginationIndex: -1
39
40
 
40
41
    // TODO We should use foreground for the icons
41
42
    // of the toolbar but unfortunately Action does not have
128
129
    Flickable {
129
130
        id: headerContainer
130
131
        objectName: "headerContainer"
131
 
        clip: openSearchAnimation.running
 
132
        clip: contentY < height
132
133
        anchors { left: parent.left; top: parent.top; right: parent.right }
133
134
        height: units.gu(6.5)
134
135
        contentHeight: headersColumn.height
172
173
                property var styledItem: searchHeader
173
174
                property string title
174
175
                property var config: PageHeadConfiguration {
 
176
                    foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : "grey"
175
177
                    backAction: Action {
176
178
                        iconName: "back"
177
179
                        onTriggered: {
203
205
                            anchors.fill: parent
204
206
                            anchors.margins: units.gu(.75)
205
207
                            source: "image://theme/clear"
206
 
                            opacity: searchTextField.text.length > 0 && !searchActivityIndicator.running
 
208
                            opacity: searchTextField.text.length > 0
207
209
                            visible: opacity > 0
208
210
                            Behavior on opacity {
209
211
                                UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }
210
212
                            }
211
213
                        }
212
214
 
213
 
                        ActivityIndicator {
214
 
                            id: searchActivityIndicator
215
 
                            objectName: "searchIndicator"
216
 
                            anchors.fill: parent
217
 
                            anchors.margins: units.gu(.75)
218
 
                            running: root.searchInProgress
219
 
                            opacity: running ? 1 : 0
220
 
                            Behavior on opacity {
221
 
                                UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }
222
 
                            }
223
 
                        }
224
 
 
225
215
                        onClicked: {
226
216
                            root.resetSearch(true);
227
217
                            root.openSearchHistory();
250
240
                contentHeight: height
251
241
                opacity: headerContainer.clip || !headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout
252
242
                separatorSource: ""
253
 
                textColor: root.scopeStyle ? root.scopeStyle.headerForeground : "grey"
254
243
                property var styledItem: header
255
244
                property string title: root.title
256
245
                property var config: PageHeadConfiguration {
 
246
                    foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : "grey"
257
247
                    backAction: Action {
258
248
                        iconName: "back"
259
249
                        visible: root.showBackButton
304
294
        }
305
295
    }
306
296
 
 
297
    Row {
 
298
        spacing: units.gu(.5)
 
299
        Repeater {
 
300
            objectName: "paginationRepeater"
 
301
            model: root.paginationCount
 
302
            Image {
 
303
                objectName: "paginationDots_" + index
 
304
                height: units.gu(1)
 
305
                width: height
 
306
                source: (index == root.paginationIndex) ? "graphics/pagination_dot_on.png" : "graphics/pagination_dot_off.png"
 
307
            }
 
308
        }
 
309
        anchors {
 
310
            top: headerContainer.bottom
 
311
            horizontalCenter: headerContainer.horizontalCenter
 
312
            topMargin: units.gu(.5)
 
313
        }
 
314
    }
 
315
 
307
316
    Component {
308
317
        id: popoverComponent
309
318
        Popover {