~stolowski/+junk/unity-2d-no-results-hint

« back to all changes in this revision

Viewing changes to shell/dash/LensView.qml

  • Committer: Pawel Stolowski
  • Date: 2012-03-20 09:46:21 UTC
  • Revision ID: pawel.stolowski@canonical.com-20120320094621-z9ofq4yvwqtmc3e2
[dash] Display 'No results' hint when lens yield no data.
Support no-results-hint sent by unity lens, use predefined message if no hint is provided.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import QtQuick 1.0
20
20
import Unity2d 1.0
 
21
import "../common"
21
22
import "../common/utils.js" as Utils
22
23
 
23
24
FocusScope {
66
67
        dash.activateUriWithLens(model, uri, mimetype)
67
68
    }
68
69
 
 
70
    TextCustom {
 
71
            text: lensView.model != undefined ? lensView.model.noResultsHint : ""
 
72
            fontSize: "medium"
 
73
            color: "white"
 
74
            visible: lensView.model != undefined && lensView.model.noResultsHint != ""
 
75
            anchors.horizontalCenter: parent.horizontalCenter
 
76
            anchors.verticalCenter: parent.verticalCenter
 
77
    }
 
78
 
69
79
    ListViewWithScrollbar {
70
80
        id: results
71
81