mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Standardized GTK menu-icon fallback mapping so stock names for Save As, Previous, and Next now resolve through the bundled zc-menu-* icon family (and map back correctly on GTK2), ensuring these menu actions use the same icon set path as the rest of your menu icons.
Updated search controls in the main UI to use zc-menu-previous / zc-menu-next and to load through gtkutil_image_new_from_stock(...), so those menu-sized icons are rendered from the same data/icons/menu resources instead of theme-dependent icon names.
Updated URL Grabber and Raw Log “Save As” icon constants to use zc-menu-save-as for consistency with the menu icon set.
Added new menu SVGs (save-as, previous, next) in both light and dark variants, and registered all of them in the GResource manifest so they’re available cross-platform from the bundled resource system.
This commit is contained in:
3
data/icons/menu/dark/next.svg
Normal file
3
data/icons/menu/dark/next.svg
Normal 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.5 3.5 10.5 8l-5 4.5" fill="none" stroke="#e5e7eb" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 240 B |
3
data/icons/menu/dark/previous.svg
Normal file
3
data/icons/menu/dark/previous.svg
Normal 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="M10.5 3.5 5.5 8l5 4.5" fill="none" stroke="#e5e7eb" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 239 B |
6
data/icons/menu/dark/save-as.svg
Normal file
6
data/icons/menu/dark/save-as.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
|
||||
<path d="M3 2.5h8l2 2v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z" fill="none" stroke="#e5e7eb" stroke-width="1.3"/>
|
||||
<rect x="5" y="3.5" width="4.5" height="2.5" fill="none" stroke="#e5e7eb" stroke-width="1.2"/>
|
||||
<rect x="5" y="9" width="3.4" height="3" fill="none" stroke="#e5e7eb" stroke-width="1.2"/>
|
||||
<path d="M9.8 8.9v3.6M8.1 10.7l1.7-1.8 1.8 1.8" fill="none" stroke="#e5e7eb" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 547 B |
3
data/icons/menu/light/next.svg
Normal file
3
data/icons/menu/light/next.svg
Normal 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.5 3.5 10.5 8l-5 4.5" fill="none" stroke="#1f2937" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 240 B |
3
data/icons/menu/light/previous.svg
Normal file
3
data/icons/menu/light/previous.svg
Normal 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="M10.5 3.5 5.5 8l5 4.5" fill="none" stroke="#1f2937" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 239 B |
6
data/icons/menu/light/save-as.svg
Normal file
6
data/icons/menu/light/save-as.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
|
||||
<path d="M3 2.5h8l2 2v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z" fill="none" stroke="#1f2937" stroke-width="1.3"/>
|
||||
<rect x="5" y="3.5" width="4.5" height="2.5" fill="none" stroke="#1f2937" stroke-width="1.2"/>
|
||||
<rect x="5" y="9" width="3.4" height="3" fill="none" stroke="#1f2937" stroke-width="1.2"/>
|
||||
<path d="M9.8 8.9v3.6M8.1 10.7l1.7-1.8 1.8 1.8" fill="none" stroke="#1f2937" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 547 B |
@@ -39,9 +39,12 @@
|
||||
<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/save-as.svg">icons/menu/light/save-as.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/previous.svg">icons/menu/light/previous.svg</file>
|
||||
<file alias="menu/light/next.svg">icons/menu/light/next.svg</file>
|
||||
<file alias="menu/light/help.svg">icons/menu/light/help.svg</file>
|
||||
<file alias="menu/light/about.svg">icons/menu/light/about.svg</file>
|
||||
|
||||
@@ -63,9 +66,12 @@
|
||||
<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/save-as.svg">icons/menu/dark/save-as.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/previous.svg">icons/menu/dark/previous.svg</file>
|
||||
<file alias="menu/dark/next.svg">icons/menu/dark/next.svg</file>
|
||||
<file alias="menu/dark/help.svg">icons/menu/dark/help.svg</file>
|
||||
<file alias="menu/dark/about.svg">icons/menu/dark/about.svg</file>
|
||||
</gresource>
|
||||
|
||||
@@ -88,9 +88,12 @@ gtkutil_menu_custom_icon_from_stock (const char *stock_name)
|
||||
{ "gtk-remove", "zc-menu-remove" },
|
||||
{ "gtk-spell-check", "zc-menu-spell-check" },
|
||||
{ "gtk-save", "zc-menu-save" },
|
||||
{ "gtk-save-as", "zc-menu-save-as" },
|
||||
{ "gtk-refresh", "zc-menu-refresh" },
|
||||
{ "gtk-justify-left", "zc-menu-search" },
|
||||
{ "gtk-find", "zc-menu-find" },
|
||||
{ "gtk-go-back", "zc-menu-previous" },
|
||||
{ "gtk-go-forward", "zc-menu-next" },
|
||||
{ "gtk-help", "zc-menu-help" },
|
||||
{ "gtk-about", "zc-menu-about" },
|
||||
};
|
||||
@@ -136,9 +139,12 @@ gtkutil_stock_from_menu_custom_icon (const char *custom_icon)
|
||||
{ "zc-menu-remove", GTK_STOCK_REMOVE },
|
||||
{ "zc-menu-spell-check", GTK_STOCK_SPELL_CHECK },
|
||||
{ "zc-menu-save", GTK_STOCK_SAVE },
|
||||
{ "zc-menu-save-as", GTK_STOCK_SAVE_AS },
|
||||
{ "zc-menu-refresh", GTK_STOCK_REFRESH },
|
||||
{ "zc-menu-search", GTK_STOCK_JUSTIFY_LEFT },
|
||||
{ "zc-menu-find", GTK_STOCK_FIND },
|
||||
{ "zc-menu-previous", GTK_STOCK_GO_BACK },
|
||||
{ "zc-menu-next", GTK_STOCK_GO_FORWARD },
|
||||
{ "zc-menu-help", GTK_STOCK_HELP },
|
||||
{ "zc-menu-about", GTK_STOCK_ABOUT },
|
||||
};
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
#if HAVE_GTK3
|
||||
#define ICON_TAB_DETACH "zc-menu-detach"
|
||||
#define ICON_TAB_CLOSE "zc-menu-close"
|
||||
#define ICON_TAB_PREVIOUS "go-previous"
|
||||
#define ICON_TAB_NEXT "go-next"
|
||||
#define ICON_TAB_PREVIOUS "zc-menu-previous"
|
||||
#define ICON_TAB_NEXT "zc-menu-next"
|
||||
#define ICON_ENTRY_ERROR "dialog-error"
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
@@ -3464,7 +3464,7 @@ mg_create_search(session *sess, GtkWidget *box)
|
||||
|
||||
close = gtk_button_new ();
|
||||
#if HAVE_GTK3
|
||||
gtk_button_set_image (GTK_BUTTON (close), gtk_image_new_from_icon_name (ICON_TAB_CLOSE, GTK_ICON_SIZE_MENU));
|
||||
gtk_button_set_image (GTK_BUTTON (close), gtkutil_image_new_from_stock (ICON_TAB_CLOSE, GTK_ICON_SIZE_MENU));
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
gtk_button_set_image (GTK_BUTTON (close), gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU));
|
||||
@@ -3489,7 +3489,7 @@ mg_create_search(session *sess, GtkWidget *box)
|
||||
|
||||
previous = gtk_button_new ();
|
||||
#if HAVE_GTK3
|
||||
gtk_button_set_image (GTK_BUTTON (previous), gtk_image_new_from_icon_name (ICON_TAB_PREVIOUS, GTK_ICON_SIZE_MENU));
|
||||
gtk_button_set_image (GTK_BUTTON (previous), gtkutil_image_new_from_stock (ICON_TAB_PREVIOUS, GTK_ICON_SIZE_MENU));
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
gtk_button_set_image (GTK_BUTTON (previous), gtk_image_new_from_stock (GTK_STOCK_GO_BACK, GTK_ICON_SIZE_MENU));
|
||||
@@ -3501,7 +3501,7 @@ mg_create_search(session *sess, GtkWidget *box)
|
||||
|
||||
next = gtk_button_new ();
|
||||
#if HAVE_GTK3
|
||||
gtk_button_set_image (GTK_BUTTON (next), gtk_image_new_from_icon_name (ICON_TAB_NEXT, GTK_ICON_SIZE_MENU));
|
||||
gtk_button_set_image (GTK_BUTTON (next), gtkutil_image_new_from_stock (ICON_TAB_NEXT, GTK_ICON_SIZE_MENU));
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
gtk_button_set_image (GTK_BUTTON (next), gtk_image_new_from_stock (GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_MENU));
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
#if HAVE_GTK3
|
||||
#define ICON_RAWLOG_CLEAR "zc-menu-clear"
|
||||
#define ICON_RAWLOG_SAVE_AS "zc-menu-save"
|
||||
#define ICON_RAWLOG_SAVE_AS "zc-menu-save-as"
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
#define ICON_RAWLOG_CLEAR GTK_STOCK_CLEAR
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#if HAVE_GTK3
|
||||
#define ICON_URLGRAB_CLEAR "zc-menu-clear"
|
||||
#define ICON_URLGRAB_COPY "zc-menu-copy"
|
||||
#define ICON_URLGRAB_SAVE_AS "zc-menu-save"
|
||||
#define ICON_URLGRAB_SAVE_AS "zc-menu-save-as"
|
||||
#endif
|
||||
#if !HAVE_GTK3
|
||||
#define ICON_URLGRAB_CLEAR GTK_STOCK_CLEAR
|
||||
|
||||
Reference in New Issue
Block a user