Warning, /plasma/latte-dock/plasmoid/package/contents/ui/config/ConfigAppearance.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_zoomHelper: zoomHelper.checked 0024 property alias cfg_zoomLevel: zoomLevel.value 0025 property alias cfg_showShadows: showShadows.checked 0026 property alias cfg_showGlow: showGlow.checked 0027 property alias cfg_iconSize: iconSizeCmb.realValue 0028 property alias cfg_threeColorsWindows: threeColorsWindows.checked 0029 property alias cfg_dotsOnActive: dotsOnActive.checked 0030 property alias cfg_durationTime : durationTime.value 0031 0032 property alias cfg_isInLatteDock: mainItem.isInLatteDock 0033 0034 property bool isInLatteDock 0035 0036 ColumnLayout { 0037 id:mainColumn 0038 spacing: 15 0039 width: parent.width-40 0040 0041 //Layout.fillWidth: true 0042 0043 GroupBox { 0044 title: "" 0045 flat: true 0046 Layout.fillWidth: true 0047 0048 ColumnLayout { 0049 Layout.fillWidth: true 0050 width: mainItem.width-40 0051 0052 RowLayout{ 0053 0054 Label { 0055 text: i18n("Maximum icon size: ") 0056 } 0057 0058 ComboBox { 0059 // 16, 22, 32, 48, 64,128, 256 0060 id: iconSizeCmb 0061 enabled: !mainItem.isInLatteDock 0062 0063 property int realValue 0064 property bool startup: true 0065 model: ["16px.", "22px.", "32px.", "48px.", "64px.", "96px", "128px.", "256px."] 0066 0067 onCurrentIndexChanged: { 0068 switch(currentIndex){ 0069 case 0: 0070 realValue = 16; 0071 break; 0072 case 1: 0073 realValue = 22; 0074 break; 0075 case 2: 0076 realValue = 32; 0077 break; 0078 case 3: 0079 realValue = 48; 0080 break; 0081 case 4: 0082 realValue = 64; 0083 break; 0084 case 5: 0085 realValue = 96; 0086 break; 0087 case 6: 0088 realValue = 128; 0089 break; 0090 case 7: 0091 realValue = 256; 0092 break; 0093 default: 0094 realValue = 64; 0095 break 0096 } 0097 } 0098 0099 onRealValueChanged: { 0100 if(startup){ 0101 switch (realValue){ 0102 case 16: 0103 currentIndex = 0; 0104 break; 0105 case 22: 0106 currentIndex = 1; 0107 break; 0108 case 32: 0109 currentIndex = 2; 0110 break; 0111 case 48: 0112 currentIndex = 3; 0113 break; 0114 case 64: 0115 currentIndex = 4; 0116 break; 0117 case 96: 0118 currentIndex = 5; 0119 break; 0120 case 128: 0121 currentIndex = 6; 0122 break; 0123 case 256: 0124 currentIndex = 7; 0125 break; 0126 default: 0127 currentIndex = 4; 0128 break 0129 } 0130 startup = false; 0131 } 0132 } 0133 } 0134 } 0135 0136 0137 CheckBox { 0138 id: showShadows 0139 text: i18n("Enable shadows for icons") 0140 enabled: true 0141 } 0142 0143 CheckBox { 0144 id: showGlow 0145 text: i18n("Show glow around windows points") 0146 enabled: true 0147 } 0148 0149 CheckBox { 0150 id: threeColorsWindows 0151 text: i18n("Different color for minimized windows") 0152 enabled: true 0153 } 0154 0155 CheckBox { 0156 id: dotsOnActive 0157 text: i18n("Indicator for active window group") 0158 enabled: true 0159 } 0160 } 0161 } 0162 0163 GridLayout{ 0164 id: animationsGridLayout 0165 Layout.fillWidth: true 0166 columns: 3 0167 0168 0169 Label { 0170 id: durationTimeLabel 0171 0172 Layout.alignment: Qt.AlignHCenter 0173 horizontalAlignment: Text.AlignHCenter 0174 0175 text: i18n("Animations: ") 0176 } 0177 0178 Slider { 0179 id: durationTime 0180 enabled: true 0181 Layout.fillWidth: true 0182 minimumValue: 0 0183 maximumValue: 3 0184 stepSize: 1 0185 tickmarksEnabled: true 0186 } 0187 Label { 0188 enabled: durationTime.value > 0 0189 Layout.alignment: Qt.AlignHCenter 0190 horizontalAlignment: Text.AlignHCenter 0191 font.italic: durationTime.value > 0 ? false : true 0192 0193 property string textUsed: durationTime.value > 0 ? i18n("duration") : i18n("disabled") 0194 0195 text: (durationTime.value > 0 ? ("x" + durationTime.value) + " " + textUsed : textUsed ) 0196 } 0197 0198 Label{Layout.columnSpan: 3} 0199 0200 Item{ 0201 enabled: !mainItem.isInLatteDock 0202 Layout.columnSpan: 3 0203 Layout.fillWidth: true 0204 Label { 0205 text: i18n("Zoom") 0206 anchors.centerIn: parent 0207 font.bold: true 0208 font.italic: true 0209 } 0210 } 0211 0212 ////// 0213 0214 Label { 0215 enabled: !mainItem.isInLatteDock 0216 Layout.alignment: Qt.AlignHCenter 0217 horizontalAlignment: Text.AlignHCenter 0218 0219 text: i18n("Level: ") 0220 } 0221 0222 Slider { 0223 id: zoomLevel 0224 enabled: !mainItem.isInLatteDock 0225 Layout.fillWidth: true 0226 minimumValue: 0 0227 maximumValue: 20 0228 stepSize: 1 0229 tickmarksEnabled: true 0230 } 0231 0232 Label { 0233 id:zoomLevelText 0234 enabled: !mainItem.isInLatteDock 0235 Layout.minimumWidth: metricsLabel2.width 0236 Layout.maximumWidth: metricsLabel2.width 0237 Layout.alignment: Qt.AlignHCenter 0238 horizontalAlignment: Text.AlignHCenter 0239 //Layout.alignment: Qt.AlignRight 0240 0241 0242 property real fixedZoom: (1 + (zoomLevel.value / 20)) 0243 text: "x"+ fixedZoom.toFixed(2) 0244 0245 Label{ 0246 id:metricsLabel2 0247 visible: false 0248 text: "x1.50" 0249 } 0250 } 0251 ///// 0252 //spacer to set a minimumWidth for sliders 0253 //Layout.minimumWidth didn't work 0254 Label{} 0255 // Label{Layout.maximumWidth: 275} 0256 Label{} 0257 0258 //////// 0259 0260 CheckBox { 0261 id: zoomHelper 0262 enabled: !mainItem.isInLatteDock 0263 text: i18n("Show a red line on the limit needed for animations") 0264 0265 Layout.columnSpan: 3 0266 } 0267 } 0268 } 0269 0270 DropShadow { 0271 id:shadowText 0272 anchors.fill: inLatteDockLabel 0273 fast: true 0274 enabled: isInLatteDock 0275 radius: 3 0276 samples: 5 0277 color: "#cc080808" 0278 source: inLatteDockLabel 0279 0280 verticalOffset: 2 0281 horizontalOffset: -1 0282 visible: isInLatteDock 0283 } 0284 0285 0286 Label { 0287 id:inLatteDockLabel 0288 anchors.horizontalCenter: mainItem.horizontalCenter 0289 anchors.bottom: mainColumn.bottom 0290 anchors.bottomMargin: mainColumn.height / 12 0291 // anchors.verticalCenterOffset: (mainColumn.height / 4) 0292 0293 width: 0.85 * mainItem.width 0294 text: i18n("For the disabled settings you should use the Latte Dock Configuration Window") 0295 visible: mainItem.isInLatteDock 0296 0297 horizontalAlignment: Text.AlignHCenter 0298 // font.bold: true 0299 font.italic: true 0300 font.pointSize: 1.2 * theme.defaultFont.pointSize 0301 0302 wrapMode: Text.WordWrap 0303 } 0304 }