SteamOS: always use dark theme
Co-authored-by: AAGaming <aagaming@riseup.net>
This commit is contained in:
parent
dfa9d248d3
commit
b059516707
1 changed files with 5 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
import "./ipc";
|
import "./ipc";
|
||||||
|
|
||||||
import { app, BrowserWindow } from "electron";
|
import { app, BrowserWindow, nativeTheme } from "electron";
|
||||||
import { checkUpdates } from "updater/main";
|
import { checkUpdates } from "updater/main";
|
||||||
|
|
||||||
import { DATA_DIR } from "./constants";
|
import { DATA_DIR } from "./constants";
|
||||||
|
@ -15,6 +15,7 @@ import { createWindows, mainWin } from "./mainWindow";
|
||||||
import { registerMediaPermissionsHandler } from "./mediaPermissions";
|
import { registerMediaPermissionsHandler } from "./mediaPermissions";
|
||||||
import { registerScreenShareHandler } from "./screenShare";
|
import { registerScreenShareHandler } from "./screenShare";
|
||||||
import { Settings } from "./settings";
|
import { Settings } from "./settings";
|
||||||
|
import { isDeckGameMode } from "./utils/steamOS";
|
||||||
|
|
||||||
if (IS_DEV) {
|
if (IS_DEV) {
|
||||||
require("source-map-support").install();
|
require("source-map-support").install();
|
||||||
|
@ -43,6 +44,9 @@ function init() {
|
||||||
"WinRetrieveSuggestionsOnlyOnDemand,HardwareMediaKeyHandling,MediaSessionService,WidgetLayering"
|
"WinRetrieveSuggestionsOnlyOnDemand,HardwareMediaKeyHandling,MediaSessionService,WidgetLayering"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// In the Flatpak on SteamOS the theme is detected as light, but SteamOS only has a dark mode, so we just override it
|
||||||
|
if (isDeckGameMode) nativeTheme.themeSource = "dark";
|
||||||
|
|
||||||
app.on("second-instance", (_event, _cmdLine, _cwd, data: any) => {
|
app.on("second-instance", (_event, _cmdLine, _cwd, data: any) => {
|
||||||
if (data.IS_DEV) app.quit();
|
if (data.IS_DEV) app.quit();
|
||||||
else if (mainWin) {
|
else if (mainWin) {
|
||||||
|
|
Loading…
Reference in a new issue