muda icon indicating copy to clipboard operation
muda copied to clipboard

Is there a way to override the theme?

Open CrendKing opened this issue 1 year ago • 1 comments

When I launch the main Tauri app, I could override the theme of webview window with my value, e.g.

let mut tauri_context = tauri::tauri_build_context!();
tauri_context.config_mut().app.windows[0].theme = Some(tauri::Theme::Light);

However, currently this does not apply to the context menu generate with MenuBuilder or the Javascript API. Any way to bridge the discrepancy? Thanks for the great work!

CrendKing avatar Mar 26 '24 14:03 CrendKing

Looks like on Windows, muda use TrackPopupMenu to do the context menu. According to https://stackoverflow.com/questions/76573219/setting-theme-for-legacy-controls, it seems there is no official way to just override the theme for that menu.

I wonder if switching to the new menu API (maybe https://github.com/tauri-apps/muda/issues/167) would give us any option?

CrendKing avatar Mar 26 '24 17:03 CrendKing