Warning, /multimedia/rattlesnake/components/BottomDrawer.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2023 Mathis BrĂ¼chert <mbb@kaidan.im>
0002 //
0003 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 
0005 import QtQuick 2.15
0006 import QtQuick.Controls 2.15 as Controls
0007 import org.kde.kirigami 2.19 as Kirigami
0008 import QtQuick.Layouts 1.15
0009 import org.kde.rattlesnake 1.0
0010 
0011 
0012 Controls.Drawer {
0013     id: root
0014     property alias drawerContentItem: control.contentItem
0015     property alias headerContentItem: headerContent.contentItem
0016 
0017 
0018     edge: Qt.BottomEdge
0019     height:contents.implicitHeight+20
0020     width: applicationWindow().width
0021     interactive: false
0022     background: Kirigami.ShadowedRectangle{
0023         corners.topRightRadius: 10
0024         corners.topLeftRadius: 10
0025         shadow.size: 20
0026         shadow.color: Qt.rgba(0, 0, 0, 0.5)
0027         color: Kirigami.Theme.backgroundColor
0028 
0029     }
0030     onAboutToShow: root.interactive = true
0031     onClosed: root.interactive = false
0032     ColumnLayout {
0033         spacing: 0
0034         id: contents
0035         anchors.fill: parent
0036         Kirigami.ShadowedRectangle{
0037                 visible: headerContentItem
0038                 height:header.implicitHeight/* +20*/
0039                 Layout.topMargin: 0
0040                 corners.topRightRadius: 10
0041                 corners.topLeftRadius: 10
0042                 Layout.bottomMargin: 0
0043                 Layout.fillWidth: true
0044                 Kirigami.Theme.colorSet: Kirigami.Theme.Header
0045                 color: Kirigami.Theme.backgroundColor
0046                 ColumnLayout{
0047                     spacing:0
0048                     anchors.fill: parent
0049                     id:header
0050                     clip: true
0051                     Rectangle {
0052                         Layout.margins: 5
0053                         radius:50
0054                         Layout.alignment: Qt.AlignHCenter
0055                         color: Kirigami.Theme.textColor
0056                         opacity: 0.5
0057                         width: 40
0058                         height: 4
0059 
0060                     }
0061                     Controls.Control {
0062                         topPadding: 0
0063                         leftPadding: 14
0064                         rightPadding: 14
0065                         bottomPadding: 14
0066                         Layout.fillHeight: true
0067                         Layout.fillWidth: true
0068                         id: headerContent
0069                     }
0070                 }
0071                 Kirigami.Separator{
0072                     anchors.bottom: parent.bottom
0073                     width: parent.width
0074                 }
0075             }
0076 
0077         Rectangle {
0078             Layout.margins: 5
0079             radius:50
0080             Layout.alignment: Qt.AlignHCenter
0081             color: Kirigami.Theme.textColor
0082             opacity: 0.5
0083             width: 40
0084             height: 4
0085             visible: !headerContentItem
0086         }
0087         Controls.Control {
0088             topPadding: 0
0089             leftPadding: 0
0090             rightPadding: 0
0091             bottomPadding: 0
0092             Layout.margins: 0
0093             Layout.fillHeight: true
0094             Layout.fillWidth: true
0095             id: control
0096         }
0097     }
0098 }