mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
Add lock screen layout settings (#981)
* Add lock screen layout settings * Update translation keys
This commit is contained in:
@@ -311,6 +311,12 @@ Singleton {
|
|||||||
property bool modalDarkenBackground: true
|
property bool modalDarkenBackground: true
|
||||||
|
|
||||||
property bool lockScreenShowPowerActions: true
|
property bool lockScreenShowPowerActions: true
|
||||||
|
property bool lockScreenShowSystemIcons: true
|
||||||
|
property bool lockScreenShowTime: true
|
||||||
|
property bool lockScreenShowDate: true
|
||||||
|
property bool lockScreenShowProfileImage: true
|
||||||
|
property bool lockScreenShowPasswordField: true
|
||||||
|
|
||||||
property bool enableFprint: false
|
property bool enableFprint: false
|
||||||
property int maxFprintTries: 15
|
property int maxFprintTries: 15
|
||||||
property bool fprintdAvailable: false
|
property bool fprintdAvailable: false
|
||||||
|
|||||||
@@ -210,6 +210,11 @@ var SPEC = {
|
|||||||
modalDarkenBackground: { def: true },
|
modalDarkenBackground: { def: true },
|
||||||
|
|
||||||
lockScreenShowPowerActions: { def: true },
|
lockScreenShowPowerActions: { def: true },
|
||||||
|
lockScreenShowSystemIcons: { def: true },
|
||||||
|
lockScreenShowTime: { def: true },
|
||||||
|
lockScreenShowDate: { def: true },
|
||||||
|
lockScreenShowProfileImage: { def: true },
|
||||||
|
lockScreenShowPasswordField: { def: true },
|
||||||
enableFprint: { def: false },
|
enableFprint: { def: false },
|
||||||
maxFprintTries: { def: 15 },
|
maxFprintTries: { def: 15 },
|
||||||
fprintdAvailable: { def: false, persist: false },
|
fprintdAvailable: { def: false, persist: false },
|
||||||
|
|||||||
@@ -216,6 +216,7 @@ Item {
|
|||||||
anchors.verticalCenterOffset: -100
|
anchors.verticalCenterOffset: -100
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 140
|
height: 140
|
||||||
|
visible: SettingsData.lockScreenShowTime
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: clockText
|
id: clockText
|
||||||
@@ -331,6 +332,7 @@ Item {
|
|||||||
StyledText {
|
StyledText {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
anchors.verticalCenterOffset: -25
|
anchors.verticalCenterOffset: -25
|
||||||
|
visible: SettingsData.lockScreenShowDate
|
||||||
text: {
|
text: {
|
||||||
if (SettingsData.lockDateFormat && SettingsData.lockDateFormat.length > 0) {
|
if (SettingsData.lockDateFormat && SettingsData.lockDateFormat.length > 0) {
|
||||||
return systemClock.date.toLocaleDateString(Qt.locale(), SettingsData.lockDateFormat);
|
return systemClock.date.toLocaleDateString(Qt.locale(), SettingsData.lockDateFormat);
|
||||||
@@ -368,6 +370,7 @@ Item {
|
|||||||
return PortalService.profileImage;
|
return PortalService.profileImage;
|
||||||
}
|
}
|
||||||
fallbackIcon: "person"
|
fallbackIcon: "person"
|
||||||
|
visible: SettingsData.lockScreenShowProfileImage
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -379,6 +382,8 @@ Item {
|
|||||||
color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.9)
|
color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.9)
|
||||||
border.color: passwordField.activeFocus ? Theme.primary : Qt.rgba(1, 1, 1, 0.3)
|
border.color: passwordField.activeFocus ? Theme.primary : Qt.rgba(1, 1, 1, 0.3)
|
||||||
border.width: passwordField.activeFocus ? 2 : 1
|
border.width: passwordField.activeFocus ? 2 : 1
|
||||||
|
visible: SettingsData.lockScreenShowPasswordField || root.passwordBuffer.length > 0
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: lockIconContainer
|
id: lockIconContainer
|
||||||
@@ -797,6 +802,7 @@ Item {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: Theme.spacingXL
|
anchors.margins: Theme.spacingXL
|
||||||
spacing: Theme.spacingL
|
spacing: Theme.spacingL
|
||||||
|
visible: SettingsData.lockScreenShowSystemIcons
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: keyboardLayoutRow.width
|
width: keyboardLayoutRow.width
|
||||||
|
|||||||
@@ -23,15 +23,51 @@ Item {
|
|||||||
SettingsCard {
|
SettingsCard {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
iconName: "lock"
|
iconName: "lock"
|
||||||
title: I18n.tr("Lock Screen")
|
title: I18n.tr("Lock Screen layout")
|
||||||
|
|
||||||
SettingsToggleRow {
|
SettingsToggleRow {
|
||||||
text: I18n.tr("Show Power Actions")
|
text: I18n.tr("Show Power Actions", "Enable power action icon on the lock screen window")
|
||||||
description: I18n.tr("Show power, restart, and logout buttons on the lock screen")
|
|
||||||
checked: SettingsData.lockScreenShowPowerActions
|
checked: SettingsData.lockScreenShowPowerActions
|
||||||
onToggled: checked => SettingsData.set("lockScreenShowPowerActions", checked)
|
onToggled: checked => SettingsData.set("lockScreenShowPowerActions", checked)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SettingsToggleRow {
|
||||||
|
text: I18n.tr("Show System Icons", "Enable system status icons on the lock screen window")
|
||||||
|
checked: SettingsData.lockScreenShowSystemIcons
|
||||||
|
onToggled: checked => SettingsData.set("lockScreenShowSystemIcons", checked)
|
||||||
|
}
|
||||||
|
|
||||||
|
SettingsToggleRow {
|
||||||
|
text: I18n.tr("Show System Time", "Enable system time display on the lock screen window")
|
||||||
|
checked: SettingsData.lockScreenShowTime
|
||||||
|
onToggled: checked => SettingsData.set("lockScreenShowTime", checked)
|
||||||
|
}
|
||||||
|
|
||||||
|
SettingsToggleRow {
|
||||||
|
text: I18n.tr("Show System Date", "Enable system date display on the lock screen window")
|
||||||
|
checked: SettingsData.lockScreenShowDate
|
||||||
|
onToggled: checked => SettingsData.set("lockScreenShowDate", checked)
|
||||||
|
}
|
||||||
|
|
||||||
|
SettingsToggleRow {
|
||||||
|
text: I18n.tr("Show Profile Image", "Enable profile image display on the lock screen window")
|
||||||
|
checked: SettingsData.lockScreenShowProfileImage
|
||||||
|
onToggled: checked => SettingsData.set("lockScreenShowProfileImage", checked)
|
||||||
|
}
|
||||||
|
|
||||||
|
SettingsToggleRow {
|
||||||
|
text: I18n.tr("Show Password Field", "Enable password field display on the lock screen window")
|
||||||
|
description: I18n.tr("If the field is hidden, it will appear as soon as a key is pressed.")
|
||||||
|
checked: SettingsData.lockScreenShowPasswordField
|
||||||
|
onToggled: checked => SettingsData.set("lockScreenShowPasswordField", checked)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SettingsCard {
|
||||||
|
width: parent.width
|
||||||
|
iconName: "lock"
|
||||||
|
title: I18n.tr("Lock Screen behaviour")
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: I18n.tr("loginctl not available - lock integration requires DMS socket connection")
|
text: I18n.tr("loginctl not available - lock integration requires DMS socket connection")
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
|
|||||||
Reference in New Issue
Block a user