/*SPDX-FileCopyrightText: 2014 Weng Xuetian <wengxt@gmail.com>SPDX-License-Identifier: GPL-2.0-or-later*/import QtQuickimport QtQuick.Controls as QQC2import QtQuick.Dialogs as QtDialogsimport QtQuick.Layoutsimport org.kde.plasma.plasmoidimport org.kde.kirigami as Kirigamiimport org.kde.plasma.core as PlasmaCoreimport org.kde.kcmutils as KCMKCM.SimpleKCM {id: rootproperty bool cfg_vertical_lookup_tableproperty bool cfg_use_default_fontproperty font cfg_fontproperty bool cfg_scaleIconsToFitKirigami.FormLayout {QQC2.ButtonGroup { id: layoutRadioGroup }QQC2.ButtonGroup { id: scaleRadioGroup }QQC2.RadioButton {id: verticalLayoutRadioButtonKirigami.FormData.label: i18nc("@title:group for radiobuttons", "Input method list:")text: i18nc("@option:radio IM list orientation", "Vertical")checked: root.cfg_vertical_lookup_table == trueonToggled: root.cfg_vertical_lookup_table = checkedQQC2.ButtonGroup.group: layoutRadioGroup}QQC2.RadioButton {text: i18nc("@option:radio IM list orientation", "Horizontal")checked: root.cfg_vertical_lookup_table == falseonToggled: root.cfg_vertical_lookup_table = !checkedQQC2.ButtonGroup.group: layoutRadioGroup}RowLayout {Kirigami.FormData.label: i18nc("@title group font selection", "Font:")QQC2.CheckBox {id: useCustomFontchecked: !root.cfg_use_default_fontonClicked: root.cfg_use_default_font = !checkedtext: i18nc("@option:check use custom font", "Use custom:")}QQC2.TextField {enabled: useCustomFont.checkedreadOnly: truetext: i18nc("@info The selected font family (%1) and font size (%2)", "%1 %2 pt", font.family, font.pointSize)font: root.cfg_fontLayout.fillHeight: true}QQC2.Button {id: chooseFontButtonenabled: useCustomFont.checkedtext: i18nc("@action:button opens font dialog", "Choose Fontβ¦")display: QQC2.AbstractButton.IconOnlyicon.name: "document-edit"onClicked: fontDialog.open();QQC2.ToolTip {visible: chooseFontButton.hoveredtext: chooseFontButton.text}}}QQC2.RadioButton {Kirigami.FormData.label: i18nc("@title:group The arrangement of icons in the Panel", "Panel icon size:")text: i18nc("@option:radio panel icon size", "Small")checked: root.cfg_scaleIconsToFit == falseonToggled: root.cfg_scaleIconsToFit = !checkedQQC2.ButtonGroup.group: scaleRadioGroup}QQC2.RadioButton {id: automaticScaleRadioButtontext: Plasmoid.formFactor === PlasmaCore.Types.Horizontal? i18nc("@option:radio panel icon size", "Scale with Panel height"): i18nc("@option:radio panel icon size", "Scale with Panel width")checked: root.cfg_scaleIconsToFit == trueonToggled: root.cfg_scaleIconsToFit = checkedQQC2.ButtonGroup.group: scaleRadioGroup}QtDialogs.FontDialog {id: fontDialogtitle: i18nc("@title:window", "Select Font")selectedFont: !root.cfg_font || root.cfg_font.family === "" ? Kirigami.Theme.defaultFont : root.cfg_fontonAccepted: {root.cfg_font = selectedFont}}}}