Skip to content

Commit

Permalink
Fix text appearing grey while printing in dark mode
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rezbyte committed Nov 15, 2024
1 parent 307e3df commit 3e10963
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/gui/main-styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { BrowserType } from "../misc/ClientConstants"
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()

Expand Down Expand Up @@ -36,6 +37,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()
? {
Expand Down Expand Up @@ -2491,6 +2493,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": {
Expand Down

0 comments on commit 3e10963

Please sign in to comment.