Warning, /plasma-bigscreen/youtube-voice-application/ui/+mediacenter/views/TileView.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *  Copyright 2019 Aditya Mehra <aix.m@outlook.com>
0003  *  Copyright 2019 Marco Martin <mart@kde.org>
0004  *
0005  *  This program is free software; you can redistribute it and/or modify
0006  *  it under the terms of the GNU General Public License as published by
0007  *  the Free Software Foundation; either version 2 of the License, or
0008  *  (at your option) any later version.
0009  *
0010  *  This program is distributed in the hope that it will be useful,
0011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  *  GNU General Public License for more details.
0014  *
0015  *  You should have received a copy of the GNU General Public License
0016  *  along with this program; if not, write to the Free Software
0017  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  2.010-1301, USA.
0018  */
0019 
0020 import QtQuick 2.12
0021 import QtQuick.Layouts 1.4
0022 import QtQuick.Controls 2.4 as Controls
0023 import org.kde.plasma.components 3.0 as PlasmaComponents
0024 import org.kde.kirigami 2.5 as Kirigami
0025 
0026 
0027 GridView {
0028     id: view
0029     cellWidth: parent.width >= 1500 ? parent.width / 5 : parent.width / 3
0030     cellHeight: parent.width >= 1500 ? parent.height / 2 : parent.height / 3
0031     
0032     Layout.fillWidth: true
0033     Layout.fillHeight: true
0034     
0035     //z: activeFocus ? 10: 1
0036     keyNavigationEnabled: true
0037     highlightFollowsCurrentItem: true
0038     snapMode: ListView.SnapToItem
0039     cacheBuffer: width
0040     highlightMoveDuration: Kirigami.Units.longDuration
0041     
0042     PlasmaComponents.ScrollBar.vertical: PlasmaComponents.ScrollBar {
0043         id: scrollBar
0044         opacity: 0
0045         interactive: false
0046         onOpacityChanged: disappearTimer.restart()
0047         Timer {
0048             id: disappearTimer
0049             interval: 1000
0050             onTriggered: scrollBar.opacity = 0;
0051         }
0052         Behavior on opacity {
0053             OpacityAnimator {
0054                 duration: Kirigami.Units.longDuration
0055                 easing.type: Easing.InOutQuad
0056             }
0057         }
0058     }
0059     
0060     Behavior on y {
0061             NumberAnimation {
0062                 duration: Kirigami.Units.longDuration * 2
0063                 easing.type: Easing.InOutQuad
0064             }
0065     }
0066 
0067     move: Transition {
0068         SmoothedAnimation {
0069             property: "x"
0070             duration: Kirigami.Units.longDuration
0071         }
0072     }
0073 }