Skip to content

fix(desktop): show themed title-bar control icons and space the menu button - #5830

Merged
Jocs merged 2 commits into
marktext:developfrom
Dopetaiga:fix/5828-titlebar-theme-controls
Oct 21, 2026
Merged

Jocs merged 2 commits into
marktext:developfrom
Dopetaiga:fix/5828-titlebar-theme-controls

Conversation

@Dopetaiga

@Dopetaiga Dopetaiga commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes #5828

Summary

Fixes both items in #5828.

Dark-theme window controls rendered black. Each bundled theme recolours the minimize/maximize/close SVG through

.title-bar .frameless-titlebar-button > div > svg { fill: …; }

#5739 (commit 1d9222d) changed the icon container inside those buttons from <div> to <span> for accessibility, so all 30 theme rules stopped matching. The SVGs fell through to the base .frameless-titlebar-button svg { fill: #000000; } in titleBar/index.vue, which is invisible on a dark title bar. This change points every theme rule at the element the template now renders.

Word count sat flush against the application-menu button. .left-toolbar is a flex row with no gap, so the document-statistics trigger touched the menu button. Added gap: 8px to the toolbar.

Type of change

  • Bug fix (non-breaking, fixes an issue)
  • New feature (non-breaking, adds functionality)
  • Breaking change (causes existing functionality to change)
  • Documentation update

Test plan

No new tests are included, as requested in review; this change only updates CSS selectors and spacing.

Validation after review:

  • pnpm run lint — 0 errors (existing warnings remain).
  • vue-tsc --noEmit using the desktop configuration with pre-existing, untracked multi-root work excluded — passed. The standard pnpm run typecheck is blocked locally by those unrelated untracked files.
  • pnpm run dev — main and preload compiled; renderer development server and Electron app launched on macOS.

Notes for reviewers

graphite.theme.css and ulysses.theme.css never had this rule (both are light themes that rely on the base black fill), so they are intentionally left untouched.

Prettier wants to reformat unrelated parts of titleBar/index.vue (the file predates the current print width settings), so it was left alone to keep the diff to the one CSS declaration. pnpm format:check is not currently clean on develop for that file either.


By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

…button

The window-control icons (minimize/maximize/close) are only visible in dark themes because each theme recolours their SVG. marktext#5739 changed the icon wrapper from a div to a span, so all 30 theme rules that target .frameless-titlebar-button > div > svg stopped matching and the icons fell back to the base black fill, invisible on a dark title bar.

Point the rules at the element the template renders, and give .left-toolbar a gap so the document statistics no longer sit flush against the application-menu button.

Closes marktext#5828
@Jocs

Jocs commented Oct 21, 2026

Copy link
Copy Markdown
Member

@Dopetaiga Please paste some screenshots about this PR.

@Jocs

Jocs commented Oct 21, 2026

Copy link
Copy Markdown
Member

No need to add test.

@Jocs
Jocs merged commit bb34356 into marktext:develop Oct 21, 2026
11 checks passed
@Dopetaiga

Copy link
Copy Markdown
Contributor Author

No need to add test.

OK,I will remeber this on fututre work

@Dopetaiga

Copy link
Copy Markdown
Contributor Author

@Dopetaiga Please paste some screenshots about this PR.

image image Screenshots from the Windows CI build of this branch (dracula theme, custom title bar): The document statistics no longer touch the application-menu button. Window controls are now white on the dark title bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Some tiny visual effect problems.

2 participants