Standardized GTK3 menu-related icon constants to the bundled zc-menu-* namespace so menu actions stop depending on mixed system-theme icon names (edit-copy, view-refresh, etc.) and instead use the same internal set. This was updated in channel list, plugin manager, URL grabber, and spell-entry menu definitions.

Updated GTK3 icon rendering paths in affected UI helpers to call gtkutil_image_new_from_stock(...), which is the path that resolves zc-menu-* resources correctly and consistently from data/icons/menu (instead of raw theme lookup).

Added new icons to the shared bundled menu icon set (light/dark) for copy, delete, add, remove, spell-check, and refresh, and registered them in the GResource manifest so they are always available at runtime.
This commit is contained in:
2026-02-17 23:56:49 -07:00
parent bc2b1bd509
commit ebf695abdf
17 changed files with 60 additions and 12 deletions

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
<circle cx="8" cy="8" r="4.8" fill="none" stroke="#e5e7eb" stroke-width="1.3"/><path d="M8 5.8v4.4M5.8 8h4.4" stroke="#e5e7eb" stroke-width="1.3" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 281 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
<path d="M6 4.5h6.5v8H6z" fill="none" stroke="#e5e7eb" stroke-width="1.3"/><path d="M3.5 2.5H10v1.8" fill="none" stroke="#e5e7eb" stroke-width="1.3" stroke-linecap="round"/><path d="M3.5 2.5v8.8H5.3" fill="none" stroke="#e5e7eb" stroke-width="1.3" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 383 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
<path d="M5.2 5.3h5.6v7.2H5.2z" fill="none" stroke="#e5e7eb" stroke-width="1.3"/><path d="M4 5.3h8" stroke="#e5e7eb" stroke-width="1.3" stroke-linecap="round"/><path d="M6.3 3.7h3.4" stroke="#e5e7eb" stroke-width="1.3" stroke-linecap="round"/><path d="M7.1 6.6v4.6M8.9 6.6v4.6" stroke="#e5e7eb" stroke-width="1.1" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 449 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
<path d="M12.8 7.4A4.8 4.8 0 1 0 8 12.8" fill="none" stroke="#e5e7eb" stroke-width="1.4" stroke-linecap="round"/><path d="M13 3.5v3.7H9.3" fill="none" stroke="#e5e7eb" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 346 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
<circle cx="8" cy="8" r="4.8" fill="none" stroke="#e5e7eb" stroke-width="1.3"/><path d="M5.8 8h4.4" stroke="#e5e7eb" stroke-width="1.3" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 271 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
<path d="M4 4.2h4M6 4.2v7.4M3.2 7.2h5.6" fill="none" stroke="#e5e7eb" stroke-width="1.2" stroke-linecap="round"/><path d="m8.9 9.3 1.5 1.5 2.8-3" fill="none" stroke="#e5e7eb" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 353 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
<circle cx="8" cy="8" r="4.8" fill="none" stroke="#1f2937" stroke-width="1.3"/><path d="M8 5.8v4.4M5.8 8h4.4" stroke="#1f2937" stroke-width="1.3" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 281 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
<path d="M6 4.5h6.5v8H6z" fill="none" stroke="#1f2937" stroke-width="1.3"/><path d="M3.5 2.5H10v1.8" fill="none" stroke="#1f2937" stroke-width="1.3" stroke-linecap="round"/><path d="M3.5 2.5v8.8H5.3" fill="none" stroke="#1f2937" stroke-width="1.3" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 383 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
<path d="M5.2 5.3h5.6v7.2H5.2z" fill="none" stroke="#1f2937" stroke-width="1.3"/><path d="M4 5.3h8" stroke="#1f2937" stroke-width="1.3" stroke-linecap="round"/><path d="M6.3 3.7h3.4" stroke="#1f2937" stroke-width="1.3" stroke-linecap="round"/><path d="M7.1 6.6v4.6M8.9 6.6v4.6" stroke="#1f2937" stroke-width="1.1" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 449 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
<path d="M12.8 7.4A4.8 4.8 0 1 0 8 12.8" fill="none" stroke="#1f2937" stroke-width="1.4" stroke-linecap="round"/><path d="M13 3.5v3.7H9.3" fill="none" stroke="#1f2937" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 346 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
<circle cx="8" cy="8" r="4.8" fill="none" stroke="#1f2937" stroke-width="1.3"/><path d="M5.8 8h4.4" stroke="#1f2937" stroke-width="1.3" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 271 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
<path d="M4 4.2h4M6 4.2v7.4M3.2 7.2h5.6" fill="none" stroke="#1f2937" stroke-width="1.2" stroke-linecap="round"/><path d="m8.9 9.3 1.5 1.5 2.8-3" fill="none" stroke="#1f2937" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 353 B

View File

