Warning, /maui/mauikit/src/controls.5/SideBarView.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.15 0002 import QtQuick.Controls 2.15 0003 0004 import org.mauikit.controls 1.3 as Maui 0005 import "private" as Private 0006 0007 Item 0008 { 0009 id: control 0010 default property alias content : _content.data 0011 property alias sideBarContent: _sideBar.content 0012 property alias sideBar : _sideBar 0013 0014 Private.SideBar 0015 { 0016 id: _sideBar 0017 height: parent.height 0018 collapsed: control.width < (preferredWidth * 2.5) 0019 //preferredWidth : Math.min(control.width, Maui.Style.units.gridUnit * 12) 0020 } 0021 0022 Item 0023 { 0024 anchors.fill: parent 0025 clip: true 0026 transform: Translate 0027 { 0028 x: control.sideBar.collapsed ? control.sideBar.position * (control.sideBar.width) : 0 0029 } 0030 0031 anchors.leftMargin: control.sideBar.collapsed ? 0 : control.sideBar.width * control.sideBar.position 0032 0033 Item 0034 { 0035 id: _content 0036 anchors.fill: parent 0037 } 0038 0039 Loader 0040 { 0041 anchors.fill: parent 0042 active: _sideBar.collapsed && _sideBar.position === 1 0043 // asynchronous: true 0044 0045 sourceComponent: MouseArea 0046 { 0047 onClicked: _sideBar.close() 0048 0049 Rectangle 0050 { 0051 anchors.fill: parent 0052 color: "#333" 0053 opacity : visible ? 0.5 : 0 0054 0055 Behavior on opacity 0056 { 0057 NumberAnimation { 0058 duration: 500 0059 easing.type: Easing.InOutQuad 0060 } 0061 } 0062 } 0063 } 0064 } 0065 0066 } 0067 } 0068