Index: sources/gui/qml/pages/settings/SettingsRootSSHAccess.qml =================================================================== diff -u -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 -r5b9ff6266f7ca8ae9bbd5eace92d6454359791db --- sources/gui/qml/pages/settings/SettingsRootSSHAccess.qml (.../SettingsRootSSHAccess.qml) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) +++ sources/gui/qml/pages/settings/SettingsRootSSHAccess.qml (.../SettingsRootSSHAccess.qml) (revision 5b9ff6266f7ca8ae9bbd5eace92d6454359791db) @@ -28,7 +28,8 @@ SettingsBase { id: _root itemIndex : SettingsStack.RootSSHAccess - readonly property int diameter : 85 + readonly property int diameter : 85 + readonly property int rowWidth : 300 confirmVisible : false @@ -37,7 +38,7 @@ Row { id: _settingsRootSSHAccess_SSHDRow Text { id: _settingsRootSSHAccess_SSHDLabel text : qsTr("Enable SSH Login") - width : 300 + width : _root.rowWidth height : _settingsRootSSHAccess_SSHDSwitch.height color : Colors.white font.pixelSize : Fonts.fontPixelButton @@ -48,46 +49,45 @@ Switch { id: _settingsRootSSHAccess_SSHDSwitch property bool active : true - width : _root.diameter - height : _root.diameter - + width : Variables.switchWidth + height : Variables.switchHeight + indicator : Rectangle { - implicitWidth : Variables.sliderCircleDiameter * 1.7 + implicitWidth : Variables.sliderCircleDiameter * 2 implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) radius : implicitHeight anchors.centerIn : parent color : _settingsRootSSHAccess_SSHDSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive border.color : _settingsRootSSHAccess_SSHDSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive Rectangle { - property real diameter : Variables.sliderCircleDiameter x : _settingsRootSSHAccess_SSHDSwitch.checked ? parent.width - width : 0 anchors.verticalCenter : parent.verticalCenter - width : diameter - height : diameter - radius : diameter + width : Variables.sliderCircleDiameter + height : Variables.sliderCircleDiameter + radius : Variables.sliderCircleDiameter color : _settingsRootSSHAccess_SSHDSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive border { width : Variables.progressbarHandlerBorderWidth color : Colors.textMain } } } - contentItem : Text { width : parent.width height : parent.height font.pixelSize : Fonts.fontPixelButton color : _settingsRootSSHAccess_SSHDSwitch.active ? Colors.textMain : Colors.textDisableButton verticalAlignment : Text.AlignTop horizontalAlignment : Text.AlignHCenter + bottomPadding : 10 } } } Row { id: _settingsRootSSHAccess_RootRow Text { id: _settingsRootSSHAccess_RootLabel text : qsTr("Enable Root Login") - width : 300 + width : _root.rowWidth height : _settingsRootSSHAccess_RootSwitch.height color : Colors.white font.pixelSize : Fonts.fontPixelButton @@ -98,23 +98,23 @@ Switch { id: _settingsRootSSHAccess_RootSwitch property bool active : _settingsRootSSHAccess_SSHDSwitch.checked enabled : _settingsRootSSHAccess_RootSwitch.active - width : _root.diameter - height : _root.diameter + width : Variables.switchWidth + height : Variables.switchHeight + indicator : Rectangle { - implicitWidth : Variables.sliderCircleDiameter * 1.7 + implicitWidth : Variables.sliderCircleDiameter * 2 implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) radius : implicitHeight anchors.centerIn : parent color : _settingsRootSSHAccess_RootSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive border.color : _settingsRootSSHAccess_RootSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive Rectangle { - property real diameter : Variables.sliderCircleDiameter x : _settingsRootSSHAccess_RootSwitch.checked ? parent.width - width : 0 anchors.verticalCenter : parent.verticalCenter - width : diameter - height : diameter - radius : diameter + width : Variables.sliderCircleDiameter + height : Variables.sliderCircleDiameter + radius : Variables.sliderCircleDiameter color : _settingsRootSSHAccess_RootSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive border { width : Variables.progressbarHandlerBorderWidth @@ -130,6 +130,7 @@ color : _settingsRootSSHAccess_RootSwitch.active ? Colors.textMain : Colors.textDisableButton verticalAlignment : Text.AlignTop horizontalAlignment : Text.AlignHCenter + bottomPadding : 10 } } }