Warning, /frameworks/qqc2-desktop-style/org.kde.desktop/Drawer.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2017 Marco Martin <mart@kde.org>
0003     SPDX-FileCopyrightText: 2017 The Qt Company Ltd.
0004 
0005     SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-or-later
0006 */
0007 
0008 
0009 import QtQuick
0010 import QtQuick.Controls
0011 import QtQuick.Templates as T
0012 import org.kde.kirigami as Kirigami
0013 
0014 T.Drawer {
0015     id: control
0016 
0017     z: Kirigami.OverlayZStacking.z
0018 
0019     parent: T.ApplicationWindow.overlay
0020 
0021     implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
0022                             contentWidth + leftPadding + rightPadding)
0023     implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
0024                              contentHeight + topPadding + bottomPadding)
0025 
0026     topPadding: edge === Qt.BottomEdge ? 1 : 0
0027     leftPadding: edge === Qt.RightEdge ? 1 : 0
0028     rightPadding: edge === Qt.LeftEdge ? 1 : 0
0029     bottomPadding: edge === Qt.TopEdge ? 1 : 0
0030 
0031     background: Rectangle {
0032         color: Kirigami.Theme.backgroundColor
0033         Kirigami.Separator {
0034             readonly property bool horizontal: control.edge === Qt.LeftEdge || control.edge === Qt.RightEdge
0035 
0036             width: horizontal ? 1 : parent.width
0037             height: horizontal ? parent.height : 1
0038             x: control.edge === Qt.LeftEdge ? parent.width - 1 : 0
0039             y: control.edge === Qt.TopEdge ? parent.height - 1 : 0
0040 
0041             Kirigami.Theme.inherit: false
0042             Kirigami.Theme.colorSet: Kirigami.Theme.Header
0043         }
0044     }
0045 
0046     enter: Transition {
0047         SmoothedAnimation {
0048             velocity: 5
0049         }
0050     }
0051     exit: Transition {
0052         SmoothedAnimation {
0053             velocity: 5
0054         }
0055     }
0056 }