[appmenu] Port configuration window to QQC2 and Kirigami.FormLayout

Summary: This patch ports global menu's configuration window to QQC2 and Kirigami.FormLayout. It also changed the category icon to be consistent with other applets.

Test Plan:
Before:
{F6682666}

After:
{F6682667}

Reviewers: #plasma, #vdg, ngraham

Reviewed By: #vdg, ngraham

Subscribers: abetts, ngraham, plasma-devel

Tags: #plasma

Maniphest Tasks: T10586

Differential Revision: https://phabricator.kde.org/D19670
wilder-5.19
Filip Fila 7 years ago
parent 8f1b10b23a
commit 08feca1f68
  1. 2
      applets/appmenu/package/contents/config/config.qml
  2. 27
      applets/appmenu/package/contents/ui/configGeneral.qml

@ -26,7 +26,7 @@ import org.kde.plasma.configuration 2.0
ConfigModel { ConfigModel {
ConfigCategory { ConfigCategory {
name: i18n("Appearance") name: i18n("Appearance")
icon: "plasma" icon: "preferences-desktop-color"
source: "configGeneral.qml" source: "configGeneral.qml"
} }
} }

@ -19,40 +19,29 @@
**********************************************************************/ **********************************************************************/
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 1.0 as Controls import QtQuick.Controls 2.5
import QtQuick.Layouts 1.1 as Layouts
import org.kde.kirigami 2.5 as Kirigami
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
Layouts.ColumnLayout { Kirigami.FormLayout {
id: configGeneral anchors.left: parent.left
anchors.right: parent.right
property alias cfg_compactView: compactViewRadioButton.checked property alias cfg_compactView: compactViewRadioButton.checked
property bool disableSetting: plasmoid.formFactor === PlasmaCore.Types.Vertical property bool disableSetting: plasmoid.formFactor === PlasmaCore.Types.Vertical
Controls.ExclusiveGroup { RadioButton {
id: viewOptionGroup
}
Controls.RadioButton {
id: compactViewRadioButton id: compactViewRadioButton
enabled: !disableSetting enabled: !disableSetting
text: i18n("Use single button for application menu") text: i18n("Use single button for application menu")
exclusiveGroup: viewOptionGroup
} }
Controls.RadioButton {
RadioButton {
id: fullViewRadioButton id: fullViewRadioButton
//this checked binding is just for the initial load in case
//compactViewCheckBox is not checked. Then exclusive group manages it
enabled: !disableSetting enabled: !disableSetting
checked: !compactViewRadioButton.checked checked: !compactViewRadioButton.checked
text: i18n("Show full application menu") text: i18n("Show full application menu")
exclusiveGroup: viewOptionGroup
}
Item {
Layouts.Layout.fillHeight: true
} }
} }

Loading…
Cancel
Save