Warning, /plasma/kwin/src/kcms/decoration/ui/main.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2019 Valerio Pilo <vpilo@coldshock.net>
0003 SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
0004
0005 SPDX-License-Identifier: LGPL-2.0-only
0006 */
0007
0008 import QtQuick
0009 import QtQuick.Layouts
0010 import QtQuick.Controls as QQC2
0011
0012 import org.kde.kcmutils as KCM
0013 import org.kde.kirigami 2.20 as Kirigami
0014 import org.kde.newstuff as NewStuff
0015
0016 KCM.AbstractKCM {
0017 id: root
0018
0019 title: kcm.name
0020
0021 framedView: false
0022
0023 implicitWidth: Kirigami.Units.gridUnit * 48
0024 implicitHeight: Kirigami.Units.gridUnit * 33
0025
0026 actions: [
0027 Kirigami.Action {
0028 id: borderSizeComboBox
0029 text: i18nc("Selector label", "Window border size:")
0030
0031 displayComponent: RowLayout {
0032 QQC2.ComboBox {
0033 id: borderSizeComboBox
0034 currentIndex: kcm.borderIndex
0035 flat: true
0036 model: kcm.borderSizesModel
0037
0038 onActivated: kcm.borderIndex = currentIndex
0039
0040 KCM.SettingHighlighter {
0041 highlight: kcm.borderIndex !== 0
0042 }
0043 }
0044 }
0045 },
0046 Kirigami.Action {
0047 icon.name: "configure"
0048 text: i18nc("button text", "Configure Titlebar Buttons…")
0049
0050 onTriggered: kcm.push("ConfigureTitlebar.qml")
0051 },
0052 NewStuff.Action {
0053 configFile: "window-decorations.knsrc"
0054 text: i18nc("@action:button as in, \"Get New Window Decorations\"", "Get New…")
0055
0056 onEntryEvent: (entry, event) => {
0057 if (event === NewStuff.Engine.StatusChangedEvent) {
0058 kcm.reloadKWinSettings();
0059 } else if (event === NewStuff.Engine.EntryAdoptedEvent) {
0060 kcm.load();
0061 }
0062 }
0063 }
0064 ]
0065
0066 Themes {
0067 id: themes
0068 anchors.fill: parent
0069
0070 KCM.SettingStateBinding {
0071 configObject: kcm.settings
0072 settingName: "pluginName"
0073 target: themes
0074 }
0075 }
0076 }