Warning, /plasma/kwin/src/kcms/decoration/ui/ConfigureTitlebar.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 
0015 KCM.AbstractKCM {
0016     title: i18n("Titlebar Buttons")
0017 
0018     framedView: false
0019 
0020     Rectangle {
0021         anchors.fill: parent
0022         Kirigami.Theme.inherit: false
0023         Kirigami.Theme.colorSet: Kirigami.Theme.View
0024         color: Kirigami.Theme.backgroundColor
0025 
0026         Buttons {
0027             anchors.fill: parent
0028             anchors.margins: Kirigami.Units.largeSpacing
0029         }
0030     }
0031 
0032     footer: ColumnLayout {
0033         QQC2.CheckBox {
0034             id: closeOnDoubleClickOnMenuCheckBox
0035             text: i18nc("checkbox label", "Close windows by double clicking the menu button")
0036             checked: kcm.settings.closeOnDoubleClickOnMenu
0037             onToggled: {
0038                 kcm.settings.closeOnDoubleClickOnMenu = checked;
0039                 infoLabel.visible = checked;
0040             }
0041 
0042             KCM.SettingStateBinding {
0043                 configObject: kcm.settings
0044                 settingName: "closeOnDoubleClickOnMenu"
0045             }
0046         }
0047 
0048         Kirigami.InlineMessage {
0049             Layout.fillWidth: true
0050             id: infoLabel
0051             type: Kirigami.MessageType.Information
0052             text: i18nc("popup tip", "Click and hold on the menu button to show the menu.")
0053             showCloseButton: true
0054             visible: false
0055         }
0056 
0057         QQC2.CheckBox {
0058             id: showToolTipsCheckBox
0059             text: i18nc("checkbox label", "Show titlebar button tooltips")
0060             checked: kcm.settings.showToolTips
0061             onToggled: kcm.settings.showToolTips = checked
0062 
0063             KCM.SettingStateBinding {
0064                 configObject: kcm.settings
0065                 settingName: "showToolTips"
0066             }
0067         }
0068     }
0069 }