Warning, /plasma/latte-dock/plasmoid/package/contents/ui/config/ConfigPanel.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2016 Smith AR <audoban@openmailbox.org>
0003 SPDX-FileCopyrightText: 2016 Michail Vourlakos <mvourlakos@gmail.com>
0004 SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006
0007 import QtQuick 2.0
0008 import QtQuick.Controls 1.0
0009 import QtQuick.Layouts 1.0
0010 import QtGraphicalEffects 1.0
0011
0012 import org.kde.plasma.core 2.0 as PlasmaCore
0013 import org.kde.plasma.components 2.0 as PlasmaComponents
0014
0015 Item {
0016 id: mainItem
0017
0018 width: childrenRect.width
0019 height: childrenRect.height
0020
0021 property bool vertical: (plasmoid.formFactor == PlasmaCore.Types.Vertical)
0022
0023 property alias cfg_showBarLine: showBarLine.checked
0024 property alias cfg_useThemePanel: useThemePanel.checked
0025 property alias cfg_panelSize: panelSize.value
0026 property alias cfg_transparentPanel: transparentPanel.checked
0027 property alias cfg_isInNowDockPanel: mainItem.isInNowDockPanel
0028
0029 property bool isInNowDockPanel
0030
0031 ColumnLayout {
0032
0033 id:mainColumn
0034 spacing: 15
0035 Layout.fillWidth: true
0036
0037 GridLayout{
0038 enabled: !mainItem.isInNowDockPanel
0039 Layout.fillWidth: true
0040 columns: 3
0041 property bool panelConfigEnabled: showBarLine.checked && useThemePanel.checked
0042
0043 Label{}
0044
0045 CheckBox {
0046 id: showBarLine
0047 Layout.columnSpan: 3
0048 text: i18n("Show bar line for tasks")
0049 enabled: true
0050 }
0051
0052 CheckBox {
0053 id: useThemePanel
0054 Layout.columnSpan: 3
0055 text: i18n("Use plasma theme panel")
0056 enabled: showBarLine.checked
0057 }
0058
0059 CheckBox {
0060 id: transparentPanel
0061 Layout.columnSpan: 3
0062 text: i18n("Use transparency in the panel")
0063 enabled: parent.panelConfigEnabled
0064 }
0065
0066
0067 Label {
0068 id: panelLabel
0069 text: i18n("Size: ")
0070 enabled: parent.panelConfigEnabled
0071 }
0072
0073 Slider {
0074 id: panelSize
0075 enabled: parent.panelConfigEnabled
0076 Layout.fillWidth: true
0077 minimumValue: 0
0078 maximumValue: 256
0079 stepSize: 2
0080 tickmarksEnabled: false
0081 }
0082
0083 Label {
0084 enabled: parent.panelConfigEnabled
0085 Layout.minimumWidth: metricsLabel.width
0086 Layout.maximumWidth: metricsLabel.width
0087 Layout.alignment: Qt.AlignRight
0088 horizontalAlignment: Text.AlignRight
0089
0090 text: ( panelSize.value + " px." )
0091
0092 Label{
0093 id:metricsLabel
0094 visible: false
0095 text: panelSize.maximumValue+" px."
0096 }
0097 }
0098
0099 /* Label{
0100 Layout.columnSpan: 3
0101 Layout.fillWidth: false
0102 Layout.alignment: Qt.AlignRight
0103 Layout.maximumWidth: zoomLevel.width + zoomLevelText.width + panelLabel.width
0104 horizontalAlignment: Text.AlignRight
0105 text: i18n("in panel placement, themes that have set a <b>specific</b> panel transparent work better")
0106 wrapMode: Text.WordWrap
0107 font.italic: true
0108 enabled: parent.panelConfigEnabled
0109 }*/
0110
0111 /////
0112 //spacer to set a minimumWidth for sliders
0113 //Layout.minimumWidth didn't work
0114 Label{}
0115 Label{Layout.minimumWidth: 280}
0116 Label{}
0117
0118 }
0119 }
0120
0121 DropShadow {
0122 id:shadowText
0123 anchors.fill: inNowDockLabel
0124 enabled: isInNowDockPanel
0125 fast: true
0126 radius: 3
0127 samples: 5
0128 color: "#cc080808"
0129 source: inNowDockLabel
0130
0131 verticalOffset: 2
0132 horizontalOffset: -1
0133 visible: isInNowDockPanel
0134 }
0135
0136
0137 Label {
0138 id:inNowDockLabel
0139 anchors.horizontalCenter: mainItem.horizontalCenter
0140 anchors.verticalCenter: mainColumn.verticalCenter
0141 // anchors.verticalCenterOffset: (mainColumn.height / 4)
0142
0143 width: 0.85 * mainItem.width
0144 text: i18n("For the disabled settings you should use the Latte Dock Configuration Window")
0145 visible: mainItem.isInNowDockPanel
0146
0147 horizontalAlignment: Text.AlignHCenter
0148 // font.bold: true
0149 font.italic: true
0150 font.pointSize: 1.2 * theme.defaultFont.pointSize
0151
0152 wrapMode: Text.WordWrap
0153 }
0154
0155 }