Skip to content

Commit

Permalink
Use tray_icon crate for better tray icon support (#288)
Browse files Browse the repository at this point in the history
* Use `tray_icon` crate for better tray icon support

* Install atk in github actions

* Use different crate for Linux and platform generic tray icon struct

* Introduce abstract, platform generic tray icon

* Remove unnecessary GTK3 dependency from CI workflow

* Move tray icon implementations into submodules with no other changes

* Minor refactoring

* Refactor tray icon implementation to a simple spawn function

* Update `tray-icon` dependency

* Fix compilation dependencies on Linux

* Fix exit mapped to incorrect command in new tray icon implementation

* Fix icon rendering on Linux

* Handle left mouse click on the icon on Windows to show an app

* Make tray icon clicking toggle window visibility instead of just showing

* Rename second tray icon menu item to Quit

---------

Co-authored-by: Nazar Mokrynskyi <nazar@mokrynskyi.com>
  • Loading branch information
dastansam and nazar-pc authored Sep 2, 2024
1 parent f339700 commit 20f8ac3
Show file tree
Hide file tree
Showing 14 changed files with 768 additions and 117 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

- name: Install GTK4 and libfuse2 (Linux)
# libfuse2 is needed for AppImage to run
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y libgtk-4-dev libfuse2
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y libgtk-4-dev libdbus-1-dev libfuse2
if: runner.os == 'Linux'

- name: Configure GTK4 cache (Windows)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Install GTK4 (Ubuntu)
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y libgtk-4-dev
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y libgtk-4-dev libdbus-1-dev
if: runner.os == 'Linux'

- name: Install GTK4 (macOS)
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Install GTK4 (Ubuntu)
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y libgtk-4-dev
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y libgtk-4-dev libdbus-1-dev
if: runner.os == 'Linux'

- name: Install GTK4 (macOS)
Expand Down
Loading

0 comments on commit 20f8ac3

Please sign in to comment.