Warning, /plasma/latte-dock/indicators/org.kde.latte.plasma/package/config/config.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2018 Michail Vourlakos <mvourlakos@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 import QtQuick 2.7
0007 import QtQuick.Controls 1.4
0008 import QtQuick.Layouts 1.3
0009 
0010 import org.kde.plasma.plasmoid 2.0
0011 import org.kde.plasma.core 2.0 as PlasmaCore
0012 import org.kde.plasma.components 2.0 as PlasmaComponents
0013 
0014 import org.kde.latte.components 1.0 as LatteComponents
0015 
0016 ColumnLayout {
0017     id: root
0018     Layout.fillWidth: true
0019 
0020     LatteComponents.SubHeader {
0021         text: i18n("Style")
0022     }
0023 
0024     RowLayout {
0025         Layout.fillWidth: true
0026         spacing: units.smallSpacing
0027 
0028         PlasmaComponents.Label {
0029             text: i18n("Padding")
0030             horizontalAlignment: Text.AlignLeft
0031         }
0032 
0033         LatteComponents.Slider {
0034             id: lengthIntMarginSlider
0035             Layout.fillWidth: true
0036 
0037             value: Math.round(indicator.configuration.lengthPadding * 100)
0038             from: 0
0039             to: maxMargin
0040             stepSize: 1
0041             wheelEnabled: false
0042 
0043             readonly property int maxMargin: 80
0044 
0045             onPressedChanged: {
0046                 if (!pressed) {
0047                     indicator.configuration.lengthPadding = value / 100;
0048                 }
0049             }
0050         }
0051 
0052         PlasmaComponents.Label {
0053             text: i18nc("number in percentage, e.g. 85 %","%1 %", currentValue)
0054             horizontalAlignment: Text.AlignRight
0055             Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
0056             Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4
0057 
0058             readonly property int currentValue: lengthIntMarginSlider.value
0059         }
0060     }
0061 
0062     RowLayout {
0063         Layout.fillWidth: true
0064         spacing: units.smallSpacing
0065 
0066         PlasmaComponents.Label {
0067             text: i18n("Corner Margin")
0068             horizontalAlignment: Text.AlignLeft
0069         }
0070 
0071         LatteComponents.Slider {
0072             id: backgroundCornerMarginSlider
0073             Layout.fillWidth: true
0074 
0075             value: Math.round(indicator.configuration.backgroundCornerMargin * 100)
0076             from: 0
0077             to: 100
0078             stepSize: 1
0079             wheelEnabled: false
0080 
0081             onPressedChanged: {
0082                 if (!pressed) {
0083                     indicator.configuration.backgroundCornerMargin = value / 100;
0084                 }
0085             }
0086         }
0087 
0088         PlasmaComponents.Label {
0089             text: i18nc("number in percentage, e.g. 85 %","%1 %", currentValue)
0090             horizontalAlignment: Text.AlignRight
0091             Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
0092             Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4
0093 
0094             readonly property int currentValue: backgroundCornerMarginSlider.value
0095         }
0096     }
0097 
0098     LatteComponents.SubHeader {
0099         text: i18n("Options")
0100     }
0101 
0102     LatteComponents.CheckBoxesColumn {
0103         Layout.topMargin: 1.5 * units.smallSpacing
0104 
0105        /* LatteComponents.CheckBox {
0106             Layout.maximumWidth: dialog.optionsWidth
0107             text: i18n("Reverse indicator style")
0108             value: indicator.configuration.reversed
0109 
0110             onClicked: {
0111                 indicator.configuration.reversed = !indicator.configuration.reversed;
0112             }
0113         }*/
0114 
0115         LatteComponents.CheckBox {
0116             Layout.maximumWidth: dialog.optionsWidth
0117             text: i18n("Growing circle animation when clicked")
0118             value: indicator.configuration.clickedAnimationEnabled
0119 
0120             onClicked: {
0121                 indicator.configuration.clickedAnimationEnabled = !indicator.configuration.clickedAnimationEnabled;
0122             }
0123         }
0124 
0125       /*  LatteComponents.CheckBox {
0126             Layout.maximumWidth: dialog.optionsWidth
0127             text: i18n("Show indicators for applets")
0128             tooltip: i18n("Indicators are shown for applets")
0129             value: indicator.configuration.enabledForApplets
0130 
0131             onClicked: {
0132                 indicator.configuration.enabledForApplets = !indicator.configuration.enabledForApplets;
0133             }
0134         }*/
0135     }
0136 }