From 98037d7fc7ec22481fd8f6e8bb40cc798f33fb92 Mon Sep 17 00:00:00 2001 From: jat Date: Fri, 15 Nov 2024 11:18:58 +0100 Subject: [PATCH] Fix text appearing grey while printing in dark mode It was the caused by the different foreground and background contrast between the light mode and dark mode. This commit forces the light mode foreground and background to be used when printing. --- src/common/gui/main-styles.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/gui/main-styles.ts b/src/common/gui/main-styles.ts index 0eb399874efd..74d6cc764416 100644 --- a/src/common/gui/main-styles.ts +++ b/src/common/gui/main-styles.ts @@ -8,6 +8,7 @@ import { getContentButtonIconBackground, getElevatedBackground, getNavigationMen import { stateBgActive, stateBgFocus, stateBgHover, stateBgLike } from "./builtinThemes.js" import { FontIcons } from "./base/icons/FontIcons.js" import { DefaultAnimationTime } from "./animation/Animations.js" +import { locator } from "../api/main/CommonLocator.js" assertMainOrNode() @@ -35,6 +36,7 @@ const searchBarShadow = "0px 2px 4px rgb(0, 0, 0, 0.12)" const scrollbarWidthHeight = px(18) styles.registerStyle("main", () => { + const lightTheme = locator.themeController.getBaseTheme("light") return { "#link-tt": isElectronClient() ? { @@ -2506,6 +2508,8 @@ styles.registerStyle("main", () => { "html, body": { position: "initial", overflow: "visible !important", + color: lightTheme.content_fg, + "background-color": `${lightTheme.content_bg} !important`, }, // overwrite position "fixed" otherwise only one page will be printed. ".header-nav": {