Warning, /plasma/latte-dock/plasmoid/package/contents/ui/taskslayout/ScrollPositioner.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2019 Michail Vourlakos <mvourlakos@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 import QtQuick 2.7
0008 
0009 import org.kde.plasma.plasmoid 2.0
0010 import org.kde.plasma.core 2.0 as PlasmaCore
0011 
0012 import org.kde.latte.core 0.2 as LatteCore
0013 
0014 Rectangle {
0015     id: listViewBase
0016     x: {
0017         if (!root.vertical) {
0018             if (root.alignment === LatteCore.Types.Center) {
0019                 //! this way we get a perfectly centered offset value
0020                 return (icList.width-1) / 2;
0021             } else if (root.alignment === LatteCore.Types.Left){
0022                 return 0;
0023             } else if (root.alignment === LatteCore.Types.Right){
0024                 //! this way we get a perfectly right aligned offset value
0025                 return (icList.width-1);
0026             }
0027         }
0028 
0029         return 0;
0030     }
0031 
0032     y: {
0033         if (root.vertical) {
0034             if (root.alignment === LatteCore.Types.Center) {
0035                 //! this way we get a perfectly centered offset value
0036                 return (icList.height-1) / 2;
0037             } else if (root.alignment === LatteCore.Types.Top){
0038                 return 0;
0039             } else if (root.alignment === LatteCore.Types.Bottom){
0040                 //! this way we get a perfectly bottom aligned offset value
0041                 return (icList.height-1);
0042             }
0043         }
0044 
0045         return 0;
0046     }
0047 
0048     width: !root.vertical ? 1 : scrollableList.width
0049     height: !root.vertical ? scrollableList.height : 1
0050 
0051     color: "transparent"
0052     border.width: 1
0053     border.color: "transparent" //"purple"
0054 }