Warning, /plasma/plasma-bigscreen/tests/tilestest.qml is written in an unsupported language. File is not indexed.
0001
0002 import QtQuick 2.12
0003 import QtQuick.Layouts 1.4
0004 import QtQuick.Controls 2.12 as Controls
0005 import org.kde.kirigami 2.13 as Kirigami
0006 import org.kde.mycroft.bigscreen 1.0 as BigScreen
0007
0008 Image {
0009 id: image
0010 width: 900
0011 height: 600
0012 source: "https://source.unsplash.com/random"
0013
0014 GridView {
0015 id: view
0016 anchors.fill: parent
0017
0018 cellWidth: 300
0019 cellHeight: cellWidth/2
0020 model: ["desktop", "firefox", "vlc", "blender", "applications-games", "blinken", "adjustlevels", "cuttlefish", "calligrakrita", "folder-games", "applications-network", "applications-utilities", "view-left-close", "accessories-dictionary", "calligraflow", "multimedia-player", "calligraauthor"]
0021
0022 delegate: Item {
0023 id: delegate
0024 width: view.cellWidth
0025 height: view.cellHeight
0026 Rectangle {
0027 anchors {
0028 fill: parent
0029 margins: 10
0030 }
0031 radius: 5
0032 color: palette.dominantContrast
0033 Kirigami.ImageColors {
0034 id: palette
0035 source: modelData
0036 }
0037 RowLayout {
0038 anchors.fill: parent
0039
0040 Kirigami.Icon {
0041 id: icon
0042 Layout.preferredHeight: delegate.height * 0.8
0043 Layout.preferredWidth: Layout.preferredHeight
0044 Layout.leftMargin: y
0045 source: modelData
0046 }
0047 Kirigami.Heading {
0048 Layout.fillWidth: true
0049 horizontalAlignment: Text.AlignHCenter
0050 text: "Lorem"
0051 //color: 0.2126 * palette.suggestedContrast.r + 0.7152 * palette.suggestedContrast.g + 0.0722 * palette.suggestedContrast.b > 0.6 ? "black" : "white"
0052 color: useColors
0053 ? Kirigami.ColorUtils.brightness(palette.dominantContrast) === Kirigami.ColorUtils.Light ? imagePalette.closestToBlack : imagePalette.closestToWhite
0054 : Kirigami.Theme.textColor
0055 }
0056 }
0057 }
0058 }
0059 }
0060 }
0061