~neon/plasmate/frameworks

« back to all changes in this revision

Viewing changes to plasmate/plugins/savesystemview/qml/CommitsView/CommitsView.qml

  • Committer: Giorgos Tsiapaliokas
  • Date: 2015-03-14 12:58:48 UTC
  • mfrom: (972.1.19)
  • Revision ID: git-v1:7b24cb2599e2bea0612cb492d2395bb6c44722ed
Merge branch 'review_savesystem_updated' into frameworks

REVIEW: 121206

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright 2014 Giorgos Tsiapaliokas <giorgos.tsiapaliokas@kde.org>
 
3
 
 
4
    This library is free software; you can redistribute it and/or
 
5
    modify it under the terms of the GNU Library General Public
 
6
    License as published by the Free Software Foundation; either
 
7
    version 2 of the License, or (at your option) any later version.
 
8
 
 
9
    This library is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
    Library General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU Library General Public License
 
15
    along with this library; see the file COPYING.LIB.  If not, write to
 
16
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
17
    Boston, MA 02110-1301, USA.
 
18
*/
 
19
 
 
20
import QtQuick 2.3
 
21
import QtQuick.Controls 1.2 as QtControls
 
22
import QtQuick.Layouts 1.1 as QtLayouts
 
23
 
 
24
QtControls.ScrollView {
 
25
    id: scrollView
 
26
    height: parent.height/2
 
27
    width: parent.width
 
28
 
 
29
    QtLayouts.RowLayout {
 
30
        id: row
 
31
        spacing: 10
 
32
        Branch {
 
33
            id: branch
 
34
            text: git.branchesModel.currentBranch
 
35
        }
 
36
 
 
37
        NewSavePoint {
 
38
            id: newSavePoint
 
39
        }
 
40
 
 
41
        Component {
 
42
            id: delegate
 
43
            Commit {
 
44
                text: message
 
45
                commitAuthor: author
 
46
                commitdate: CommitDate
 
47
            }
 
48
        }
 
49
 
 
50
        ListView {
 
51
            id: listView
 
52
            width: scrollView.width - branch.width - newSavePoint.width
 
53
            height: branch.height
 
54
            spacing: 10
 
55
            orientation: ListView.Horizontal
 
56
            model: git.commitsModel
 
57
            delegate: delegate
 
58
        }
 
59
    }
 
60
}
 
61