mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Settings: re-organization
This commit is contained in:
@@ -21,8 +21,8 @@ ColumnLayout {
|
||||
|
||||
// Avatar preview
|
||||
NImageCircled {
|
||||
width: 108 * Style.uiScaleRatio
|
||||
height: 108 * Style.uiScaleRatio
|
||||
Layout.preferredWidth: 88 * Style.uiScaleRatio
|
||||
Layout.preferredHeight: width
|
||||
imagePath: Settings.preprocessPath(Settings.data.general.avatarImage)
|
||||
fallbackIcon: "person"
|
||||
borderColor: Color.mPrimary
|
||||
@@ -65,299 +65,6 @@ ColumnLayout {
|
||||
Layout.bottomMargin: Style.marginXL
|
||||
}
|
||||
|
||||
// User Interface
|
||||
ColumnLayout {
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NHeader {
|
||||
label: I18n.tr("settings.general.ui.section.label")
|
||||
description: I18n.tr("settings.general.ui.section.description")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("settings.general.ui.dim-desktop.label")
|
||||
description: I18n.tr("settings.general.ui.dim-desktop.description")
|
||||
checked: Settings.data.general.dimDesktop
|
||||
onToggled: checked => Settings.data.general.dimDesktop = checked
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("settings.general.ui.scaling.label")
|
||||
description: I18n.tr("settings.general.ui.scaling.description")
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 0.8
|
||||
to: 1.2
|
||||
stepSize: 0.1
|
||||
value: Settings.data.general.scaleRatio
|
||||
onMoved: value => Settings.data.general.scaleRatio = value
|
||||
text: Math.floor(Settings.data.general.scaleRatio * 100) + "%"
|
||||
}
|
||||
|
||||
// Reset button container
|
||||
Item {
|
||||
Layout.preferredWidth: 30 * Style.uiScaleRatio
|
||||
Layout.preferredHeight: 30 * Style.uiScaleRatio
|
||||
|
||||
NIconButton {
|
||||
icon: "refresh"
|
||||
baseSize: Style.baseWidgetSize * 0.8
|
||||
tooltipText: I18n.tr("settings.general.ui.scaling.reset-scaling")
|
||||
onClicked: Settings.data.general.scaleRatio = 1.0
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("settings.general.ui.tooltips.label")
|
||||
description: I18n.tr("settings.general.ui.tooltips.description")
|
||||
checked: Settings.data.ui.tooltipsEnabled
|
||||
onToggled: checked => Settings.data.ui.tooltipsEnabled = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("settings.general.ui.compact-lockscreen.label")
|
||||
description: I18n.tr("settings.general.ui.compact-lockscreen.description")
|
||||
checked: Settings.data.general.compactLockScreen
|
||||
onToggled: checked => Settings.data.general.compactLockScreen = checked
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("settings.general.ui.border-radius.label")
|
||||
description: I18n.tr("settings.general.ui.border-radius.description")
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 0
|
||||
to: 1
|
||||
stepSize: 0.01
|
||||
value: Settings.data.general.radiusRatio
|
||||
onMoved: value => Settings.data.general.radiusRatio = value
|
||||
text: Math.floor(Settings.data.general.radiusRatio * 100) + "%"
|
||||
}
|
||||
|
||||
// Reset button container
|
||||
Item {
|
||||
Layout.preferredWidth: 30 * Style.uiScaleRatio
|
||||
Layout.preferredHeight: 30 * Style.uiScaleRatio
|
||||
|
||||
NIconButton {
|
||||
icon: "refresh"
|
||||
baseSize: Style.baseWidgetSize * 0.8
|
||||
tooltipText: I18n.tr("settings.general.ui.border-radius.reset")
|
||||
onClicked: Settings.data.general.radiusRatio = 1.0
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Animation Speed
|
||||
ColumnLayout {
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("settings.general.ui.animation-disable.label")
|
||||
description: I18n.tr("settings.general.ui.animation-disable.description")
|
||||
checked: Settings.data.general.animationDisabled
|
||||
onToggled: checked => Settings.data.general.animationDisabled = checked
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
visible: !Settings.data.general.animationDisabled
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("settings.general.ui.animation-speed.label")
|
||||
description: I18n.tr("settings.general.ui.animation-speed.description")
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 0.1
|
||||
to: 2.0
|
||||
stepSize: 0.01
|
||||
value: Settings.data.general.animationSpeed
|
||||
onMoved: value => Settings.data.general.animationSpeed = value
|
||||
text: Math.round(Settings.data.general.animationSpeed * 100) + "%"
|
||||
}
|
||||
|
||||
// Reset button container
|
||||
Item {
|
||||
Layout.preferredWidth: 30 * Style.uiScaleRatio
|
||||
Layout.preferredHeight: 30 * Style.uiScaleRatio
|
||||
|
||||
NIconButton {
|
||||
icon: "refresh"
|
||||
baseSize: Style.baseWidgetSize * 0.8
|
||||
tooltipText: I18n.tr("settings.general.ui.animation-speed.reset")
|
||||
onClicked: Settings.data.general.animationSpeed = 1.0
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.marginXL
|
||||
Layout.bottomMargin: Style.marginXL
|
||||
}
|
||||
|
||||
// Dock
|
||||
ColumnLayout {
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NHeader {
|
||||
label: I18n.tr("settings.general.screen-corners.section.label")
|
||||
description: I18n.tr("settings.general.screen-corners.section.description")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("settings.general.screen-corners.show-corners.label")
|
||||
description: I18n.tr("settings.general.screen-corners.show-corners.description")
|
||||
checked: Settings.data.general.showScreenCorners
|
||||
onToggled: checked => Settings.data.general.showScreenCorners = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("settings.general.screen-corners.solid-black.label")
|
||||
description: I18n.tr("settings.general.screen-corners.solid-black.description")
|
||||
checked: Settings.data.general.forceBlackScreenCorners
|
||||
onToggled: checked => Settings.data.general.forceBlackScreenCorners = checked
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("settings.general.screen-corners.radius.label")
|
||||
description: I18n.tr("settings.general.screen-corners.radius.description")
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 0
|
||||
to: 2
|
||||
stepSize: 0.01
|
||||
value: Settings.data.general.screenRadiusRatio
|
||||
onMoved: value => Settings.data.general.screenRadiusRatio = value
|
||||
text: Math.floor(Settings.data.general.screenRadiusRatio * 100) + "%"
|
||||
}
|
||||
|
||||
// Reset button container
|
||||
Item {
|
||||
Layout.preferredWidth: 30 * Style.uiScaleRatio
|
||||
Layout.preferredHeight: 30 * Style.uiScaleRatio
|
||||
|
||||
NIconButton {
|
||||
icon: "refresh"
|
||||
baseSize: Style.baseWidgetSize * 0.8
|
||||
tooltipText: I18n.tr("settings.general.screen-corners.radius.reset")
|
||||
onClicked: Settings.data.general.screenRadiusRatio = 1.0
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.marginXL
|
||||
Layout.bottomMargin: Style.marginXL
|
||||
}
|
||||
|
||||
// Control Center
|
||||
ColumnLayout {
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NHeader {
|
||||
label: I18n.tr("settings.general.control-center.section.label")
|
||||
description: I18n.tr("settings.general.control-center.section.description")
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
id: controlCenterPosition
|
||||
label: I18n.tr("settings.general.control-center.position.label")
|
||||
description: I18n.tr("settings.general.control-center.position.description")
|
||||
Layout.fillWidth: true
|
||||
model: [{
|
||||
"key": "close_to_bar_button",
|
||||
"name": I18n.tr("options.control-center.position.close_to_bar_button")
|
||||
}, {
|
||||
"key": "top_left",
|
||||
"name": I18n.tr("options.control-center.position.top_left")
|
||||
}, {
|
||||
"key": "top_right",
|
||||
"name": I18n.tr("options.control-center.position.top_right")
|
||||
}, {
|
||||
"key": "bottom_left",
|
||||
"name": I18n.tr("options.control-center.position.bottom_left")
|
||||
}, {
|
||||
"key": "bottom_right",
|
||||
"name": I18n.tr("options.control-center.position.bottom_right")
|
||||
}, {
|
||||
"key": "bottom_center",
|
||||
"name": I18n.tr("options.control-center.position.bottom_center")
|
||||
}, {
|
||||
"key": "top_center",
|
||||
"name": I18n.tr("options.control-center.position.top_center")
|
||||
}]
|
||||
currentKey: Settings.data.controlCenter.position
|
||||
onSelected: function (key) {
|
||||
Settings.data.controlCenter.position = key
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.marginXL
|
||||
Layout.bottomMargin: Style.marginXL
|
||||
}
|
||||
|
||||
// Fonts
|
||||
ColumnLayout {
|
||||
spacing: Style.marginL
|
||||
@@ -476,4 +183,10 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.marginXL
|
||||
Layout.bottomMargin: Style.marginXL
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user