Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rustdesk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李朝发
rustdesk
Commits
780b42d0
Commit
780b42d0
authored
Aug 10, 2022
by
kingtous
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: adapt macos dark mode
parent
694578d2
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
499 additions
and
159 deletions
+499
-159
Cargo.lock
Cargo.lock
+331
-3
Cargo.toml
Cargo.toml
+2
-1
pubspec.lock
flutter/pubspec.lock
+154
-154
mac-tray-dark.png
mac-tray-dark.png
+0
-0
mac-tray-light.png
mac-tray-light.png
+0
-0
macos.rs
src/ui/macos.rs
+12
-1
No files found.
Cargo.lock
View file @
780b42d0
This diff is collapsed.
Click to expand it.
Cargo.toml
View file @
780b42d0
...
...
@@ -95,6 +95,7 @@ core-foundation = "0.9"
core-graphics
=
"0.22"
include_dir
=
"0.7.2"
tray-item
=
"0.7"
# looks better than trayicon
dark-light
=
"0.2"
[target.'cfg(target_os
=
"linux"
)'.dependencies]
psimple
=
{
package
=
"libpulse-simple-binding"
,
version
=
"2.25"
}
...
...
@@ -138,7 +139,7 @@ identifier = "com.carriez.rustdesk"
icon
=
[
"32x32.png"
,
"128x128.png"
,
"128x128@2x.png"
]
deb_depends
=
[
"libgtk-3-0"
,
"libxcb-randr0"
,
"libxdo3"
,
"libxfixes3"
,
"libxcb-shape0"
,
"libxcb-xfixes0"
,
"libasound2"
,
"libsystemd0"
,
"pulseaudio"
,
"python3-pip"
,
"curl"
]
osx_minimum_system_version
=
"10.14"
resources
=
["mac-tray.png"]
resources
=
["mac-tray
-light.png","mac-tray-dark
.png"]
#https://github.com/johnthagen/min-sized-rust
[profile.release]
...
...
flutter/pubspec.lock
View file @
780b42d0
This diff is collapsed.
Click to expand it.
mac-tray.png
→
mac-tray
-dark
.png
View file @
780b42d0
File moved
mac-tray-light.png
0 → 100644
View file @
780b42d0
475 Bytes
src/ui/macos.rs
View file @
780b42d0
...
...
@@ -13,6 +13,7 @@ use objc::{
};
use
sciter
::{
make_args
,
Host
};
use
std
::{
ffi
::
c_void
,
rc
::
Rc
};
use
dark_light
;
static
APP_HANDLER_IVAR
:
&
str
=
"GoDeskAppHandler"
;
...
...
@@ -233,7 +234,17 @@ pub fn make_tray() {
set_delegate
(
None
);
}
use
tray_item
::
TrayItem
;
if
let
Ok
(
mut
tray
)
=
TrayItem
::
new
(
&
crate
::
get_app_name
(),
"mac-tray.png"
)
{
let
mode
=
dark_light
::
detect
();
let
mut
icon_path
=
""
;
match
mode
{
dark_light
::
Mode
::
Dark
=>
{
icon_path
=
"mac-tray-light.png"
;
},
dark_light
::
Mode
::
Light
=>
{
icon_path
=
"mac-tray-dark.png"
;
},
}
if
let
Ok
(
mut
tray
)
=
TrayItem
::
new
(
&
crate
::
get_app_name
(),
icon_path
)
{
tray
.add_label
(
&
format!
(
"{} {}"
,
crate
::
get_app_name
(),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment