Warning, /maui/shelf/src/views/library/Sidebar.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.15 0002 import QtQuick.Controls 2.15 0003 import Qt.labs.settings 1.0 0004 0005 import org.mauikit.controls 1.3 as Maui 0006 import org.mauikit.filebrowsing 1.3 as FB 0007 import QtQuick.Layouts 1.12 0008 0009 import org.maui.shelf 1.0 as Shelf 0010 0011 Loader 0012 { 0013 id: control 0014 asynchronous: true 0015 sourceComponent: Maui.ListBrowser 0016 { 0017 id: _listBrowser 0018 0019 model: Maui.BaseModel 0020 { 0021 list: Shelf.PlacesList 0022 { 0023 id: _placesList 0024 } 0025 } 0026 0027 delegate: Maui.ListDelegate 0028 { 0029 isCurrentItem: sources.indexOf(model.path) >= 0 0030 width: ListView.view.width 0031 label: model.tag 0032 iconSize: Maui.Style.iconSize 0033 iconName: model.icon + (Qt.platform.os == "android" || Qt.platform.os == "osx" ? ("-sidebar") : "") 0034 iconVisible: true 0035 template.isMask: iconSize <= Maui.Style.iconSizes.medium 0036 0037 onClicked: openFolders([model.path]) 0038 0039 } 0040 0041 section.property: "type" 0042 section.criteria: ViewSection.FullString 0043 section.delegate: Maui.LabelDelegate 0044 { 0045 width: ListView.view.width 0046 label: section 0047 isSection: true 0048 // height: Maui.Style.toolBarHeightAlt 0049 } 0050 0051 holder.visible: count === 0 0052 holder.title: i18n("Tags!") 0053 holder.body: i18n("Your tags will be listed here") 0054 0055 flickable.topMargin: Maui.Style.contentMargins 0056 flickable.bottomMargin: Maui.Style.contentMargins 0057 flickable.header: Loader 0058 { 0059 asynchronous: true 0060 width: parent.width 0061 visible: active 0062 0063 sourceComponent: Item 0064 { 0065 implicitHeight: _quickSection.implicitHeight 0066 0067 GridLayout 0068 { 0069 id: _quickSection 0070 width: Math.min(parent.width, 180) 0071 anchors.centerIn: parent 0072 rows: 3 0073 columns: 3 0074 columnSpacing: Maui.Style.defaultPadding 0075 rowSpacing: Maui.Style.defaultPadding 0076 0077 Repeater 0078 { 0079 model: _placesList.quickPlaces 0080 0081 delegate: Maui.GridBrowserDelegate 0082 { 0083 Layout.preferredHeight: Math.min(50, width) 0084 Layout.preferredWidth: 50 0085 Layout.fillWidth: true 0086 Layout.fillHeight: true 0087 Layout.columnSpan: (modelData.path === "collection:///" ? 3 : (modelData.path === "tags:///fav" ? 2 : 1)) 0088 isCurrentItem: sources.indexOf(modelData.path) >= 0 0089 iconSource: modelData.icon + (Qt.platform.os == "android" || Qt.platform.os == "osx" ? ("-sidebar") : "") 0090 iconSizeHint: Maui.Style.iconSize 0091 template.isMask: true 0092 label1.text: modelData.label 0093 labelsVisible: false 0094 tooltipText: modelData.label 0095 flat: false 0096 onClicked: 0097 { 0098 //[".cbz", ".cbr"] 0099 openFolders([modelData.path]) 0100 if(sideBar.collapsed) 0101 sideBar.close() 0102 } 0103 } 0104 0105 } 0106 } 0107 } 0108 } 0109 } 0110 }