Warning, /maui/booth/src/widgets/views/SettingsDialog.qml is written in an unsupported language. File is not indexed.

0001 import QtQuick 2.14
0002 import QtQuick.Controls 2.14
0003 import QtQml 2.14
0004 import QtQuick.Layouts 1.3
0005 
0006 import org.kde.kirigami 2.7 as Kirigami
0007 import org.kde.mauikit 1.2 as Maui
0008 
0009 Maui.SettingsDialog
0010 {
0011     Maui.SettingsSection
0012     {
0013         title: i18n("Navigation")
0014         description: i18n("Configure the app plugins and behavior.")
0015 
0016         Maui.SettingTemplate
0017         {
0018             label1.text: i18n("Thumbnails")
0019             label2.text: i18n("Show previews of images, videos and PDF files")
0020             iconSource: "fileview-preview"
0021 
0022             Switch
0023             {
0024                 Layout.fillHeight: true
0025                 checkable: true
0026                 checked:  root.showThumbnails
0027                 onToggled:  root.showThumbnails = ! root.showThumbnails
0028             }
0029         }
0030 
0031         Maui.SettingTemplate
0032         {
0033             label1.text: i18n("Hidden Files")
0034             label2.text: i18n("List hidden files")
0035             iconSource: "view-hidden"
0036 
0037             Switch
0038             {
0039                 Layout.fillHeight: true
0040                 checkable: true
0041                 checked:  root.showHiddenFiles
0042                 onToggled:  root.showHiddenFiles = !root.showHiddenFiles
0043             }
0044         }
0045 
0046         Maui.SettingTemplate
0047         {
0048             label1.text:  i18n("Single Click")
0049             label2.text: i18n("Open files with a single or double click")
0050             iconSource: "hand"
0051 
0052             Switch
0053             {
0054                 Layout.fillHeight: true
0055                 checkable: true
0056                 checked:  root.singleClick
0057                 onToggled:
0058                 {
0059                     root.singleClick = !root.singleClick
0060                     Maui.FM.saveSettings("SINGLE_CLICK",  root.singleClick, "BROWSER")
0061                 }
0062             }
0063         }
0064 
0065         Maui.SettingTemplate
0066         {
0067             label1.text:  i18n("Save Session")
0068             label2.text: i18n("Save and restore tabs")
0069             iconSource: "system-save-session"
0070 
0071             Switch
0072             {
0073                 Layout.fillHeight: true
0074                 checkable: true
0075                 checked:  root.restoreSession
0076                 onToggled:
0077                 {
0078                     root.restoreSession = !root.restoreSession
0079                     Maui.FM.saveSettings("RESTORE_SESSION",  root.restoreSession, "BROWSER")
0080                 }
0081             }
0082         }
0083     }
0084 
0085     Maui.SettingsSection
0086     {
0087         title: i18n("Interface")
0088         description: i18n("Configure the app UI.")
0089         lastOne: true
0090 
0091         Maui.SettingTemplate
0092         {
0093             label1.text: i18n("Grid Size")
0094             label2.text: i18n("Thumbnails size in the grid view")
0095             iconSource: "view-list-icons"
0096 
0097             Maui.ToolActions
0098             {
0099                 id: _gridIconSizesGroup
0100                 expanded: true
0101                 autoExclusive: true
0102                 display: ToolButton.TextOnly
0103 
0104                 Binding on currentIndex
0105                 {
0106                     value:  switch(iconSize)
0107                             {
0108                             case 32: return 0;
0109                             case 48: return 1;
0110                             case 64: return 2;
0111                             case 96: return 3;
0112                             default: return -1;
0113                             }
0114                     restoreMode: Binding.RestoreValue
0115                 }
0116 
0117                 Action
0118                 {
0119                     text: i18n("S")
0120                     onTriggered: setIconSize(32)
0121                 }
0122 
0123                 Action
0124                 {
0125                     text: i18n("M")
0126                     onTriggered: setIconSize(48)
0127                 }
0128 
0129                 Action
0130                 {
0131                     text: i18n("X")
0132                     onTriggered: setIconSize(64)
0133                 }
0134 
0135                 Action
0136                 {
0137                     text: i18n("XL")
0138                     onTriggered: setIconSize(96)
0139                 }
0140             }
0141         }
0142 
0143         Maui.SettingTemplate
0144         {
0145             label1.text:  i18n("Sidebar always visible")
0146             label2.text: i18n("Keep sidebar on constrained spaces")
0147             iconSource: "view-split-left-right"
0148 
0149             Switch
0150             {
0151                 Layout.fillHeight: true
0152                 checkable: true
0153                 checked: placesSidebar.stick
0154                 onToggled:
0155                 {
0156                     placesSidebar.stick = !placesSidebar.stick
0157                     Maui.FM.saveSettings("STICK_SIDEBAR", placesSidebar.stick, "UI")
0158                 }
0159             }
0160         }
0161 
0162 //        Maui.SettingTemplate
0163 //        {
0164 //            label1.text: i18n("Translucent Sidebar")
0165 
0166 //            Switch
0167 //            {
0168 //                Layout.fillHeight: true
0169 //                checkable: true
0170 //                checked:  root.translucency
0171 //                enabled: Maui.Handy.isLinux
0172 //                onToggled:
0173 //                {
0174 //                    root.translucency = !root.translucency
0175 //                    Maui.FM.saveSettings("TRANSLUCENCY",  root.translucency, "UI")
0176 //                }
0177 //            }
0178 //        }
0179 
0180         Maui.SettingTemplate
0181         {
0182             label1.text: i18n("Dark Mode")
0183             enabled: false
0184             iconSource: "contrast"
0185 
0186             Switch
0187             {
0188                 Layout.fillHeight: true
0189             }
0190         }
0191     }
0192 }