Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix(ui): macOS tray icon color invert with system theme (#1783)

echocded81e56b2c15a
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 6bb516fd7f..4ed76241ab 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -113,14 +113,7 @@ fn setup_desktop_tray<R: tauri::Runtime, M: Manager<R>>(
TrayIconBuilder::<R>::with_id(DESKTOP_TRAY_ID).tooltip("DBX").menu(&menu).show_menu_on_left_click(false);
#[cfg(target_os = "macos")]
{
- match _icon_theme {
- DesktopIconTheme::Default => {
- tray = tray.icon(MACOS_TRAY_ICON).icon_as_template(true);
- }
- DesktopIconTheme::Black => {
- tray = tray.icon(BLACK_APP_ICON).icon_as_template(false);
- }
- }
+ tray = tray.icon(MACOS_TRAY_ICON).icon_as_template(true);
}
#[cfg(target_os = "windows")]
{
@@ -172,19 +165,6 @@ fn apply_desktop_icon_theme(app: &tauri::AppHandle, icon_theme: DesktopIconTheme
fn apply_desktop_tray_icon_theme(app: &tauri::AppHandle, icon_theme: DesktopIconTheme) -> tauri::Result<()> {
if let Some(tray) = app.tray_by_id(DESKTOP_TRAY_ID) {
- #[cfg(target_os = "macos")]
- {
- match icon_theme {
- DesktopIconTheme::Default => {
- tray.set_icon(Some(MACOS_TRAY_ICON))?;
- tray.set_icon_as_template(true)?;
- }
- DesktopIconTheme::Black => {
- tray.set_icon(Some(BLACK_APP_ICON))?;
- tray.set_icon_as_template(false)?;
- }
- }
- }
#[cfg(target_os = "windows")]
{
let icon = match icon_theme {