| 1 |
import QtQuick 2.4 |
| 2 |
import Lomiri.Components 1.3 |
| 3 |
import Lomiri.Components.Popups 1.3 |
| 4 |
|
| 5 |
import "../components" as Components |
| 6 |
|
| 7 |
Dialog { |
| 8 |
id: rootItem |
| 9 |
|
| 10 |
property var folderListModel |
| 11 |
|
| 12 |
__closeOnDismissAreaPress: true |
| 13 |
|
| 14 |
Component.onCompleted: { |
| 15 |
__foreground.itemSpacing = units.gu(0) |
| 16 |
} |
| 17 |
|
| 18 |
ListItem { |
| 19 |
ListItemLayout { |
| 20 |
anchors { left: parent.left; right: parent.right } |
| 21 |
anchors.leftMargin: units.gu(-2) |
| 22 |
anchors.rightMargin: units.gu(-2) |
| 23 |
|
| 24 |
subtitle.text: i18n.tr("Show Hidden Files") |
| 25 |
subtitle.textSize: Label.Medium |
| 26 |
|
| 27 |
Switch{ |
| 28 |
SlotsLayout.position: SlotsLayout.Last |
| 29 |
|
| 30 |
checked: globalSettings.showHidden |
| 31 |
onCheckedChanged: globalSettings.showHidden = checked |
| 32 |
} |
| 33 |
} |
| 34 |
} |
| 35 |
|
| 36 |
ListItem { |
| 37 |
ListItemLayout { |
| 38 |
anchors { left: parent.left; right: parent.right } |
| 39 |
anchors.leftMargin: units.gu(-2) |
| 40 |
anchors.rightMargin: units.gu(-2) |
| 41 |
|
| 42 |
subtitle.text: i18n.tr("Default open action") |
| 43 |
subtitle.textSize: Label.Medium |
| 44 |
|
| 45 |
Switch{ |
| 46 |
SlotsLayout.position: SlotsLayout.Last |
| 47 |
|
| 48 |
checked: globalSettings.openDefault |
| 49 |
onCheckedChanged: globalSettings.openDefault = checked |
| 50 |
} |
| 51 |
} |
| 52 |
} |
| 53 |
|
| 54 |
Components.HorizontalOptionSelector { |
| 55 |
subtitle: i18n.tr("View As") |
| 56 |
selectedIndex: globalSettings.viewMethod |
| 57 |
model: [ i18n.tr("List"), i18n.tr("Icons") ] |
| 58 |
onSelectedIndexChanged: globalSettings.viewMethod = selectedIndex |
| 59 |
} |
| 60 |
|
| 61 |
Components.HorizontalOptionSelector { |
| 62 |
subtitle: i18n.tr("Grid size") |
| 63 |
visible: globalSettings.viewMethod === 1 |
| 64 |
selectedIndex: globalSettings.gridSize |
| 65 |
model: [ i18n.tr("S"), i18n.tr("M"), i18n.tr("L"), i18n.tr("XL") ] |
| 66 |
onSelectedIndexChanged: globalSettings.gridSize = selectedIndex |
| 67 |
} |
| 68 |
|
| 69 |
Components.HorizontalOptionSelector { |
| 70 |
subtitle: i18n.tr("List size") |
| 71 |
visible: globalSettings.viewMethod === 0 |
| 72 |
selectedIndex: globalSettings.listSize |
| 73 |
model: [ i18n.tr("S"), i18n.tr("M"), i18n.tr("L"), i18n.tr("XL") ] |
| 74 |
onSelectedIndexChanged: globalSettings.listSize = selectedIndex |
| 75 |
} |
| 76 |
|
| 77 |
Components.HorizontalOptionSelector { |
| 78 |
subtitle: i18n.tr("Sort By") |
| 79 |
selectedIndex: globalSettings.sortBy |
| 80 |
model: [ i18n.tr("Name"), i18n.tr("Date"), i18n.tr("Size") ] |
| 81 |
onSelectedIndexChanged: globalSettings.sortBy = selectedIndex |
| 82 |
} |
| 83 |
|
| 84 |
Components.HorizontalOptionSelector { |
| 85 |
subtitle: i18n.tr("Sort Order") |
| 86 |
selectedIndex: globalSettings.sortOrder |
| 87 |
model: [ "A ➡ Z", "Z ➡ A" ] |
| 88 |
onSelectedIndexChanged: globalSettings.sortOrder = selectedIndex |
| 89 |
} |
| 90 |
|
| 91 |
Components.HorizontalOptionSelector { |
| 92 |
subtitle: i18n.tr("Theme") |
| 93 |
selectedIndex: globalSettings.theme |
| 94 |
model: [ i18n.tr("System"), i18n.tr("Light"), i18n.tr("Dark") ] |
| 95 |
onSelectedIndexChanged: globalSettings.theme = selectedIndex |
| 96 |
} |
| 97 |
|
| 98 |
ListItem { |
| 99 |
ListItemLayout { |
| 100 |
anchors { left: parent.left; right: parent.right } |
| 101 |
anchors.leftMargin: units.gu(-2) |
| 102 |
anchors.rightMargin: units.gu(-2) |
| 103 |
|
| 104 |
subtitle.text: i18n.tr("Full access authentication") |
| 105 |
subtitle.textSize: Label.Medium |
| 106 |
|
| 107 |
Switch { |
| 108 |
SlotsLayout.position: SlotsLayout.Last |
| 109 |
|
| 110 |
checked: globalSettings.requireAuthenticationForFullAccess |
| 111 |
onCheckedChanged: globalSettings.requireAuthenticationForFullAccess = checked |
| 112 |
} |
| 113 |
} |
| 114 |
} |
| 115 |
} |