Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 26f77e2c authored by Marco Martin's avatar Marco Martin

Kirigami Pages are required for kcms

Summary:
adapt to the new multilevel stuff as it's needed for qml kcms to
inherit in some shape Kirigami.Page in order to have a title
this was the only kcm left which wasn't a page.
it needs this change with new frameworks and workspace combination
but old workspace and new frameworks is on as old systemsettings did the title itself

Test Plan: looks the same and still works

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: abetts, ngraham, davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D15121
parent 2ca95da7
......@@ -38,7 +38,7 @@ KCMPulseAudio::KCMPulseAudio(QObject *parent, const QVariantList &args)
: KQuickAddons::ConfigModule(parent, args)
{
KAboutData *aboutData = new KAboutData("kcm_pulseaudio",
i18nc("@title", "PulseAudio"),
i18nc("@title", "Configure the Audio Volume"),
global_s_versionStringFull,
QStringLiteral(""),
KAboutLicense::LicenseKey::GPL_V3,
......
......@@ -23,54 +23,56 @@ import QtQuick.Controls 1.3
import org.kde.kcm 1.0
import org.kde.plasma.core 2.0 as PlasmaCore /* for units.gridUnit */
import org.kde.kirigami 2.5 as Kirigami
import org.kde.plasma.private.volume 0.1
MouseArea {
Kirigami.Page {
title: kcm.name
property int wheelDelta: 0
property QtObject sinkModel: SinkModel { }
property QtObject sourceModel: SourceModel { }
ConfigModule.quickHelp: i18n("This module allows configuring the Pulseaudio sound subsystem.")
acceptedButtons: Qt.NoButton
implicitWidth: units.gridUnit * 30
implicitHeight: units.gridUnit * 30
ConfigModule.quickHelp: i18n("This module allows to set up the Pulseaudio sound subsystem.")
contentItem: MouseArea {
acceptedButtons: Qt.NoButton
implicitWidth: units.gridUnit * 30
implicitHeight: units.gridUnit * 30
onWheel: {
if (tabView.childAt(wheel.x, wheel.y).objectName != "tabbar") {
wheel.accepted = false;
return;
}
var delta = wheel.angleDelta.y || wheel.angleDelta.x;
wheelDelta += delta;
// Magic number 120 for common "one click"
// See: http://qt-project.org/doc/qt-5/qml-qtquick-wheelevent.html#angleDelta-prop
while (wheelDelta >= 120) {
wheelDelta -= 120;
tabView.currentIndex = Math.max(0, tabView.currentIndex - 1);
}
while (wheelDelta <= -120) {
wheelDelta += 120;
tabView.currentIndex = Math.min(tabView.count - 1, tabView.currentIndex + 1);
onWheel: {
if (tabView.childAt(wheel.x, wheel.y).objectName != "tabbar") {
wheel.accepted = false;
return;
}
var delta = wheel.angleDelta.y || wheel.angleDelta.x;
wheelDelta += delta;
// Magic number 120 for common "one click"
// See: http://qt-project.org/doc/qt-5/qml-qtquick-wheelevent.html#angleDelta-prop
while (wheelDelta >= 120) {
wheelDelta -= 120;
tabView.currentIndex = Math.max(0, tabView.currentIndex - 1);
}
while (wheelDelta <= -120) {
wheelDelta += 120;
tabView.currentIndex = Math.min(tabView.count - 1, tabView.currentIndex + 1);
}
}
}
TabView {
id: tabView
anchors.fill: parent
TabView {
id: tabView
anchors.fill: parent
Tab {
title: i18nc("@title:tab", "Devices")
Devices {}
}
Tab {
title: i18nc("@title:tab", "Applications")
Applications {}
}
Tab {
title: i18nc("@title:tab", "Advanced")
Advanced {}
Tab {
title: i18nc("@title:tab", "Devices")
Devices {}
}
Tab {
title: i18nc("@title:tab", "Applications")
Applications {}
}
Tab {
title: i18nc("@title:tab", "Advanced")
Advanced {}
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment