ui/gtk/image.c

branch
newapi
changeset 296
a362c76dbf99
parent 275
132c7bcc6997
child 299
48763a9d19a7
--- a/ui/gtk/image.c	Mon Jun 17 21:22:38 2024 +0200
+++ b/ui/gtk/image.c	Sun Sep 15 20:19:52 2024 +0200
@@ -62,7 +62,9 @@
 // **** deprecated2****
 
 static UiIcon* get_icon(const char *name, int size, int scale) {
-#ifdef UI_SUPPORTS_SCALE
+#if GTK_MAJOR_VERSION >= 4
+    GtkIconPaintable *info = gtk_icon_theme_lookup_icon(icon_theme, NULL, size, scale, GTK_TEXT_DIR_LTR, GTK_ICON_LOOKUP_FORCE_REGULAR);
+#elif defined(UI_SUPPORTS_SCALE)
     GtkIconInfo *info = gtk_icon_theme_lookup_icon_for_scale(icon_theme, name, size, scale, 0);
 #else
     GtkIconInfo *info = gtk_icon_theme_lookup_icon(icon_theme, name, size, 0);

mercurial