mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
theme: make portal prefer-dark sync optional
This commit is contained in:
@@ -187,6 +187,7 @@ Singleton {
|
||||
|
||||
property bool gtkThemingEnabled: false
|
||||
property bool qtThemingEnabled: false
|
||||
property bool syncModeWithPortal: true
|
||||
|
||||
property bool showDock: false
|
||||
property bool dockAutoHide: false
|
||||
@@ -428,6 +429,7 @@ Singleton {
|
||||
soundPluggedIn = settings.soundPluggedIn !== undefined ? settings.soundPluggedIn : true
|
||||
gtkThemingEnabled = settings.gtkThemingEnabled !== undefined ? settings.gtkThemingEnabled : false
|
||||
qtThemingEnabled = settings.qtThemingEnabled !== undefined ? settings.qtThemingEnabled : false
|
||||
syncModeWithPortal = settings.syncModeWithPortal !== undefined ? settings.syncModeWithPortal : true
|
||||
showDock = settings.showDock !== undefined ? settings.showDock : false
|
||||
dockAutoHide = settings.dockAutoHide !== undefined ? settings.dockAutoHide : false
|
||||
dockGroupByApp = settings.dockGroupByApp !== undefined ? settings.dockGroupByApp : false
|
||||
@@ -600,6 +602,7 @@ Singleton {
|
||||
"soundPluggedIn": soundPluggedIn,
|
||||
"gtkThemingEnabled": gtkThemingEnabled,
|
||||
"qtThemingEnabled": qtThemingEnabled,
|
||||
"syncModeWithPortal": syncModeWithPortal,
|
||||
"showDock": showDock,
|
||||
"dockAutoHide": dockAutoHide,
|
||||
"dockGroupByApp": dockGroupByApp,
|
||||
@@ -696,7 +699,7 @@ Singleton {
|
||||
"notepadFontFamily", "notepadFontSize", "notepadShowLineNumbers",
|
||||
"notepadTransparencyOverride", "notepadLastCustomTransparency", "soundsEnabled",
|
||||
"useSystemSoundTheme", "soundNewNotification", "soundVolumeChanged", "soundPluggedIn", "gtkThemingEnabled",
|
||||
"qtThemingEnabled", "showDock", "dockAutoHide", "dockGroupByApp",
|
||||
"qtThemingEnabled", "syncModeWithPortal", "showDock", "dockAutoHide", "dockGroupByApp",
|
||||
"dockOpenOnOverview", "dockPosition", "dockSpacing", "dockBottomGap",
|
||||
"cornerRadius", "notificationOverlayEnabled", "dankBarAutoHide",
|
||||
"dankBarOpenOnOverview", "dankBarVisible", "dankBarSpacing", "dankBarBottomGap",
|
||||
@@ -1474,6 +1477,11 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
function setSyncModeWithPortal(enabled) {
|
||||
syncModeWithPortal = enabled
|
||||
saveSettings()
|
||||
}
|
||||
|
||||
function setShowDock(enabled) {
|
||||
showDock = enabled
|
||||
if (enabled && dockPosition === dankBarPosition) {
|
||||
|
||||
@@ -381,11 +381,10 @@ Singleton {
|
||||
}
|
||||
|
||||
const isGreeterMode = (typeof SessionData !== "undefined" && SessionData.isGreeterMode)
|
||||
isLightMode = light
|
||||
if (savePrefs && typeof SessionData !== "undefined" && !isGreeterMode)
|
||||
SessionData.setLightMode(isLightMode)
|
||||
SessionData.setLightMode(light)
|
||||
if (!isGreeterMode) {
|
||||
PortalService.setLightMode(isLightMode)
|
||||
PortalService.setLightMode(light)
|
||||
generateSystemThemesFromCurrentTheme()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user