Changeset View
Changeset View
Standalone View
Standalone View
gemini/qml/welcomepages/WelcomePageRecent.qml
Show All 16 Lines | |||||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 | ||
20 | import org.calligra 1.0 | 20 | import org.calligra 1.0 | ||
21 | import "../components" | 21 | import "../components" | ||
22 | 22 | | |||
23 | Page { | 23 | Page { | ||
24 | id: base; | 24 | id: base; | ||
25 | objectName: "WelcomePageRecent"; | ||||
25 | GridView { | 26 | GridView { | ||
26 | id: docList; | 27 | id: docList; | ||
27 | clip: true; | | |||
28 | contentWidth: width; | 28 | contentWidth: width; | ||
29 | anchors { | 29 | anchors { | ||
30 | margins: Constants.DefaultMargin; | 30 | margins: Constants.DefaultMargin; | ||
31 | top: parent.top; | 31 | top: parent.top; | ||
32 | topMargin: Constants.DefaultMargin * 3; | ||||
32 | left: parent.left; | 33 | left: parent.left; | ||
33 | right: parent.right; | 34 | right: parent.right; | ||
34 | bottom: parent.bottom; | 35 | bottom: parent.bottom; | ||
35 | bottomMargin: 0; | 36 | bottomMargin: 0; | ||
36 | } | 37 | } | ||
37 | cellWidth: width / 4 - Constants.DefaultMargin; | 38 | cellWidth: width / 4 - Constants.DefaultMargin; | ||
38 | cellHeight: cellWidth + Settings.theme.font("templateLabel").pixelSize + Constants.DefaultMargin * 4; | 39 | cellHeight: cellWidth + Settings.theme.font("templateLabel").pixelSize + Constants.DefaultMargin * 4; | ||
39 | model: RecentFilesModel { recentFileManager: RecentFileManager; } | 40 | model: RecentFilesModel { recentFileManager: RecentFileManager; } | ||
Show All 9 Lines | 44 | Label { | |||
49 | color: "#5b6573"; | 50 | color: "#5b6573"; | ||
50 | visible: docList.count === 0; | 51 | visible: docList.count === 0; | ||
51 | } | 52 | } | ||
52 | Component { | 53 | Component { | ||
53 | id: documentTile; | 54 | id: documentTile; | ||
54 | Item { | 55 | Item { | ||
55 | width: docList.cellWidth; | 56 | width: docList.cellWidth; | ||
56 | height: docList.cellHeight | 57 | height: docList.cellHeight | ||
58 | Rectangle { | ||||
59 | x: documentImage.x - Constants.DefaultMargin + (documentImage.width - documentImage.paintedWidth) / 2; | ||||
60 | y: documentImage.y - Constants.DefaultMargin + (documentImage.height - documentImage.paintedHeight) / 2; | ||||
61 | width: documentImage.paintedWidth + Constants.DefaultMargin * 2; | ||||
62 | height: documentImage.paintedHeight + Constants.DefaultMargin * 2; | ||||
63 | border { | ||||
64 | color: "silver"; | ||||
65 | width: 1; | ||||
66 | } | ||||
67 | } | ||||
57 | Image { | 68 | Image { | ||
69 | id: documentImage; | ||||
58 | source: model.image; | 70 | source: model.image; | ||
59 | anchors { | 71 | anchors { | ||
60 | top: parent.top; | 72 | top: parent.top; | ||
61 | left: parent.left; | 73 | left: parent.left; | ||
62 | right: parent.right; | 74 | right: parent.right; | ||
63 | margins: Constants.DefaultMargin / 2; | 75 | margins: Constants.DefaultMargin / 2; | ||
64 | } | 76 | } | ||
65 | height: parent.width; | 77 | height: parent.width; | ||
Show All 30 Lines |