~ubuntu-branches/ubuntu/vivid/muon/vivid-proposed

« back to all changes in this revision

Viewing changes to discover/qml/ReviewsPage.qml

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell, Harald Sitter, Jonathan Riddell
  • Date: 2015-01-15 01:33:55 UTC
  • mfrom: (1.4.31)
  • mto: This revision was merged to the branch mainline in revision 81.
  • Revision ID: package-import@ubuntu.com-20150115013355-3h99wieurdvo6z6q
Tags: 4:5.1.95-0ubuntu1
[ Harald Sitter ]
* New upstream release based on KDE Frameworks 5
* muon-installer is no more remove binary package and all references
* Drop all patches, they all came from upstream anyway
* Remove muon.1 it was wrong and is now outdated
* Fix lintian warnings and ignore all that are bogus or not worth
  fixing

[ Jonathan Riddell ]
* New upstream beta release

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
19
19
 ***************************************************************************/
20
20
 
21
 
import QtQuick 1.1
22
 
import org.kde.plasma.components 0.1
23
 
import org.kde.plasma.extras 0.1
 
21
import QtQuick 2.1
 
22
import QtQuick.Controls 1.1
24
23
import org.kde.muon 1.0
25
24
 
26
 
Page
27
 
{
 
25
ScrollView {
28
26
    id: page
29
27
    property alias model: reviewsView.model
30
28
    property real actualWidth: width-Math.pow(width/70, 2)
31
29
    property real proposedMargins: (width-actualWidth)/2
32
 
    
 
30
 
33
31
    ListView {
34
32
        id: reviewsView
35
 
        anchors {
36
 
            fill: parent
37
 
            rightMargin: scroll.width
38
 
        }
 
33
 
39
34
        clip: true
40
35
        visible: count>0
41
36
        spacing: 5
42
 
        
 
37
 
43
38
        delegate: ReviewDelegate {
44
39
            x: page.proposedMargins
45
40
            width: page.actualWidth
46
 
            onMarkUseful: reviewsModel.markUseful(index, useful)
47
 
        }
48
 
    }
49
 
    
50
 
    NativeScrollBar {
51
 
        id: scroll
52
 
        orientation: Qt.Vertical
53
 
        flickableItem: reviewsView
54
 
        anchors {
55
 
            top: reviewsView.top
56
 
            right: parent.right
57
 
            bottom: reviewsView.bottom
 
41
            onMarkUseful: page.model.markUseful(index, useful)
58
42
        }
59
43
    }
60
44
}