mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
settings: removing unecessary wrappers
This commit is contained in:
@@ -103,24 +103,16 @@ ColumnLayout {
|
||||
onToggled: checked => root.valueShowPinnedApps = checked
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("bar.taskbar.icon-scale-label")
|
||||
description: I18n.tr("bar.taskbar.icon-scale-description")
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 0.5
|
||||
to: 1
|
||||
stepSize: 0.01
|
||||
value: root.valueIconScale
|
||||
onMoved: value => root.valueIconScale = value
|
||||
text: Math.round(root.valueIconScale * 100) + "%"
|
||||
}
|
||||
label: I18n.tr("bar.taskbar.icon-scale-label")
|
||||
description: I18n.tr("bar.taskbar.icon-scale-description")
|
||||
from: 0.5
|
||||
to: 1
|
||||
stepSize: 0.01
|
||||
value: root.valueIconScale
|
||||
onMoved: value => root.valueIconScale = value
|
||||
text: Math.round(root.valueIconScale * 100) + "%"
|
||||
}
|
||||
|
||||
NToggle {
|
||||
@@ -141,25 +133,17 @@ ColumnLayout {
|
||||
onToggled: checked => root.valueSmartWidth = checked
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
NValueSlider {
|
||||
visible: root.valueSmartWidth && !isVerticalBar
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("bar.taskbar.max-width-label")
|
||||
description: I18n.tr("bar.taskbar.max-width-description")
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 10
|
||||
to: 100
|
||||
stepSize: 5
|
||||
value: root.valueMaxTaskbarWidth
|
||||
onMoved: value => root.valueMaxTaskbarWidth = Math.round(value)
|
||||
text: Math.round(root.valueMaxTaskbarWidth) + "%"
|
||||
}
|
||||
label: I18n.tr("bar.taskbar.max-width-label")
|
||||
description: I18n.tr("bar.taskbar.max-width-description")
|
||||
from: 10
|
||||
to: 100
|
||||
stepSize: 5
|
||||
value: root.valueMaxTaskbarWidth
|
||||
onMoved: value => root.valueMaxTaskbarWidth = Math.round(value)
|
||||
text: Math.round(root.valueMaxTaskbarWidth) + "%"
|
||||
}
|
||||
|
||||
NTextInput {
|
||||
|
||||
@@ -108,23 +108,18 @@ ColumnLayout {
|
||||
onToggled: checked => Settings.data.bar.showCapsule = checked
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginXXS
|
||||
visible: Settings.data.bar.showCapsule
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.bar.appearance-capsule-opacity-label")
|
||||
description: I18n.tr("panels.bar.appearance-capsule-opacity-description")
|
||||
from: 0
|
||||
to: 1
|
||||
stepSize: 0.01
|
||||
value: Settings.data.bar.capsuleOpacity
|
||||
defaultValue: Settings.getDefaultValue("bar.capsuleOpacity")
|
||||
onMoved: value => Settings.data.bar.capsuleOpacity = value
|
||||
text: Math.floor(Settings.data.bar.capsuleOpacity * 100) + "%"
|
||||
}
|
||||
label: I18n.tr("panels.bar.appearance-capsule-opacity-label")
|
||||
description: I18n.tr("panels.bar.appearance-capsule-opacity-description")
|
||||
from: 0
|
||||
to: 1
|
||||
stepSize: 0.01
|
||||
value: Settings.data.bar.capsuleOpacity
|
||||
defaultValue: Settings.getDefaultValue("bar.capsuleOpacity")
|
||||
onMoved: value => Settings.data.bar.capsuleOpacity = value
|
||||
text: Math.floor(Settings.data.bar.capsuleOpacity * 100) + "%"
|
||||
}
|
||||
|
||||
NToggle {
|
||||
@@ -162,36 +157,28 @@ ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginL
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.bar.appearance-margins-vertical")
|
||||
from: 0
|
||||
to: 18
|
||||
stepSize: 1
|
||||
value: Settings.data.bar.marginVertical
|
||||
defaultValue: Settings.getDefaultValue("bar.marginVertical")
|
||||
onMoved: value => Settings.data.bar.marginVertical = value
|
||||
text: Settings.data.bar.marginVertical + "px"
|
||||
}
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.bar.appearance-margins-vertical")
|
||||
from: 0
|
||||
to: 18
|
||||
stepSize: 1
|
||||
value: Settings.data.bar.marginVertical
|
||||
defaultValue: Settings.getDefaultValue("bar.marginVertical")
|
||||
onMoved: value => Settings.data.bar.marginVertical = value
|
||||
text: Settings.data.bar.marginVertical + "px"
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.bar.appearance-margins-horizontal")
|
||||
from: 0
|
||||
to: 18
|
||||
stepSize: 1
|
||||
value: Settings.data.bar.marginHorizontal
|
||||
defaultValue: Settings.getDefaultValue("bar.marginHorizontal")
|
||||
onMoved: value => Settings.data.bar.marginHorizontal = value
|
||||
text: Settings.data.bar.marginHorizontal + "px"
|
||||
}
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.bar.appearance-margins-horizontal")
|
||||
from: 0
|
||||
to: 18
|
||||
stepSize: 1
|
||||
value: Settings.data.bar.marginHorizontal
|
||||
defaultValue: Settings.getDefaultValue("bar.marginHorizontal")
|
||||
onMoved: value => Settings.data.bar.marginHorizontal = value
|
||||
text: Settings.data.bar.marginHorizontal + "px"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,25 +51,17 @@ ColumnLayout {
|
||||
defaultValue: Settings.getDefaultValue("general.enableLockScreenCountdown")
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
NValueSlider {
|
||||
visible: Settings.data.general.showSessionButtonsOnLockScreen && Settings.data.general.enableLockScreenCountdown
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("panels.session-menu.countdown-duration-label")
|
||||
description: I18n.tr("panels.session-menu.countdown-duration-description")
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 1000
|
||||
to: 30000
|
||||
stepSize: 1000
|
||||
value: Settings.data.general.lockScreenCountdownDuration
|
||||
onMoved: value => Settings.data.general.lockScreenCountdownDuration = value
|
||||
text: Math.round(Settings.data.general.lockScreenCountdownDuration / 1000) + "s"
|
||||
defaultValue: Settings.getDefaultValue("general.lockScreenCountdownDuration")
|
||||
}
|
||||
label: I18n.tr("panels.session-menu.countdown-duration-label")
|
||||
description: I18n.tr("panels.session-menu.countdown-duration-description")
|
||||
from: 1000
|
||||
to: 30000
|
||||
stepSize: 1000
|
||||
value: Settings.data.general.lockScreenCountdownDuration
|
||||
onMoved: value => Settings.data.general.lockScreenCountdownDuration = value
|
||||
text: Math.round(Settings.data.general.lockScreenCountdownDuration / 1000) + "s"
|
||||
defaultValue: Settings.getDefaultValue("general.lockScreenCountdownDuration")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,23 +53,18 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
// Sound Volume
|
||||
ColumnLayout {
|
||||
NValueSlider {
|
||||
enabled: SoundService.multimediaAvailable && (Settings.data.notifications?.sounds?.enabled ?? false)
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.notifications.sounds-volume-label")
|
||||
description: I18n.tr("panels.notifications.sounds-volume-description")
|
||||
from: 0
|
||||
to: 1
|
||||
stepSize: 0.01
|
||||
value: Settings.data.notifications?.sounds?.volume ?? 0.5
|
||||
onMoved: value => Settings.data.notifications.sounds.volume = value
|
||||
text: Math.round((Settings.data.notifications?.sounds?.volume ?? 0.5) * 100) + "%"
|
||||
defaultValue: Settings.getDefaultValue("notifications.sounds.volume")
|
||||
}
|
||||
label: I18n.tr("panels.notifications.sounds-volume-label")
|
||||
description: I18n.tr("panels.notifications.sounds-volume-description")
|
||||
from: 0
|
||||
to: 1
|
||||
stepSize: 0.01
|
||||
value: Settings.data.notifications?.sounds?.volume ?? 0.5
|
||||
onMoved: value => Settings.data.notifications.sounds.volume = value
|
||||
text: Math.round((Settings.data.notifications?.sounds?.volume ?? 0.5) * 100) + "%"
|
||||
defaultValue: Settings.getDefaultValue("notifications.sounds.volume")
|
||||
}
|
||||
|
||||
// Separate Sounds Toggle
|
||||
|
||||
@@ -105,25 +105,17 @@ ColumnLayout {
|
||||
defaultValue: Settings.getDefaultValue("sessionMenu.enableCountdown")
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
NValueSlider {
|
||||
visible: Settings.data.sessionMenu.enableCountdown
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("panels.session-menu.countdown-duration-label")
|
||||
description: I18n.tr("panels.session-menu.countdown-duration-description")
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 1000
|
||||
to: 30000
|
||||
stepSize: 1000
|
||||
value: Settings.data.sessionMenu.countdownDuration
|
||||
onMoved: value => Settings.data.sessionMenu.countdownDuration = value
|
||||
text: Math.round(Settings.data.sessionMenu.countdownDuration / 1000) + "s"
|
||||
defaultValue: Settings.getDefaultValue("sessionMenu.countdownDuration")
|
||||
}
|
||||
label: I18n.tr("panels.session-menu.countdown-duration-label")
|
||||
description: I18n.tr("panels.session-menu.countdown-duration-description")
|
||||
from: 1000
|
||||
to: 30000
|
||||
stepSize: 1000
|
||||
value: Settings.data.sessionMenu.countdownDuration
|
||||
onMoved: value => Settings.data.sessionMenu.countdownDuration = value
|
||||
text: Math.round(Settings.data.sessionMenu.countdownDuration / 1000) + "s"
|
||||
defaultValue: Settings.getDefaultValue("sessionMenu.countdownDuration")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user