Warning, /utilities/filelight/src/qml/SettingsPageAppearance.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0002 // SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org>
0003 
0004 import QtQuick 2.15
0005 import QtQuick.Layouts 1.15
0006 import QtQuick.Controls 2.15 as QQC2
0007 import org.kde.kirigami 2.19 as Kirigami
0008 
0009 import org.kde.filelight 1.0
0010 
0011 Kirigami.Page {
0012     ColumnLayout {
0013         width: parent.width
0014         QQC2.GroupBox {
0015             Layout.fillWidth: true
0016             title: i18nc("@title:group", "Color Scheme")
0017 
0018             QQC2.ButtonGroup {
0019                 buttons: [rainbowButton, systemButton, highContrastButton]
0020             }
0021 
0022             ColumnLayout {
0023                 QQC2.RadioButton {
0024                     id: rainbowButton
0025                     text: i18nc("@option:radio a color scheme variant", "Rainbow")
0026                     checked: Config.scheme === Filelight.Rainbow
0027                     onToggled: {
0028                         checked ? Config.scheme = Filelight.Rainbow : null
0029                         RadialMap.refresh(Filelight.Dirty.Colors)
0030                     }
0031                 }
0032                 QQC2.RadioButton {
0033                     id: systemButton
0034                     text: i18nc("@option:radio a color scheme variant", "System colors")
0035                     checked: Config.scheme === Filelight.KDE
0036                     onToggled: {
0037                         checked ? Config.scheme = Filelight.KDE : null
0038                         RadialMap.refresh(Filelight.Dirty.Colors)
0039                     }
0040                 }
0041                 QQC2.RadioButton {
0042                     id: highContrastButton
0043                     text: i18nc("@option:radio a color scheme variant", "High contrast")
0044                     checked: Config.scheme === Filelight.HighContrast
0045                     onToggled: {
0046                         checked ? Config.scheme = Filelight.HighContrast : null
0047                         RadialMap.refresh(Filelight.Dirty.Colors)
0048                     }
0049                 }
0050                 RowLayout {
0051                     QQC2.Label {
0052                         text: i18nc("@label:slider", "Contrast")
0053                     }
0054                     QQC2.Slider {
0055                         Layout.fillWidth: true
0056                         from: 0
0057                         to: 100
0058                         value: Config.contrast
0059                         onValueChanged: {
0060                             Config.contrast = value
0061                             RadialMap.refresh(Filelight.Dirty.Colors)
0062                         }
0063                     }
0064                 }
0065             }
0066         }
0067 
0068         QQC2.CheckBox {
0069             text: i18nc("@checkbox", "Show small files")
0070             checked: Config.showSmallFiles
0071             onToggled: {
0072                 Config.showSmallFiles = checked
0073                 RadialMap.refresh(Filelight.Dirty.Layout)
0074             }
0075         }
0076     }
0077 }