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 2.6 0010 import QtQuick.Controls 2.15 0011 import QtQuick.Templates 2.15 as T 0012 import org.kde.kirigami 2.4 as Kirigami 0013 0014 T.Drawer { 0015 id: control 0016 0017 parent: T.ApplicationWindow.overlay 0018 0019 implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, 0020 contentWidth + leftPadding + rightPadding) 0021 implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, 0022 contentHeight + topPadding + bottomPadding) 0023 0024 topPadding: control.edge === Qt.BottomEdge ? 1 : 0 0025 leftPadding: control.edge === Qt.RightEdge ? 1 : 0 0026 rightPadding: control.edge === Qt.LeftEdge ? 1 : 0 0027 bottomPadding: control.edge === Qt.TopEdge ? 1 : 0 0028 0029 background: Rectangle { 0030 color: Kirigami.Theme.backgroundColor 0031 Rectangle { 0032 readonly property bool horizontal: control.edge === Qt.LeftEdge || control.edge === Qt.RightEdge 0033 0034 width: horizontal ? 1 : parent.width 0035 height: horizontal ? parent.height : 1 0036 x: control.edge === Qt.LeftEdge ? parent.width - 1 : 0 0037 y: control.edge === Qt.TopEdge ? parent.height - 1 : 0 0038 0039 color: Kirigami.Theme.textColor 0040 opacity: 0.3 0041 } 0042 } 0043 0044 enter: Transition { 0045 SmoothedAnimation { 0046 velocity: 5 0047 } 0048 } 0049 exit: Transition { 0050 SmoothedAnimation { 0051 velocity: 5 0052 } 0053 } 0054 }