/*SPDX-FileCopyrightText: 2023 NiccolΓ² Venerandi <niccolo.venerandi@kde.org>SPDX-License-Identifier: GPL-2.0-or-later*/import QtQuickimport QtQuick.Layoutsimport QtQuick.Controls as QQC2import org.kde.plasma.core as PlasmaCoreimport org.kde.plasma.extras as PlasmaExtrasimport org.kde.kirigami as Kirigamiimport org.kde.plasma.components as PC3import org.kde.plasma.shellimport org.kde.kquickcontrolsimport "panelconfiguration"ColumnLayout {id: dialogRootspacing: Kirigami.Units.largeSpacing * 2LayoutMirroring.enabled: Application.layoutDirection === Qt.RightToLeftLayoutMirroring.childrenInherit: truesignal closeContextMenurequired property QtObject panelConfigurationproperty bool vertical: (panel.location === PlasmaCore.Types.LeftEdge || panel.location === PlasmaCore.Types.RightEdge)readonly property int headingLevel: 2property Item panelRuler: Ruler {id: rulerprefix: {switch (panel.location) {case PlasmaCore.Types.TopEdge:return "north"case PlasmaCore.Types.LeftEdge:return "west"case PlasmaCore.Types.RightEdge:return "east"case PlasmaCore.Types.BottomEdge:default:return "south"}}Item {activeFocusOnTab: trueonActiveFocusChanged: {if (activeFocus && dialogRoot.Window.window && dialogRoot.Window.window.visible) {dialogRoot.Window.window.requestActivate()}}}// This item is used to "pass" focus to the main window when we're at the last of the control of the rulerItem {parent: dialogRoot.parent // Used to not take space in the ColumnLayoutactiveFocusOnTab: trueonActiveFocusChanged: {let window = dialogRoot.Window.windowif (activeFocus && window && window.visible) {window.requestActivate()}}}}Connections {target: panelfunction onOffsetChanged() {ruler.offset = panel.offset}function onMinimumLengthChanged() {ruler.minimumLength = panel.minimumLength}function onMaximumLengthChanged() {ruler.maximumLength = panel.maximumLength}}Component.onCompleted: {if (panel.lengthMode === Panel.Custom) {Qt.callLater(()=> {panelConfiguration.panelRulerView.visible = true})}}PlasmaExtras.PlasmoidHeading {RowLayout {anchors.fill: parentspacing: Kirigami.Units.largeSpacingKirigami.Heading {Layout.leftMargin: Kirigami.Units.smallSpacingtext: i18ndc("plasma_shell_org.kde.plasma.desktop", "@title:window", "Panel Settings")textFormat: Text.PlainText}Item { Layout.fillWidth: true }PC3.ToolButton {id: addNewButtontext: i18ndc("plasma_shell_org.kde.plasma.desktop", "@action:button label of button to open a menu that lets you add widgets or spacers", "Add New")icon.name: "list-add-symbolic"down: addMenu.openedAccessible.role: Accessible.ButtonMenuonClicked: {if (addMenu.visible) {addMenu.dismiss();} else {addMenu.open();}}PC3.Menu {id: addMenuy: addNewButton.heightPC3.MenuItem {text: i18ndc("plasma_shell_org.kde.plasma.desktop", "@action:menu add a spacer", "Spacer")icon.name: "distribute-horizontal-x"onClicked: configDialog.addPanelSpacer()}PC3.MenuItem {text: i18ndc("plasma_shell_org.kde.plasma.desktop", "@action:menu add a margins separator", "Margins Separator")icon.name: "distribute-horizontal-margin"onClicked: configDialog.addPanelMarginsSeparator()}PC3.MenuItem {text: i18ndc("plasma_shell_org.kde.plasma.desktop", "@action:menu add a widget", "Widgetsβ¦")icon.name: "view-group-symbolic"onClicked: {configDialog.close()configDialog.showAddWidgetDialog()}}}}}}GridLayout {Layout.leftMargin: columnSpacingLayout.rightMargin: columnSpacingLayout.alignment: Qt.AlignHCenterLayout.minimumWidth: (positionRepresentation.implicitWidth + columnSpacing) * columns + columnSpacingrowSpacing: dialogRoot.spacingcolumnSpacing: Kirigami.Units.smallSpacingrows: 2columns: 3uniformCellWidths: trueColumnLayout {Layout.alignment: Qt.AlignHCenterspacing: Kirigami.Units.mediumSpacingKirigami.Heading {Layout.alignment: Qt.AlignHCenterlevel: dialogRoot.headingLeveltext: i18ndc("plasma_shell_org.kde.plasma.desktop", "@title:group", "Position")textFormat: Text.PlainText}PanelRepresentation {id: positionRepresentationtext: (panel.location === PlasmaCore.Types.TopEdge ? i18ndc("plasma_shell_org.kde.plasma.desktop", "@label panel screen edge", "Top") :panel.location === PlasmaCore.Types.RightEdge ? i18ndc("plasma_shell_org.kde.plasma.desktop", "@label panel screen edge", "Right") :panel.location === PlasmaCore.Types.LeftEdge ? i18ndc("plasma_shell_org.kde.plasma.desktop", "@label panel screen edge", "Left") :i18ndc("plasma_shell_org.kde.plasma.desktop", "@label panel screen edge", "Bottom"))Layout.alignment: Qt.AlignHCenteralignment: (panel.location === PlasmaCore.Types.TopEdge ? Qt.AlignHCenter | Qt.AlignTop :panel.location === PlasmaCore.Types.RightEdge ? Qt.AlignVCenter | Qt.AlignRight :panel.location === PlasmaCore.Types.LeftEdge ? Qt.AlignVCenter | Qt.AlignLeft :Qt.AlignHCenter | Qt.AlignBottom)isVertical: dialogRoot.verticalmainIconSource: (panel.location === PlasmaCore.Types.TopEdge ? "arrow-up" :panel.location === PlasmaCore.Types.RightEdge ? "arrow-right" :panel.location === PlasmaCore.Types.LeftEdge ? "arrow-left": "arrow-down")onClicked: {setPositionButton.checked = !setPositionButton.checkedsetPositionButton.forceActiveFocus()}}PC3.Button {id: setPositionButtonLayout.minimumHeight: transparencyBox.heightLayout.minimumWidth: positionRepresentation.widthLayout.alignment: Qt.AlignHCentertext: i18ndc("plasma_shell_org.kde.plasma.desktop", "action:button", "Set Positionβ¦")checkable: truefunction moveTo(newLocation: int, associatedWindow = null) {if (!setPositionButton.checked) {return;}panel.location = newLocation;if (associatedWindow !== null) {panel.moveToScreen(dialogRoot.panelConfiguration.screenFromWindow(associatedWindow));}setPositionButton.checked = false;}Keys.onLeftPressed: moveTo(PlasmaCore.Types.LeftEdge)Keys.onRightPressed: moveTo(PlasmaCore.Types.RightEdge)Keys.onUpPressed: moveTo(PlasmaCore.Types.TopEdge)Keys.onDownPressed: moveTo(PlasmaCore.Types.BottomEdge)}}ColumnLayout {Layout.alignment: Qt.AlignHCenterspacing: Kirigami.Units.mediumSpacingKirigami.Heading {Layout.alignment: Qt.AlignHCenterlevel: dialogRoot.headingLeveltext: i18ndc("plasma_shell_org.kde.plasma.desktop", "@title:group", "Alignment")textFormat: Text.PlainText}PanelRepresentation {id: alignmentRepresentationLayout.alignment: Qt.AlignHCentermainIconSource: {if (dialogRoot.vertical) {if (alignmentBox.previewIndex === 0) {return "align-vertical-top"} else if (alignmentBox.previewIndex === 1) {return "align-vertical-center"} else {return "align-vertical-bottom"}} else {if (alignmentBox.previewIndex === 0) {return "align-horizontal-left"} else if (alignmentBox.previewIndex === 1) {return "align-horizontal-center"} else {return "align-horizontal-right"}}}alignment: {let first, second;if (dialogRoot.vertical) {if (alignmentBox.previewIndex === 0) {first = Qt.AlignTop} else if (alignmentBox.previewIndex === 1) {first = Qt.AlignVCenter} else {first = Qt.AlignBottom}if (panel.location === PlasmaCore.Types.LeftEdge) {second = Qt.AlignLeft} else {second = Qt.AlignRight}} else {if (alignmentBox.previewIndex === 0) {first = Qt.AlignLeft} else if (alignmentBox.previewIndex === 1) {first = Qt.AlignHCenter} else {first = Qt.AlignRight}if (panel.location === PlasmaCore.Types.TopEdge) {second = Qt.AlignTop} else {second = Qt.AlignBottom}}return first | second;}onClicked: alignmentBox.popup.visible = trueisVertical: dialogRoot.vertical}PC3.ComboBox {id: alignmentBoxproperty int previewIndex: highlightedIndex > -1 ? highlightedIndex : currentIndexLayout.alignment: Qt.AlignHCenterLayout.minimumWidth: alignmentRepresentation.widthmodel: [dialogRoot.vertical ? i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox", "Top") : i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox", "Left"),i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox", "Center"),dialogRoot.vertical ? i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox", "Bottom") : i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox", "Right")]currentIndex: (panel.alignment === Qt.AlignLeft ? 0 :panel.alignment === Qt.AlignCenter ? 1 : 2)onActivated: (index) => {if (index === 0) {panel.alignment = Qt.AlignLeft} else if (index === 1) {panel.alignment = Qt.AlignCenter} else {panel.alignment = Qt.AlignRight}}}PC3.ComboBox {model: [alignmentBox.model.reduce((a, b) => a.length > b.length ? a : b)]Component.onCompleted: {parent.Layout.minimumWidth = implicitWidthdestroy()}}}ColumnLayout {Layout.alignment: Qt.AlignHCenterspacing: Kirigami.Units.mediumSpacingKirigami.Heading {level: dialogRoot.headingLevelLayout.alignment: Qt.AlignHCentertext: dialogRoot.vertical ? i18ndc("plasma_shell_org.kde.plasma.desktop", "@title:group panel height", "Height"): i18ndc("plasma_shell_org.kde.plasma.desktop", "@title:group panel width", "Width")textFormat: Text.PlainText}PanelRepresentation {id: lengthRepresentationLayout.alignment: Qt.AlignHCentermainIconSource: (widthBox.previewIndex === 1 ? "gnumeric-ungroup" :widthBox.previewIndex === 0 ? (dialogRoot.vertical ? "panel-fit-height" : "panel-fit-width") : "kdenlive-custom-effect")isVertical: dialogRoot.verticalalignment: positionRepresentation.alignmentfillAvailable: widthBox.previewIndex === 0onClicked: widthBox.popup.visible = true}PC3.ComboBox {id: widthBoxproperty int previewIndex: highlightedIndex > -1 ? highlightedIndex : currentIndexLayout.alignment: Qt.AlignHCenterLayout.minimumWidth: lengthRepresentation.widthmodel: [dialogRoot.vertical ? i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox panel fills the full height of the display", "Fill height") : i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox panel fills the full width of the display", "Fill width"),i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox panel is just big enough to fit its content", "Fit content"),i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox panel size", "Custom")]currentIndex: (panel.lengthMode === Panel.FillAvailable ? 0 :panel.lengthMode === Panel.FitContent ? 1 : 2)onActivated: (index) => {if (index === 0) {panel.lengthMode = Panel.FillAvailablepanelConfiguration.panelRulerView.visible = false} else if (index === 1) {panel.lengthMode = Panel.FitContentpanelConfiguration.panelRulerView.visible = false} else {panel.lengthMode = Panel.CustompanelConfiguration.panelRulerView.visible = true}}}PC3.ComboBox {model: [widthBox.model.reduce((a, b) => a.length > b.length ? a : b)]Component.onCompleted: {parent.Layout.minimumWidth = implicitWidthdestroy()}}}ColumnLayout {Layout.alignment: Qt.AlignHCenterspacing: Kirigami.Units.mediumSpacingKirigami.Heading {Layout.alignment: Qt.AlignTop | Qt.AlignHCenterlevel: dialogRoot.headingLeveltext: i18ndc("plasma_shell_org.kde.plasma.desktop", "@title:group", "Visibility")textFormat: Text.PlainText}PanelRepresentation {id: visibilityRepresentationLayout.alignment: Qt.AlignHCentersunkenPanel: autoHideBox.previewIndex == 1 || autoHideBox.previewIndex == 2onClicked: autoHideBox.popup.visible = truewindowVisible: truepanelReservesSpace: autoHideBox.previewIndex == 0isVertical: dialogRoot.verticalalignment: positionRepresentation.alignment}PC3.ComboBox {id: autoHideBoxproperty int previewIndex: popup.visible ? highlightedIndex : currentIndexmodel: [i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox", "Always visible"),i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox", "Auto hide"),i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox", "Dodge windows"),i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox", "Windows go below"),]onPreviewIndexChanged: {if (previewIndex == 0 || previewIndex == 3) {visibilityRepresentation.maximizeWindow()} else if (previewIndex == 1) {visibilityRepresentation.hidePanel()} else if (previewIndex == 2) {visibilityRepresentation.dodgePanel()}}Layout.alignment: Qt.AlignHCenterLayout.minimumWidth: visibilityRepresentation.widthcurrentIndex: {switch (panel.visibilityMode) {case Panel.AutoHide:return 1;case Panel.DodgeWindows:return 2;case Panel.WindowsGoBelow:return 3;case Panel.NormalPanel:default:return 0;}}onActivated: (index) => {switch (index) {case 1:panel.visibilityMode = Panel.AutoHide;break;case 2:panel.visibilityMode = Panel.DodgeWindows;break;case 3:panel.visibilityMode = Panel.WindowsGoBelow;break;case 0:default:panel.visibilityMode = Panel.NormalPanel;break;}}}PC3.ComboBox {model: [autoHideBox.model.reduce((a, b) => a.length > b.length ? a : b)]Component.onCompleted: {parent.Layout.minimumWidth = implicitWidthdestroy()}}}ColumnLayout {Layout.alignment: Qt.AlignHCenterspacing: Kirigami.Units.mediumSpacingRowLayout {Layout.alignment: Qt.AlignTop | Qt.AlignHCenterspacing: 0Kirigami.Heading {level: dialogRoot.headingLeveltext: i18ndc("plasma_shell_org.kde.plasma.desktop", "@title:group", "Opacity")textFormat: Text.PlainText}PlasmaExtras.ContextualHelpButton {visible: !panel.adaptiveOpacityEnabledtoolTipText: i18ndc("plasma_shell_org.kde.plasma.desktop", "@info:tooltip", "The current Plasma style does not support opacity options.")}}PanelRepresentation {id: opacityRepresentationLayout.alignment: Qt.AlignHCenteradaptivePanel: transparencyBox.previewIndex === 0translucentPanel: transparencyBox.previewIndex === 2onClicked: {if (panel.adaptiveOpacityEnabled) {transparencyBox.popup.visible = true}}isVertical: dialogRoot.verticalalignment: positionRepresentation.alignmentopacity: panel.adaptiveOpacityEnabled ? 1.0 : 0.75}PC3.ComboBox {id: transparencyBoxenabled: panel.adaptiveOpacityEnabledreadonly property int previewIndex: popup.visible ? highlightedIndex : currentIndexmodel: [i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox", "Adaptive"),i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox", "Opaque"),i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox", "Translucent")]Layout.alignment: Qt.AlignHCenterLayout.minimumWidth: opacityRepresentation.widthcurrentIndex: (panel.opacityMode === Panel.Adaptive ? 0 :panel.opacityMode === Panel.Opaque ? 1 : 2)onActivated: (index) => {if (index === 0) {panel.opacityMode = Panel.Adaptive} else if (index === 1) {panel.opacityMode = Panel.Opaque} else {panel.opacityMode = Panel.Translucent}}}PC3.ComboBox {model: [transparencyBox.model.reduce((a, b) => a.length > b.length ? a : b)]Component.onCompleted: {parent.Layout.minimumWidth = implicitWidthdestroy()}}}ColumnLayout {Layout.alignment: Qt.AlignHCenterspacing: Kirigami.Units.mediumSpacingKirigami.Heading {level: dialogRoot.headingLevelLayout.alignment: Qt.AlignTop | Qt.AlignHCentertext: i18ndc("plasma_shell_org.kde.plasma.desktop","@title:group Degree of floatingness of panel and applets", "Floating")textFormat: Text.PlainText}PanelRepresentation {Layout.alignment: Qt.AlignHCenterfloatingGap: Kirigami.Units.smallSpacing * (floatingBox.previewIndex === 2)onClicked: floatingBox.popup.visible = truevisibleApplet: truefloatingApplet: floatingBox.previewIndex !== 0isVertical: dialogRoot.verticalalignment: positionRepresentation.alignment}PC3.ComboBox {id: floatingBoxreadonly property int previewIndex: popup.visible ? highlightedIndex : currentIndexmodel: [i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox Option to disable floating panels or applets", "Disabled"),i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox Option to make only panel applets always float", "Applets only"),i18ndc("plasma_shell_org.kde.plasma.desktop", "@item:inlistbox Option to make panel and applets floating", "Panel and applets")]Layout.alignment: Qt.AlignHCenterLayout.minimumHeight: transparencyBox.heightLayout.minimumWidth: opacityRepresentation.widthcurrentIndex: (panel.floating ? 2 : panel.floatingApplets ? 1 : 0)onActivated: (index) => {if (index === 0) {panel.floating = panel.floatingApplets = false} else if (index === 1) {panel.floating = falsepanel.floatingApplets = true} else {panel.floating = true}}}}}Instantiator {id: dialogInstantiatoractive: setPositionButton.checked || clonePanelButton.checkedasynchronous: truemodel: Application.screensItem {width: 0height: 0required property var modelDatacomponent Indicator : PlasmaCore.Dialog {id: rootproperty string iconSourceproperty var onClickedLocationflags: Qt.WindowStaysOnTopHint | Qt.WindowDoesNotAcceptFocus | Qt.BypassWindowManagerHintlocation: PlasmaCore.Types.Floatingvisible: dialogInstantiator.active && (panel.location !== onClickedLocation || modelData.name !== panel.screenToFollow.name)x: modelData.virtualX + Kirigami.Units.largeSpacingy: modelData.virtualY + modelData.height / 2 - mainItem.height / 2 - margins.topmainItem: PC3.ToolButton {width: Kirigami.Units.iconSizes.enormousheight: Kirigami.Units.iconSizes.enormousicon.name: root.iconSourceonClicked: {if (setPositionButton.checked) {setPositionButton.moveTo(root.onClickedLocation, Window.window)} else if (clonePanelButton.checked) {panel.clonePanelTo(root.onClickedLocation, dialogRoot.panelConfiguration.screenFromWindow(Window.window))clonePanelButton.checked = false}}}}Indicator {x: modelData.virtualX + Kirigami.Units.largeSpacingy: modelData.virtualY + modelData.height / 2 - mainItem.height / 2 - margins.topiconSource: "arrow-left"onClickedLocation: PlasmaCore.Types.LeftEdge}Indicator {x: modelData.virtualX + modelData.width - Kirigami.Units.largeSpacing - margins.left - margins.right - mainItem.widthy: modelData.virtualY + modelData.height / 2 - mainItem.height / 2 - margins.topiconSource: "arrow-right"onClickedLocation: PlasmaCore.Types.RightEdge}Indicator {x: modelData.virtualX + modelData.width / 2 - mainItem.width / 2 - margins.lefty: modelData.virtualY + Kirigami.Units.largeSpacingiconSource: "arrow-up"onClickedLocation: PlasmaCore.Types.TopEdge}Indicator {x: modelData.virtualX + modelData.width / 2 - mainItem.width / 2 - margins.lefty: modelData.virtualY + modelData.height - mainItem.height - margins.top - margins.bottom - Kirigami.Units.largeSpacingiconSource: "arrow-down"onClickedLocation: PlasmaCore.Types.BottomEdge}}}GridLayout {Layout.alignment: Qt.AlignHCenterrowSpacing: Kirigami.Units.largeSpacingcolumnSpacing: Kirigami.Units.largeSpacingrows: 2columns: 2PC3.Label {id: spinBoxLabelLayout.alignment: Qt.AlignRightwrapMode: Text.Wraptext: panel.location === PlasmaCore.Types.LeftEdge || panel.location === PlasmaCore.Types.RightEdge? i18ndc("plasma_shell_org.kde.plasma.desktop", "@label:spinbox", "Panel Width:"): i18ndc("plasma_shell_org.kde.plasma.desktop", "@label:spinbox", "Panel Height:")textFormat: Text.PlainText}PC3.SpinBox {id: spinBoxeditable: truefocus: !Kirigami.InputMethod.willShowOnActivefrom: Math.max(20, panel.minThickness) // below this size, the panel is mostly unusableto: panel.location === PlasmaCore.Types.LeftEdge || panel.location === PlasmaCore.Types.RightEdge? panel.screenToFollow.geometry.width / 2: panel.screenToFollow.geometry.height / 2stepSize: 2value: panel.thicknessonValueModified: {panel.thickness = value}}PC3.Label {Layout.alignment: Qt.AlignRighttext: i18ndc("plasma_shell_org.kde.plasma.desktop", "@title:group shortcut that moves focus to the panel", "Focus shortcut:")textFormat: Text.PlainTextMouseArea {id: mouseAreaanchors.fill: parenthoverEnabled: true}PC3.ToolTip {text: i18ndc("plasma_shell_org.kde.plasma.desktop", "@info:tooltip", "Press this keyboard shortcut to move focus to the Panel")visible: mouseArea.containsMouse}}KeySequenceItem {id: buttonAccessible.name: i18ndc("plasma_shell_org.kde.plasma.desktop", "@action:button accessible name", "Focus Shortcut Setter")Accessible.description: i18ndc("plasma_shell_org.kde.plasma.desktop", "@info:whatsthis Accessible description for button", "Button to set the shortcut for the panel to gain focus")Accessible.onPressAction: startCapturing()patterns: ShortcutPattern.Modifier | ShortcutPattern.ModifierAndKeykeySequence: plasmoid.globalShortcutonCaptureFinished: {plasmoid.globalShortcut = button.keySequence}}}PlasmaExtras.PlasmoidHeading {position: PlasmaExtras.PlasmoidHeading.FooterLayout.topMargin: Kirigami.Units.smallSpacingtopPadding: Kirigami.Units.smallSpacing * 2leftPadding: Kirigami.Units.smallSpacingrightPadding: Kirigami.Units.smallSpacingbottomPadding: Kirigami.Units.smallSpacingLayout.fillWidth: trueRowLayout {anchors.verticalCenter: parent.verticalCenteranchors.left: parent.leftanchors.right: parent.rightspacing: Kirigami.Units.largeSpacingPC3.ToolButton {text: i18ndc("plasma_shell_org.kde.plasma.desktop", "@action:button Delete the panel", "Delete Panel")icon.name: "delete"PC3.ToolTip.text: i18ndc("plasma_shell_org.kde.plasma.desktop", "@info:tooltip for button", "Remove this panel; this action can be undone")PC3.ToolTip.delay: Kirigami.Units.toolTipDelayPC3.ToolTip.visible: hoveredonClicked: plasmoid.internalAction("remove").trigger()}PC3.ToolButton {id: clonePanelButtontext: i18ndc("plasma_shell_org.kde.plasma.desktop", "@action:button Clone the panel", "Clone Panel")icon.name: "edit-copy-symbolic"checkable: truePC3.ToolTip.text: i18ndc("plasma_shell_org.kde.plasma.desktop", "@info:tooltip for button", "Create a new panel with the same settings and applets")PC3.ToolTip.delay: Kirigami.Units.toolTipDelayPC3.ToolTip.visible: hovered}Item {Layout.fillWidth: true}PC3.ToolButton {text: plasmoid.corona.enteredEditModeViaDesktop() ? i18ndc("plasma_shell_org.kde.plasma.desktop", "@action:button Close the panel configuration window", "Close") : i18ndc("plasma_shell_org.kde.plasma.desktop", "@action:button Close the panel configuration window and exit edit mode", "Exit Edit Mode")icon.name: "dialog-ok-symbolic"PC3.ToolTip.text: i18ndc("plasma_shell_org.kde.plasma.desktop", "@info:tooltip for button", "Close Panel Settings window and exit Edit Mode")PC3.ToolTip.delay: Kirigami.Units.toolTipDelayPC3.ToolTip.visible: hoveredonClicked: plasmoid.internalAction("configure").trigger()}}}// This item is used to "pass" focus to the ruler with tab when we're at the last of the control of this windowItem {parent: dialogRoot.parent // Used to not take space in the ColumnLayoutactiveFocusOnTab: trueonActiveFocusChanged: {let window = ruler.Window.windowif (activeFocus && window && window.visible) {window.requestActivate()}}}}