Skip to content

feat(appearance): optional separate theme for the menu bar - #63

Merged
CristianOlivera1 merged 2 commits into
crafter-station:mainfrom
giacfalk:feat/menubar-theme
Nov 24, 2026
Merged

CristianOlivera1 merged 2 commits into
crafter-station:mainfrom
giacfalk:feat/menubar-theme

Conversation

@giacfalk

@giacfalk giacfalk commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #54.

What changes

The menu bar, its panels and the menus opened from it (such as the input language menu) can have a theme of their own, separate from the dock's.

  • Settings → Appearance gains a "Same theme for the menu bar" switch, on by default.
  • Turning the switch off shows a second theme picker for the menu bar. It starts from the dock's current theme, so nothing changes on screen until another theme is picked.
  • While the themes are separate, the first picker is labelled "Dock theme". Its hint then mentions only the dock.

New preference: menuBarAppearance, an Appearance or null. It defaults to null, which means the menu bar uses the dock's appearance. Existing configurations are therefore unchanged. An unknown theme name from a newer version reads as auto, as it does for appearance.

Implementation notes

  • appearance.rs keeps a second atomic, MENU_BAR_CHOICE. It holds the value u8::MAX while the menu bar shares the dock's theme. appearance::menu_bar() resolves the menu bar's look, and menu_bar_light() gives the light/dark flag for menus opened from the bar.
  • menubar.rs now builds its Look from appearance::menu_bar(). Its material, light and glass flags are part of the look, so a change redraws the bar through the existing App::refresh path.
  • The dock, its menus and the Settings window keep following appearance.
  • Strings are added in all eight Settings languages. The CHANGELOG entry is in English and Spanish.

Testing

  • cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace all pass.
  • New tests:
    • config: defaults, explicit null, round trip, and an unknown theme reading as auto.
    • appearance: encoding of the menu bar's own choice versus the shared one, for every theme.
  • pnpm test passes 22 tests. The new one covers:
    • The switch starts on, and the closed picker shows the dock's theme.
    • Turning the switch off saves the dock's theme as the menu bar's.
    • Picking a menu bar theme saves only menuBarAppearance, and the dock picker saves only appearance.
    • Turning the switch back on saves null.
  • pnpm build passes.
  • I tested a debug build live on Windows 11 (build 26300), with a copy of a real config, using Aurora for the dock and Light for the menu bar:
    • The bar and its island draw Light with dark content, while the dock and its hover preview stay Aurora.
    • The input language menu opened from the bar is drawn light.
    • Settings shows the "Dock theme" label, the switch off, and the menu bar picker on Light.
    • Turning the switch back on saves null, and the running bar returns to Aurora at once. Settings then goes back to a single "Theme" picker with the original hint.

Note: this PR and #62 both add lines under ## [Unreleased] in CHANGELOG.md and new keys to the i18n files. Whichever merges second will need a small rebase.

…tation#54)

The menu bar, its panels and the menus opened from it can take a theme of
their own. Settings -> Appearance gains a 'Same theme for the menu bar'
switch (on by default) and a second theme picker when it is off. The new
menuBarAppearance preference is null by default, so existing configurations
keep sharing the dock's theme.

Refs crafter-station#54
@vercel

vercel Bot commented Nov 24, 2026

Copy link
Copy Markdown

@giacfalk is attempting to deploy a commit to the Crafter Station Team on Vercel.

A member of the Team first needs to authorize it.

@CristianOlivera1
CristianOlivera1 merged commit eede780 into crafter-station:main Nov 24, 2026
0 of 2 checks passed
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.

[Feature Request] Separate themes for the dock and the menu bar

2 participants