Load gesture images as symbolic icons
This makes them recolor in the dark theme, which looks better.
@ -1201,9 +1201,9 @@ gtk.gresource.xml: Makefile.am inspector/Makefile.inc
|
||||
n=`basename $$f`; \
|
||||
echo " <file>cursor/$$n</file>" >> $@; \
|
||||
done; \
|
||||
for f in $(srcdir)/gesture/*.png; do \
|
||||
for f in $(srcdir)/gesture/*.symbolic.png; do \
|
||||
n=`basename $$f`; \
|
||||
echo " <file>gesture/$$n</file>" >> $@; \
|
||||
echo " <file alias='icons/64x64/actions/$$n'>gesture/$$n</file>" >> $@; \
|
||||
done; \
|
||||
for f in $(srcdir)/ui/*.ui; do \
|
||||
n=`basename $$f`; \
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
gtk/gesture/gesture-pinch-symbolic.symbolic.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
BIN
gtk/gesture/gesture-rotate-anticlockwise-symbolic.symbolic.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
BIN
gtk/gesture/gesture-rotate-clockwise-symbolic.symbolic.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
BIN
gtk/gesture/gesture-stretch-symbolic.symbolic.png
Normal file
After Width: | Height: | Size: 977 B |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.7 KiB |
BIN
gtk/gesture/gesture-two-finger-swipe-left-symbolic.symbolic.png
Normal file
After Width: | Height: | Size: 764 B |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 940 B After Width: | Height: | Size: 882 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 936 B |
@ -189,36 +189,47 @@ gtk_shortcuts_shortcut_set_subtitle (GtkShortcutsShortcut *self,
|
||||
static void
|
||||
update_icon_from_type (GtkShortcutsShortcut *self)
|
||||
{
|
||||
GIcon *icon;
|
||||
|
||||
if (self->icon_set)
|
||||
return;
|
||||
|
||||
switch (self->shortcut_type)
|
||||
{
|
||||
case GTK_SHORTCUT_GESTURE_PINCH:
|
||||
gtk_image_set_from_resource (self->image, "/org/gtk/libgtk/gesture/pinch.png");
|
||||
icon = g_themed_icon_new ("gesture-pinch-symbolic");
|
||||
break;
|
||||
|
||||
case GTK_SHORTCUT_GESTURE_STRETCH:
|
||||
gtk_image_set_from_resource (self->image, "/org/gtk/libgtk/gesture/stretch.png");
|
||||
icon = g_themed_icon_new ("gesture-stretch-symbolic");
|
||||
break;
|
||||
|
||||
case GTK_SHORTCUT_GESTURE_ROTATE_CLOCKWISE:
|
||||
gtk_image_set_from_resource (self->image, "/org/gtk/libgtk/gesture/rotate-clockwise.png");
|
||||
icon = g_themed_icon_new ("gesture-rotate-clockwise-symbolic");
|
||||
break;
|
||||
|
||||
case GTK_SHORTCUT_GESTURE_ROTATE_COUNTERCLOCKWISE:
|
||||
gtk_image_set_from_resource (self->image, "/org/gtk/libgtk/gesture/rotate-anticlockwise.png");
|
||||
icon = g_themed_icon_new ("gesture-rotate-anticlockwise-symbolic");
|
||||
break;
|
||||
|
||||
case GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_LEFT:
|
||||
gtk_image_set_from_resource (self->image, "/org/gtk/libgtk/gesture/two-finger-swipe-left.png");
|
||||
icon = g_themed_icon_new ("gesture-two-finger-swipe-left-symbolic");
|
||||
break;
|
||||
|
||||
case GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_RIGHT:
|
||||
gtk_image_set_from_resource (self->image, "/org/gtk/libgtk/gesture/two-finger-swipe-right.png");
|
||||
icon = g_themed_icon_new ("gesture-two-finger-swipe-right-symbolic");
|
||||
break;
|
||||
|
||||
default: ;
|
||||
icon = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (icon)
|
||||
{
|
||||
gtk_image_set_from_gicon (self->image, icon, GTK_ICON_SIZE_DIALOG);
|
||||
gtk_image_set_pixel_size (self->image, 64);
|
||||
g_object_unref (icon);
|
||||
}
|
||||
}
|
||||
|
||||
|