[gnumeric] icons: add 64x64 version of cross.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] icons: add 64x64 version of cross.
- Date: Sat, 29 May 2021 23:41:36 +0000 (UTC)
commit df62de6865e40ac68007c776d65be31b96fc3d73
Author: Morten Welinder <terra gnome org>
Date: Sat May 29 19:40:38 2021 -0400
icons: add 64x64 version of cross.
This makes the icon appear sharp on 2x scaled displays.
configure.ac | 2 ++
icons/64x64/Makefile.am | 1 +
icons/64x64/actions/Makefile.am | 4 ++++
icons/64x64/actions/cursor-cross.png | Bin 0 -> 1389 bytes
icons/Makefile.am | 2 +-
src/gnm.gresource.xml | 1 +
src/item-grid.c | 21 ++++++++++++---------
7 files changed, 21 insertions(+), 10 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1abc5d00b..154a43313 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1205,6 +1205,8 @@ icons/32x32/apps/Makefile
icons/48x48/Makefile
icons/48x48/actions/Makefile
icons/48x48/apps/Makefile
+icons/64x64/Makefile
+icons/64x64/actions/Makefile
icons/256x256/Makefile
icons/256x256/apps/Makefile
introspection/Makefile
diff --git a/icons/64x64/Makefile.am b/icons/64x64/Makefile.am
new file mode 100644
index 000000000..0224d4572
--- /dev/null
+++ b/icons/64x64/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = actions
diff --git a/icons/64x64/actions/Makefile.am b/icons/64x64/actions/Makefile.am
new file mode 100644
index 000000000..661a18455
--- /dev/null
+++ b/icons/64x64/actions/Makefile.am
@@ -0,0 +1,4 @@
+internalicons = \
+ cursor-cross.png
+
+EXTRA_DIST = $(internalicons)
diff --git a/icons/64x64/actions/cursor-cross.png b/icons/64x64/actions/cursor-cross.png
new file mode 100644
index 000000000..532258cb0
Binary files /dev/null and b/icons/64x64/actions/cursor-cross.png differ
diff --git a/icons/Makefile.am b/icons/Makefile.am
index bea6e1d68..113f639ff 100644
--- a/icons/Makefile.am
+++ b/icons/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = 16x16 22x22 24x24 32x32 48x48 256x256
+SUBDIRS = 16x16 22x22 24x24 32x32 48x48 64x64 256x256
EXTRA_DIST = fake-index-theme win32-gnumeric.ico
diff --git a/src/gnm.gresource.xml b/src/gnm.gresource.xml
index d6a8b1860..47e4b0379 100644
--- a/src/gnm.gresource.xml
+++ b/src/gnm.gresource.xml
@@ -162,6 +162,7 @@
<file>icons/32x32/actions/gnumeric-format-valign-justify.png</file>
<file>icons/32x32/actions/gnumeric-format-valign-top.png</file>
<file>icons/48x48/actions/gnumeric-protection-yes-dialog.png</file>
+ <file>icons/64x64/actions/cursor-cross.png</file>
<file alias="images/line_pattern_dash_dot.png">src/pixmaps/line_pattern_dash_dot.png</file>
<file alias="images/line_pattern_dash_dot_dot.png">src/pixmaps/line_pattern_dash_dot_dot.png</file>
<file alias="images/line_pattern_dashed.png">src/pixmaps/line_pattern_dashed.png</file>
diff --git a/src/item-grid.c b/src/item-grid.c
index e5b406ce2..ed121b83e 100644
--- a/src/item-grid.c
+++ b/src/item-grid.c
@@ -201,23 +201,26 @@ item_grid_realize (GocItem *item)
{
GdkDisplay *display;
GnmItemGrid *ig;
- GdkPixbuf *cursor_cross_pixbuf;
+ cairo_surface_t *cursor_cross;
+ GtkWidget *widget;
parent_class->realize (item);
ig = GNM_ITEM_GRID (item);
ig_reload_style (ig);
- display = gtk_widget_get_display (GTK_WIDGET (item->canvas));
+ widget = GTK_WIDGET (item->canvas);
+ display = gtk_widget_get_display (widget);
ig->cursor_link = gdk_cursor_new_for_display (display, GDK_HAND2);
- cursor_cross_pixbuf =
- gtk_icon_theme_load_icon (gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET
(item->canvas))),
- "cursor-cross", 32, 0, NULL);
+ cursor_cross =
+ gtk_icon_theme_load_surface (gtk_icon_theme_get_for_screen (gtk_widget_get_screen (widget)),
+ "cursor-cross", 32,
+ gtk_widget_get_scale_factor (widget),
+ gtk_widget_get_window (widget),
+ 0, NULL);
ig->cursor_cross =
- gdk_cursor_new_from_pixbuf (display,
- cursor_cross_pixbuf,
- 17, 17);
- g_object_unref (cursor_cross_pixbuf);
+ gdk_cursor_new_from_surface (display, cursor_cross, 17, 17);
+ cairo_surface_destroy (cursor_cross);
cb_cursor_motion (ig);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]