Commit 9c3d0f2d authored by Nate Graham's avatar Nate Graham 🔩

Port widget settings window to QQC2+Kirigami FormLayout and modernize UI

Summary:
- Port to QQC2+Kirigami FormLayout style
- Use standard import names
- Adjust some strings to sound a bit more natural

Test Plan:
All features still work.
{F6817114}

The {nav Audio Volume} tab was already ported earlier and is not included in this patch

Reviewers: #vdg, #plasma, drosca

Reviewed By: drosca

Subscribers: abetts, plasma-devel

Tags: #plasma

Maniphest Tasks: T10586

Differential Revision: https://phabricator.kde.org/D21105
parent 2a3313b7
......@@ -18,79 +18,69 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.0
import QtQuick.Layouts 1.0
import QtQuick.Controls 1.0
import QtQuick 2.5
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.5 as QQC2
import org.kde.kirigami 2.5 as Kirigami
import org.kde.plasma.private.volume 0.1
Item {
Kirigami.FormLayout {
property alias cfg_maximumVolume: maximumVolume.value
property alias cfg_volumeStep: volumeStep.value
property alias cfg_volumeFeedback: volumeFeedback.checked
property alias cfg_outputChangeOsd: outputChangeOsd.checked
ColumnLayout {
Layout.fillWidth: true
GroupBox {
Layout.fillWidth: true
flat: true
title: i18n("Volume")
GridLayout {
columns: 2
Layout.fillWidth: true
Label {
Layout.alignment: Qt.AlignRight
text: i18n("Maximum volume:")
}
SpinBox {
id: maximumVolume
minimumValue: 100
maximumValue: 150
stepSize: 1
suffix: i18n("%")
}
Label {
Layout.alignment: Qt.AlignRight
text: i18n("Volume step:")
}
SpinBox {
id: volumeStep
minimumValue: 1
maximumValue: 100
stepSize: 1
suffix: i18n("%")
}
}
VolumeFeedback {
id: feedback
}
QQC2.SpinBox {
id: maximumVolume
Kirigami.FormData.label: i18n("Maximum volume:")
from: 100
to: 150
stepSize: 1
textFromValue: function(value) {
return value + "%";
}
}
QQC2.SpinBox {
id: volumeStep
implicitWidth: maximumVolume.width
Kirigami.FormData.label: i18n("Volume step:")
GroupBox {
Layout.fillWidth: true
flat: true
title: i18n("Behavior")
ColumnLayout {
CheckBox {
id: volumeFeedback
text: i18n("Volume feedback")
enabled: feedback.valid
}
CheckBox {
id: outputChangeOsd
text: i18n("Visual feedback when default output device changes")
}
}
from: 1
to: 100
stepSize: 1
textFromValue: function(value) {
return value + "%";
}
}
VolumeFeedback {
id: feedback
Item {
Kirigami.FormData.isSection: true
}
QQC2.CheckBox {
id: volumeFeedback
Kirigami.FormData.label: i18n("Provide visual feedback:")
text: i18n("When volume changes")
enabled: feedback.valid
}
QQC2.CheckBox {
id: outputChangeOsd
text: i18n("When default output device changes")
}
}
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