chore: fix style

This commit is contained in:
Pylogmon 2023-11-27 20:10:31 +08:00
parent 1e015287a1
commit 36399b39fb

View File

@ -157,11 +157,20 @@ impl Tray {
let _ = tray.get_item("system_proxy").set_selected(*system_proxy);
let _ = tray.get_item("tun_mode").set_selected(*tun_mode);
let switch_map = {
let mut map = std::collections::HashMap::new();
map.insert(true, "on");
map.insert(false, "off");
map
};
#[cfg(not(target_os = "linux"))]
let _ = tray.set_tooltip(&format!(
"Clash Verge {version}\n{}: {system_proxy}\n{}: {tun_mode}",
"Clash Verge {version}\n{}: {}\n{}: {}",
t!("System Proxy", "系统代理"),
t!("TUN Mode", "Tun 模式")
switch_map[system_proxy],
t!("TUN Mode", "Tun 模式"),
switch_map[tun_mode]
));
Ok(())