Changeset View
Changeset View
Standalone View
Standalone View
mobile/app/package/contents/ui/ThumbnailsBase.qml
Show All 12 Lines | |||||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public | 14 | * You should have received a copy of the GNU General Public | ||
15 | * License along with this program; if not, write to the | 15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.1 | 20 | import QtQuick 2.1 | ||
21 | import QtQuick.Controls 1.3 | 21 | import QtQuick.Controls 2.3 as QQC2 | ||
22 | import QtGraphicalEffects 1.0 | 22 | import QtGraphicalEffects 1.0 | ||
23 | import org.kde.okular 2.0 as Okular | 23 | import org.kde.okular 2.0 as Okular | ||
24 | import org.kde.kirigami 2.0 as Kirigami | 24 | import org.kde.kirigami 2.0 as Kirigami | ||
25 | 25 | | |||
26 | Kirigami.Page { | 26 | Kirigami.Page { | ||
27 | id: root | 27 | id: root | ||
28 | leftPadding: 0 | 28 | leftPadding: 0 | ||
29 | topPadding: 0 | 29 | topPadding: 0 | ||
30 | rightPadding: 0 | 30 | rightPadding: 0 | ||
31 | bottomPadding: 0 | 31 | bottomPadding: 0 | ||
32 | property alias resultsContentY: resultsGrid.contentY | 32 | property alias resultsContentY: resultsGrid.contentY | ||
33 | property alias resultsContentHeight: resultsGrid.contentHeight | 33 | property alias resultsContentHeight: resultsGrid.contentHeight | ||
34 | property alias model: resultsGrid.model | 34 | property alias model: resultsGrid.model | ||
35 | signal pageClicked(int pageNumber) | 35 | signal pageClicked(int pageNumber) | ||
36 | property Item view: resultsGrid | 36 | property Item view: resultsGrid | ||
37 | 37 | | |||
38 | ScrollView { | 38 | QQC2.ScrollView { | ||
39 | anchors { | 39 | anchors { | ||
40 | fill: parent | 40 | fill: parent | ||
41 | topMargin: Kirigami.Units.gridUnit * 2 | 41 | topMargin: Kirigami.Units.gridUnit * 2 | ||
42 | } | 42 | } | ||
43 | 43 | | |||
44 | Label { | 44 | QQC2.Label { | ||
45 | anchors.centerIn: parent | 45 | anchors.centerIn: parent | ||
46 | visible: model.length == 0 | 46 | visible: model.length == 0 | ||
47 | text: i18n("No results found.") | 47 | text: i18n("No results found.") | ||
48 | } | 48 | } | ||
49 | 49 | | |||
50 | GridView { | 50 | GridView { | ||
51 | id: resultsGrid | 51 | id: resultsGrid | ||
52 | anchors.fill: parent | 52 | anchors.fill: parent | ||
Show All 30 Lines | 81 | Rectangle { | |||
83 | height: childrenRect.height | 83 | height: childrenRect.height | ||
84 | color: Kirigami.Theme.backgroundColor | 84 | color: Kirigami.Theme.backgroundColor | ||
85 | radius: width | 85 | radius: width | ||
86 | smooth: true | 86 | smooth: true | ||
87 | anchors { | 87 | anchors { | ||
88 | bottom: parent.bottom | 88 | bottom: parent.bottom | ||
89 | right: parent.right | 89 | right: parent.right | ||
90 | } | 90 | } | ||
91 | Label { | 91 | QQC2.Label { | ||
92 | text: modelData + 1 | 92 | text: modelData + 1 | ||
93 | } | 93 | } | ||
94 | } | 94 | } | ||
95 | } | 95 | } | ||
96 | MouseArea { | 96 | MouseArea { | ||
97 | anchors.fill: parent | 97 | anchors.fill: parent | ||
98 | onClicked: { | 98 | onClicked: { | ||
99 | resultsGrid.currentIndex = index | 99 | resultsGrid.currentIndex = index | ||
Show All 23 Lines |