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 authored and armhub committed Dec 2, 2024
1 parent 54fefb1 commit c9fc62b
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 @@ -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()

Expand Down Expand Up @@ -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()
? {
Expand Down Expand Up @@ -2486,6 +2488,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 c9fc62b

Please sign in to comment.