Revert "linux tray as mac tray"

This commit is contained in:
RustDesk 2023-06-25 00:45:33 +08:00 committed by GitHub
parent 2a7a96429d
commit f635453e80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 8 deletions

View File

@ -28,7 +28,7 @@ flutter = ["flutter_rust_bridge"]
default = ["use_dasp"]
hwcodec = ["scrap/hwcodec"]
mediacodec = ["scrap/mediacodec"]
linux_headless = ["pam"]
linux_headless = ["pam" ]
virtual_display_driver = ["virtual_display"]
plugin_framework = []
linux-pkg-config = ["magnum-opus/linux-pkg-config", "scrap/linux-pkg-config"]
@ -127,8 +127,6 @@ dbus = "0.9"
dbus-crossroads = "0.5"
pam = { git="https://github.com/fufesou/pam", optional = true }
users = { version = "0.11" }
dark-light = "1.0"
[target.'cfg(target_os = "android")'.dependencies]
android_logger = "0.13"

View File

Before

Width:  |  Height:  |  Size: 703 B

After

Width:  |  Height:  |  Size: 703 B

View File

Before

Width:  |  Height:  |  Size: 728 B

After

Width:  |  Height:  |  Size: 728 B

View File

@ -12,17 +12,17 @@ pub fn make_tray() -> hbb_common::ResultType<()> {
TrayEvent, TrayIconBuilder,
};
let icon;
#[cfg(any(target_os = "macos", target_os = "linux"))]
#[cfg(target_os = "macos")]
{
let mode = dark_light::detect();
const LIGHT: &[u8] = include_bytes!("../res/outlined-tray-light-x2.png");
const DARK: &[u8] = include_bytes!("../res/outlined-tray-dark-x2.png");
const LIGHT: &[u8] = include_bytes!("../res/mac-tray-light-x2.png");
const DARK: &[u8] = include_bytes!("../res/mac-tray-dark-x2.png");
icon = match mode {
dark_light::Mode::Dark => LIGHT,
_ => DARK,
};
}
#[cfg(target_os = "windows")]
#[cfg(not(target_os = "macos"))]
{
icon = include_bytes!("../res/tray-icon.ico");
}
@ -74,7 +74,6 @@ pub fn make_tray() -> hbb_common::ResultType<()> {
.spawn()
.ok();
}
// xdg-open?
#[cfg(target_os = "linux")]
if !std::process::Command::new("xdg-open")
.arg("rustdesk://")