diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 74dc0c7..1666b5f 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -29,6 +29,7 @@ on: jobs: build-packages: runs-on: ubuntu-latest + if: github.event.inputs.version != '' strategy: matrix: architecture: ${{ fromJSON(format('["{0}"]', join(split(inputs.architectures, ','), '","'))) }} @@ -81,6 +82,7 @@ jobs: create-release: needs: build-packages runs-on: ubuntu-latest + if: github.event.inputs.version != '' permissions: contents: write diff --git a/data/icons/sound-icon-inverted.png b/data/icons/sound-icon-inverted.png new file mode 100644 index 0000000..593ecdd Binary files /dev/null and b/data/icons/sound-icon-inverted.png differ diff --git a/src/volmix.c b/src/volmix.c index 111bfc7..c7917de 100644 --- a/src/volmix.c +++ b/src/volmix.c @@ -261,6 +261,7 @@ static void on_tray_icon_popup_menu(GtkStatusIcon *status_icon, guint button, gtk_menu_popup_at_pointer(GTK_MENU(menu), NULL); } + static gboolean on_scroll_event(GtkStatusIcon *status_icon, GdkEventScroll *event, gpointer user_data) { @@ -292,9 +293,29 @@ static void setup_tray_icon(volmix_app_t *app) { app->tray_icon = gtk_status_icon_new(); - // Use a standard icon name for volume - gtk_status_icon_set_from_icon_name(GTK_STATUS_ICON(app->tray_icon), - "audio-volume-high"); + // Load the inverted sound icon PNG (white speaker) + gchar *icon_path = g_build_filename("data", "icons", "sound-icon-inverted.png", NULL); + GError *error = NULL; + GdkPixbuf *icon_pixbuf = NULL; + + if (g_file_test(icon_path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) { + icon_pixbuf = gdk_pixbuf_new_from_file_at_size(icon_path, 22, 22, &error); + } + + if (icon_pixbuf) { + gtk_status_icon_set_from_pixbuf(GTK_STATUS_ICON(app->tray_icon), icon_pixbuf); + g_object_unref(icon_pixbuf); + g_print("Loaded inverted sound icon PNG\n"); + } else { + // Fallback to system icon if file not found + g_warning("Could not load sound icon (%s), using system icon", + error ? error->message : "file not found"); + if (error) g_error_free(error); + gtk_status_icon_set_from_icon_name(GTK_STATUS_ICON(app->tray_icon), + "audio-volume-high"); + } + + g_free(icon_path); gtk_status_icon_set_tooltip_text(GTK_STATUS_ICON(app->tray_icon), "volmix - Per-Application Audio Control");