diff --git a/applets/systemtray/package/contents/config/config.qml b/applets/systemtray/package/contents/config/config.qml index 2ce4e73db..e6eeac327 100644 --- a/applets/systemtray/package/contents/config/config.qml +++ b/applets/systemtray/package/contents/config/config.qml @@ -1,30 +1,35 @@ /*************************************************************************** * Copyright 2013 by Sebastian Kügler * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * ***************************************************************************/ import QtQuick 2.0 import org.kde.plasma.configuration 2.0 ConfigModel { + ConfigCategory { + name: i18n("General") + icon: "plasma" + source: "ConfigGeneral.qml" + } ConfigCategory { name: i18n("Entries") icon: "preferences-desktop-notification" source: "ConfigEntries.qml" } } diff --git a/applets/systemtray/package/contents/config/main.xml b/applets/systemtray/package/contents/config/main.xml index e550afcfc..90c10719e 100644 --- a/applets/systemtray/package/contents/config/main.xml +++ b/applets/systemtray/package/contents/config/main.xml @@ -1,39 +1,47 @@ false + + + false + + + + true + 1 false diff --git a/applets/systemtray/package/contents/ui/ConfigGeneral.qml b/applets/systemtray/package/contents/ui/ConfigGeneral.qml new file mode 100644 index 000000000..d78c1a47a --- /dev/null +++ b/applets/systemtray/package/contents/ui/ConfigGeneral.qml @@ -0,0 +1,71 @@ +/*************************************************************************** + * Copyright (C) 2020 Konrad Materka * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +import QtQuick 2.14 +import QtQuick.Controls 2.14 as QtControls +import QtQuick.Layouts 1.14 as QtLayouts +import org.kde.kirigami 2.13 as Kirigami + +Item { + + property alias cfg_scaleWithPanel: scalesWithPanelRadio.checked + property alias cfg_maximumIconSize: maximumIconSizeRadio.checked + property alias cfg_iconSize: iconSizeComboBox.currentIndex + + Kirigami.FormLayout { + anchors.left: parent.left + anchors.right: parent.right + + QtLayouts.ColumnLayout { + Kirigami.FormData.label: i18n("Icon size:") + Kirigami.FormData.buddyFor: scalesWithPanelRadio + + QtControls.RadioButton { + id: scalesWithPanelRadio + text: i18n("Scales with panel") + + QtControls.ToolTip { + text: i18n("If set, icons will be scaled to fit panel.") + } + + onCheckedChanged: { + iconSizeComboBox.currentIndex = 5 + } + } + + QtControls.RadioButton { + id: maximumIconSizeRadio + text: i18n("Maximum icon size:") + QtControls.ToolTip { + text: i18n("If set, icons will remain smaller than the selected maximum icon size, arranged in rows or columns.") + } + } + + QtControls.ComboBox { + id: iconSizeComboBox + enabled: maximumIconSizeRadio.checked + + Kirigami.FormData.label: i18n("Maximum icon size:") + + model: [i18n("Very Small"), i18n("Small"), i18n("Medium"), i18n("Large"), i18n("Huge"), i18n("Enormous")] + } + } + } + +}