mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-07 05:38:27 +02:00
Add OLED theme (#658)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { CE } from "@utils/html";
|
||||
import { compressCss, isLiteVersion, renderStylus } from "@macros/build" with { type: "macro" };
|
||||
import { BlockFeature, UiSection } from "@/enums/pref-values";
|
||||
import { BlockFeature, UiSection, UiTheme } from "@/enums/pref-values";
|
||||
import { GlobalPref } from "@/enums/pref-keys";
|
||||
import { getGlobalPref } from "./pref-utils";
|
||||
import { containsAll } from "./utils";
|
||||
@@ -69,6 +69,19 @@ export function addCss() {
|
||||
css += selectorToHide.join(',') + '{ display: none; }';
|
||||
}
|
||||
|
||||
// Change site's background
|
||||
if (getGlobalPref(GlobalPref.UI_THEME) === UiTheme.DARK_OLED) {
|
||||
css += compressCss(`
|
||||
body[data-theme=dark] {
|
||||
--gds-containerSolidAppBackground: #000 !important;
|
||||
}
|
||||
|
||||
div[class*="ProductDetailPage-module__backgroundImageGradient"]:after {
|
||||
background: radial-gradient(ellipse 100% 100% at 50% 0, #1515178c 0, #1a1b1ea6 32%, #000000 100%) !important;
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
||||
// Reduce animations
|
||||
if (getGlobalPref(GlobalPref.UI_REDUCE_ANIMATIONS)) {
|
||||
css += compressCss(`
|
||||
|
Reference in New Issue
Block a user