diff --git a/src/plasma/wallpapers/worldmap/contents/ui/config.qml b/src/plasma/wallpapers/worldmap/contents/ui/config.qml --- a/src/plasma/wallpapers/worldmap/contents/ui/config.qml +++ b/src/plasma/wallpapers/worldmap/contents/ui/config.qml @@ -17,10 +17,8 @@ import QtQuick 2.1 import QtQuick.Layouts 1.0 -import QtQuick.Controls 1.0 as QtControls - -// for "units" -import org.kde.plasma.core 2.0 as PlasmaCore +import QtQuick.Controls 2.0 as QtControls +import org.kde.kirigami 2.4 as Kirigami ColumnLayout { @@ -30,27 +28,13 @@ property int cfg_centerMode: wallpaper.configuration.centerMode // Enum needs manual set/get for now property alias cfg_fixedLongitude: longitudeSpinBox.value - // To allow aligned integration in the settings form, - // "formAlignment" is a property injected by the config containment - // which defines the offset of the value fields - readonly property int labelWidth: formAlignment - units.largeSpacing - - RowLayout { - spacing: units.largeSpacing / 2 + Kirigami.FormLayout { + twinFormLayouts: globalSettingsLayout + Layout.fillWidth: true - QtControls.Label { - Layout.minimumWidth: labelWidth - Layout.maximumWidth: labelWidth - horizontalAlignment: Text.AlignRight - anchors { - verticalCenter: projectionComboBox.verticalCenter - } - - // use i18nd, as textdomain otherwise would be defined by config containment - text: i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Projection:") - } QtControls.ComboBox { id: projectionComboBox + Kirigami.FormData.label: i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Projection:") model: [ i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Equirectangular"), i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Mercator") @@ -62,22 +46,10 @@ currentIndex = wallpaper.configuration.projection; } } - } - RowLayout { - spacing: units.largeSpacing / 2 - - QtControls.Label { - Layout.minimumWidth: labelWidth - Layout.maximumWidth: labelWidth - horizontalAlignment: Text.AlignRight - anchors { - verticalCenter: centerModeComboBox.verticalCenter - } - text: i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Center on:") - } QtControls.ComboBox { id: centerModeComboBox + Kirigami.FormData.label: i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Center on:") model: [ i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Daylight"), i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Longitude"), @@ -91,31 +63,17 @@ } } - } - RowLayout { - spacing: units.largeSpacing / 2 - - QtControls.Label { - Layout.minimumWidth: labelWidth - Layout.maximumWidth: labelWidth - horizontalAlignment: Text.AlignRight - anchors { - verticalCenter: longitudeSpinBox.verticalCenter - } - enabled: (cfg_centerMode === 1) - text: i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Longitude:") - } - QtControls.SpinBox { - enabled: (cfg_centerMode === 1) id: longitudeSpinBox - maximumValue: 180.0 - minimumValue: -180.0 - decimals: 5 + Kirigami.FormData.label: i18nd("plasma_wallpaper_org.kde.plasma.worldmap", "Longitude:") + from: -180 + to: 180 + enabled: (cfg_centerMode === 1) } } - Item { // tighten layout + Item { + Layout.fillWidth: true Layout.fillHeight: true } }