@@ -33,7 +33,13 @@
<file alias="menu/light/chanlist.svg">icons/menu/light/chanlist.svg</file>
<file alias="menu/light/preferences.svg">icons/menu/light/preferences.svg</file>
<file alias="menu/light/clear.svg">icons/menu/light/clear.svg</file>
<file alias="menu/light/copy.svg">icons/menu/light/copy.svg</file>
<file alias="menu/light/delete.svg">icons/menu/light/delete.svg</file>
<file alias="menu/light/add.svg">icons/menu/light/add.svg</file>
<file alias="menu/light/remove.svg">icons/menu/light/remove.svg</file>
<file alias="menu/light/spell-check.svg">icons/menu/light/spell-check.svg</file>
<file alias="menu/light/save.svg">icons/menu/light/save.svg</file>
<file alias="menu/light/refresh.svg">icons/menu/light/refresh.svg</file>
<file alias="menu/light/search.svg">icons/menu/light/search.svg</file>
<file alias="menu/light/find.svg">icons/menu/light/find.svg</file>
<file alias="menu/light/help.svg">icons/menu/light/help.svg</file>
@@ -51,7 +57,13 @@
<file alias="menu/dark/chanlist.svg">icons/menu/dark/chanlist.svg</file>
<file alias="menu/dark/preferences.svg">icons/menu/dark/preferences.svg</file>
<file alias="menu/dark/clear.svg">icons/menu/dark/clear.svg</file>
<file alias="menu/dark/copy.svg">icons/menu/dark/copy.svg</file>
<file alias="menu/dark/delete.svg">icons/menu/dark/delete.svg</file>
<file alias="menu/dark/add.svg">icons/menu/dark/add.svg</file>
<file alias="menu/dark/remove.svg">icons/menu/dark/remove.svg</file>
<file alias="menu/dark/spell-check.svg">icons/menu/dark/spell-check.svg</file>
<file alias="menu/dark/save.svg">icons/menu/dark/save.svg</file>
<file alias="menu/dark/refresh.svg">icons/menu/dark/refresh.svg</file>
<file alias="menu/dark/search.svg">icons/menu/dark/search.svg</file>
<file alias="menu/dark/find.svg">icons/menu/dark/find.svg</file>
<file alias="menu/dark/help.svg">icons/menu/dark/help.svg</file>

View File

@@ -47,9 +47,9 @@
#if HAVE_GTK3
#define ICON_CHANLIST_JOIN "zc-menu-join"
#define ICON_CHANLIST_COPY "edit-copy"
#define ICON_CHANLIST_COPY "zc-menu-copy"
#define ICON_CHANLIST_FIND "zc-menu-find"
#define ICON_CHANLIST_REFRESH "view-refresh"
#define ICON_CHANLIST_REFRESH "zc-menu-refresh"
#define ICON_CHANLIST_SAVE "zc-menu-save"
#endif
#if !HAVE_GTK3
@@ -132,7 +132,7 @@ chanlist_icon_button (const char *label, const char *icon_name,
button = gtk_button_new_with_mnemonic (label);
#if HAVE_GTK3
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
image = gtkutil_image_new_from_stock (icon_name, GTK_ICON_SIZE_MENU);
#elif !HAVE_GTK3
image = gtk_image_new_from_stock (icon_name, GTK_ICON_SIZE_MENU);
#endif
@@ -160,7 +160,7 @@ chanlist_icon_menu_item (const char *label, const char *icon_name,
icon_name_gtk3 = gtkutil_icon_name_from_stock (icon_name);
if (!icon_name_gtk3)
icon_name_gtk3 = icon_name;
image = icon_name_gtk3 ? gtk_image_new_from_icon_name (icon_name_gtk3, GTK_ICON_SIZE_MENU) : NULL;
image = icon_name_gtk3 ? gtkutil_image_new_from_stock (icon_name_gtk3, GTK_ICON_SIZE_MENU) : NULL;
label_widget = gtk_label_new_with_mnemonic (label);
if (image)
gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);

View File

@@ -66,8 +66,8 @@ plugingui_get_target_session (void)
#if HAVE_GTK3
#define ICON_PLUGIN_LOAD "zc-menu-load-plugin"
#define ICON_PLUGIN_UNLOAD "edit-delete"
#define ICON_PLUGIN_RELOAD "view-refresh"
#define ICON_PLUGIN_UNLOAD "zc-menu-delete"
#define ICON_PLUGIN_RELOAD "zc-menu-refresh"
#endif
#if !HAVE_GTK3
#define ICON_PLUGIN_LOAD GTK_STOCK_REVERT_TO_SAVED
@@ -85,7 +85,7 @@ plugingui_icon_button (GtkWidget *box, const char *label,
GtkWidget *image;
button = gtk_button_new_with_mnemonic (label);
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
image = gtkutil_image_new_from_stock (icon_name, GTK_ICON_SIZE_MENU);
gtk_button_set_image (GTK_BUTTON (button), image);
gtk_button_set_use_underline (GTK_BUTTON (button), TRUE);
gtk_container_add (GTK_CONTAINER (box), button);

View File

@@ -60,9 +60,9 @@
#endif
#if HAVE_GTK3
#define ICON_ADD "list-add"
#define ICON_REMOVE "list-remove"
#define ICON_SPELL_CHECK "tools-check-spelling"
#define ICON_ADD "zc-menu-add"
#define ICON_REMOVE "zc-menu-remove"
#define ICON_SPELL_CHECK "zc-menu-spell-check"
#endif
#if !HAVE_GTK3
#define ICON_ADD GTK_STOCK_ADD
@@ -737,7 +737,7 @@ sexy_spell_entry_icon_menu_item (const char *label, const char *stock_name)
item = gtk_menu_item_new ();
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
if (icon_name)
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
image = gtkutil_image_new_from_stock (icon_name, GTK_ICON_SIZE_MENU);
label_widget = gtk_label_new_with_mnemonic (label);
if (image)
gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);

View File

@@ -35,7 +35,7 @@
#if HAVE_GTK3
#define ICON_URLGRAB_CLEAR "zc-menu-clear"
#define ICON_URLGRAB_COPY "edit-copy"
#define ICON_URLGRAB_COPY "zc-menu-copy"
#define ICON_URLGRAB_SAVE_AS "zc-menu-save"
#endif
#if !HAVE_GTK3