mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
LockScreenTab: add AppearanceSubTab, reorganize things
This commit is contained in:
@@ -369,6 +369,7 @@
|
||||
"actions": "Actions",
|
||||
"add": "Add",
|
||||
"appearance": "Appearance",
|
||||
"behavior": "Behavior",
|
||||
"apply": "Apply",
|
||||
"automation": "Automation",
|
||||
"available": "Available",
|
||||
@@ -1280,7 +1281,7 @@
|
||||
"lock-screen-tint-strength-label": "Lock screen tint strength",
|
||||
"monitors-desc": "Show lock screen on specific monitors. Defaults to all if none are chosen.",
|
||||
"password-chars-description": "Cute icons used to hide your password.",
|
||||
"password-chars-label": "Hidden password icons",
|
||||
"password-chars-label": "Random password icons",
|
||||
"show-hibernate-description": "Show the option 'hibernate' in the power controls.",
|
||||
"show-hibernate-label": "Show hibernate",
|
||||
"show-session-buttons-description": "Allow access to power settings from the lock screen.",
|
||||
|
||||
@@ -1062,15 +1062,6 @@
|
||||
"subTab": 0,
|
||||
"subTabLabel": "common.appearance"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.lock-screen.lock-on-suspend-label",
|
||||
"descriptionKey": "panels.lock-screen.lock-on-suspend-description",
|
||||
"widget": "NToggle",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 0,
|
||||
"subTabLabel": "common.appearance"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.lock-screen.compact-lockscreen-label",
|
||||
"descriptionKey": "panels.lock-screen.compact-lockscreen-description",
|
||||
@@ -1089,60 +1080,6 @@
|
||||
"subTab": 0,
|
||||
"subTabLabel": "common.appearance"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.lock-screen.auto-start-auth-label",
|
||||
"descriptionKey": "panels.lock-screen.auto-start-auth-description",
|
||||
"widget": "NToggle",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 0,
|
||||
"subTabLabel": "common.appearance"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.lock-screen.allow-password-with-fprintd-label",
|
||||
"descriptionKey": "panels.lock-screen.allow-password-with-fprintd-description",
|
||||
"widget": "NToggle",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 0,
|
||||
"subTabLabel": "common.appearance"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.lock-screen.show-session-buttons-label",
|
||||
"descriptionKey": "panels.lock-screen.show-session-buttons-description",
|
||||
"widget": "NToggle",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 0,
|
||||
"subTabLabel": "common.appearance"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.lock-screen.show-hibernate-label",
|
||||
"descriptionKey": "panels.lock-screen.show-hibernate-description",
|
||||
"widget": "NToggle",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 0,
|
||||
"subTabLabel": "common.appearance"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.session-menu.enable-countdown-label",
|
||||
"descriptionKey": "panels.session-menu.enable-countdown-description",
|
||||
"widget": "NToggle",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 0,
|
||||
"subTabLabel": "common.appearance"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.session-menu.countdown-duration-label",
|
||||
"descriptionKey": "panels.session-menu.countdown-duration-description",
|
||||
"widget": "NValueSlider",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 0,
|
||||
"subTabLabel": "common.appearance"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.lock-screen.lock-screen-blur-strength-label",
|
||||
"descriptionKey": "panels.lock-screen.lock-screen-blur-strength-description",
|
||||
@@ -1161,6 +1098,69 @@
|
||||
"subTab": 0,
|
||||
"subTabLabel": "common.appearance"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.lock-screen.lock-on-suspend-label",
|
||||
"descriptionKey": "panels.lock-screen.lock-on-suspend-description",
|
||||
"widget": "NToggle",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 1,
|
||||
"subTabLabel": "common.behavior"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.lock-screen.auto-start-auth-label",
|
||||
"descriptionKey": "panels.lock-screen.auto-start-auth-description",
|
||||
"widget": "NToggle",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 1,
|
||||
"subTabLabel": "common.behavior"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.lock-screen.allow-password-with-fprintd-label",
|
||||
"descriptionKey": "panels.lock-screen.allow-password-with-fprintd-description",
|
||||
"widget": "NToggle",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 1,
|
||||
"subTabLabel": "common.behavior"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.lock-screen.show-session-buttons-label",
|
||||
"descriptionKey": "panels.lock-screen.show-session-buttons-description",
|
||||
"widget": "NToggle",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 1,
|
||||
"subTabLabel": "common.behavior"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.lock-screen.show-hibernate-label",
|
||||
"descriptionKey": "panels.lock-screen.show-hibernate-description",
|
||||
"widget": "NToggle",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 1,
|
||||
"subTabLabel": "common.behavior"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.session-menu.enable-countdown-label",
|
||||
"descriptionKey": "panels.session-menu.enable-countdown-description",
|
||||
"widget": "NToggle",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 1,
|
||||
"subTabLabel": "common.behavior"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.session-menu.countdown-duration-label",
|
||||
"descriptionKey": "panels.session-menu.countdown-duration-description",
|
||||
"widget": "NValueSlider",
|
||||
"tab": 11,
|
||||
"tabLabel": "panels.lock-screen.title",
|
||||
"subTab": 1,
|
||||
"subTabLabel": "common.behavior"
|
||||
},
|
||||
{
|
||||
"labelKey": "panels.notifications.duration-respect-expire-label",
|
||||
"descriptionKey": "panels.notifications.duration-respect-expire-description",
|
||||
|
||||
@@ -66,15 +66,6 @@ ColumnLayout {
|
||||
checked: Settings.data.general.passwordChars
|
||||
onToggled: checked => Settings.data.general.passwordChars = checked
|
||||
defaultValue: Settings.getDefaultValue("general.passwordChars")
|
||||
z: 10
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.lock-on-suspend-label")
|
||||
description: I18n.tr("panels.lock-screen.lock-on-suspend-description")
|
||||
checked: Settings.data.general.lockOnSuspend
|
||||
onToggled: checked => Settings.data.general.lockOnSuspend = checked
|
||||
defaultValue: Settings.getDefaultValue("general.lockOnSuspend")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
@@ -93,67 +84,6 @@ ColumnLayout {
|
||||
defaultValue: Settings.getDefaultValue("general.lockScreenAnimations")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.auto-start-auth-label")
|
||||
description: I18n.tr("panels.lock-screen.auto-start-auth-description")
|
||||
checked: Settings.data.general.autoStartAuth
|
||||
onToggled: checked => Settings.data.general.autoStartAuth = checked
|
||||
defaultValue: Settings.getDefaultValue("general.autoStartAuth")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.allow-password-with-fprintd-label")
|
||||
description: I18n.tr("panels.lock-screen.allow-password-with-fprintd-description")
|
||||
checked: Settings.data.general.allowPasswordWithFprintd
|
||||
onToggled: checked => Settings.data.general.allowPasswordWithFprintd = checked
|
||||
defaultValue: Settings.getDefaultValue("general.allowPasswordWithFprintd")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.show-session-buttons-label")
|
||||
description: I18n.tr("panels.lock-screen.show-session-buttons-description")
|
||||
checked: Settings.data.general.showSessionButtonsOnLockScreen
|
||||
onToggled: checked => Settings.data.general.showSessionButtonsOnLockScreen = checked
|
||||
defaultValue: Settings.getDefaultValue("general.showSessionButtonsOnLockScreen")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.show-hibernate-label")
|
||||
description: I18n.tr("panels.lock-screen.show-hibernate-description")
|
||||
checked: Settings.data.general.showHibernateOnLockScreen
|
||||
onToggled: checked => Settings.data.general.showHibernateOnLockScreen = checked
|
||||
visible: Settings.data.general.showSessionButtonsOnLockScreen
|
||||
defaultValue: Settings.getDefaultValue("general.showSessionButtonsOnLockScreen")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.session-menu.enable-countdown-label")
|
||||
description: I18n.tr("panels.session-menu.enable-countdown-description")
|
||||
checked: Settings.data.general.enableLockScreenCountdown
|
||||
onToggled: checked => Settings.data.general.enableLockScreenCountdown = checked
|
||||
visible: Settings.data.general.showSessionButtonsOnLockScreen
|
||||
defaultValue: Settings.getDefaultValue("general.enableLockScreenCountdown")
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
visible: Settings.data.general.showSessionButtonsOnLockScreen && Settings.data.general.enableLockScreenCountdown
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.session-menu.countdown-duration-label")
|
||||
description: I18n.tr("panels.session-menu.countdown-duration-description")
|
||||
from: 1000
|
||||
to: 30000
|
||||
stepSize: 1000
|
||||
showReset: true
|
||||
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")
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.lock-screen.lock-screen-blur-strength-label")
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import qs.Commons
|
||||
import qs.Widgets
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginL
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.lock-on-suspend-label")
|
||||
description: I18n.tr("panels.lock-screen.lock-on-suspend-description")
|
||||
checked: Settings.data.general.lockOnSuspend
|
||||
onToggled: checked => Settings.data.general.lockOnSuspend = checked
|
||||
defaultValue: Settings.getDefaultValue("general.lockOnSuspend")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.auto-start-auth-label")
|
||||
description: I18n.tr("panels.lock-screen.auto-start-auth-description")
|
||||
checked: Settings.data.general.autoStartAuth
|
||||
onToggled: checked => Settings.data.general.autoStartAuth = checked
|
||||
defaultValue: Settings.getDefaultValue("general.autoStartAuth")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.allow-password-with-fprintd-label")
|
||||
description: I18n.tr("panels.lock-screen.allow-password-with-fprintd-description")
|
||||
checked: Settings.data.general.allowPasswordWithFprintd
|
||||
onToggled: checked => Settings.data.general.allowPasswordWithFprintd = checked
|
||||
defaultValue: Settings.getDefaultValue("general.allowPasswordWithFprintd")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.show-session-buttons-label")
|
||||
description: I18n.tr("panels.lock-screen.show-session-buttons-description")
|
||||
checked: Settings.data.general.showSessionButtonsOnLockScreen
|
||||
onToggled: checked => Settings.data.general.showSessionButtonsOnLockScreen = checked
|
||||
defaultValue: Settings.getDefaultValue("general.showSessionButtonsOnLockScreen")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.show-hibernate-label")
|
||||
description: I18n.tr("panels.lock-screen.show-hibernate-description")
|
||||
checked: Settings.data.general.showHibernateOnLockScreen
|
||||
onToggled: checked => Settings.data.general.showHibernateOnLockScreen = checked
|
||||
visible: Settings.data.general.showSessionButtonsOnLockScreen
|
||||
defaultValue: Settings.getDefaultValue("general.showSessionButtonsOnLockScreen")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.session-menu.enable-countdown-label")
|
||||
description: I18n.tr("panels.session-menu.enable-countdown-description")
|
||||
checked: Settings.data.general.enableLockScreenCountdown
|
||||
onToggled: checked => Settings.data.general.enableLockScreenCountdown = checked
|
||||
visible: Settings.data.general.showSessionButtonsOnLockScreen
|
||||
defaultValue: Settings.getDefaultValue("general.enableLockScreenCountdown")
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
visible: Settings.data.general.showSessionButtonsOnLockScreen && Settings.data.general.enableLockScreenCountdown
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.session-menu.countdown-duration-label")
|
||||
description: I18n.tr("panels.session-menu.countdown-duration-description")
|
||||
from: 1000
|
||||
to: 30000
|
||||
stepSize: 1000
|
||||
showReset: true
|
||||
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")
|
||||
}
|
||||
}
|
||||
@@ -21,10 +21,15 @@ ColumnLayout {
|
||||
checked: subTabBar.currentIndex === 0
|
||||
}
|
||||
NTabButton {
|
||||
text: I18n.tr("common.monitors")
|
||||
text: I18n.tr("common.behavior")
|
||||
tabIndex: 1
|
||||
checked: subTabBar.currentIndex === 1
|
||||
}
|
||||
NTabButton {
|
||||
text: I18n.tr("common.monitors")
|
||||
tabIndex: 2
|
||||
checked: subTabBar.currentIndex === 2
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
@@ -37,6 +42,7 @@ ColumnLayout {
|
||||
currentIndex: subTabBar.currentIndex
|
||||
|
||||
AppearanceSubTab {}
|
||||
BehaviorSubTab {}
|
||||
MonitorsSubTab {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user