Export more internals so muda can be used in combination with ksni#239
Export more internals so muda can be used in combination with ksni#239dfaust wants to merge 13 commits intotauri-apps:devfrom
Conversation
amrbashir
left a comment
There was a problem hiding this comment.
Apologies for the long delay
src/items/compat.rs
Outdated
| } | ||
| } | ||
|
|
||
| pub fn strip_accelerator(text: impl AsRef<str>) -> String { |
There was a problem hiding this comment.
is this meant to remove mnemonic? if so, we need to keep &&
There was a problem hiding this comment.
Do we have to keep &&, or turn it into &?
Btw. the .replace("[~~]", "&") in to_gtk_mnemonic is redundant.
There was a problem hiding this comment.
Do we have to keep
&&, or turn it into&?
it should turn into &
Btw. the
.replace("[~~]", "&")into_gtk_mnemonicis redundant.
actually that one is correct, .replace("[~~]", "&&") is the redundant one
src/lib.rs
Outdated
| } | ||
| } | ||
|
|
||
| #[cfg(feature = "ksni")] |
There was a problem hiding this comment.
these should also be cfg'd behind linux-only target and same for all related logic
There was a problem hiding this comment.
I can do that. But it feels a bit redundant.
There was a problem hiding this comment.
it should result in faster compile times on other platforms, no?
There was a problem hiding this comment.
You're right. I didn't notice that the ksni feature is enabled on all platforms.
I added the target_os cfg everywhere, except platform_impl/gtk.
I had to expose a few internals and add some image conversion functions to make muda work with my ksni patch for the tray-icon crate.
Companion PR for tray-icon:
Replace libappindicator with ksni: tauri-apps/tray-icon#201
Tauri issue:
[feat] Use ksni crate for tray icons on Linux: tauri-apps/tauri#11293