summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Martin <notmart@gmail.com>2016-05-13 15:52:49 (GMT)
committerMarco Martin <notmart@gmail.com>2016-05-13 15:52:49 (GMT)
commit3b34e223c8c55b99fdf88e6bca866a3fcba2cfc5 (patch)
tree84d1d71ed1181f83ac7293dccd5fc0b753b2848f
parent3c74f1acb0a59b0abc985c9390fad12d0bbd271f (diff)
adjust look of thumbnails
-rw-r--r--mobile/app/package/contents/ui/ThumbnailsBase.qml15
1 files changed, 12 insertions, 3 deletions
diff --git a/mobile/app/package/contents/ui/ThumbnailsBase.qml b/mobile/app/package/contents/ui/ThumbnailsBase.qml
index 28608f4..6abab9b 100644
--- a/mobile/app/package/contents/ui/ThumbnailsBase.qml
+++ b/mobile/app/package/contents/ui/ThumbnailsBase.qml
@@ -19,6 +19,7 @@
import QtQuick 2.1
import QtQuick.Controls 1.3
+import QtGraphicalEffects 1.0
import org.kde.okular 2.0 as Okular
import org.kde.kirigami 1.0 as Kirigami
@@ -44,8 +45,8 @@ Kirigami.Page {
id: resultsGrid
anchors.fill: parent
- cellWidth: width / Math.floor(width / (units.gridUnit * 5))
- cellHeight: cellWidth * 1.6
+ cellWidth: Math.floor(width / Math.floor(width / (Kirigami.Units.gridUnit * 8)))
+ cellHeight: Math.floor(cellWidth * 1.6)
delegate: Item {
id: delegate
@@ -68,7 +69,7 @@ Kirigami.Page {
y: Kirigami.Units.smallSpacing
document: documentItem
pageNumber: modelData
- width: delegate.width - Kirigami.Units.smallSpacing * 2 - units.gridUnit
+ width: delegate.width - Kirigami.Units.smallSpacing * 2 - Kirigami.Units.gridUnit
//value repeated to avoid binding loops
height: Math.round(width / (implicitWidth/implicitHeight))
Rectangle {
@@ -97,6 +98,14 @@ Kirigami.Page {
}
}
}
+ layer.enabled: true
+ layer.effect: DropShadow {
+ horizontalOffset: 0
+ verticalOffset: 0
+ radius: Math.ceil(Kirigami.Units.gridUnit * 0.8)
+ samples: 32
+ color: Qt.rgba(0, 0, 0, 0.5)
+ }
}
highlight: Rectangle {
color: Kirigami.Theme.highlightColor