[gnome-multi-writer] Fix usb icon in the background with HiDpi displays
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-multi-writer] Fix usb icon in the background with HiDpi displays
- Date: Mon, 19 Jan 2015 17:26:59 +0000 (UTC)
commit fbb374cf083d9688bfa991bbf4ab7a2fee4315db
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Jan 18 21:33:49 2015 -0800
Fix usb icon in the background with HiDpi displays
src/gmw-main.c | 10 +++-------
src/gnome-multi-writer.gresource.xml | 2 +-
2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/gmw-main.c b/src/gmw-main.c
index b69c55a..8fd7239 100644
--- a/src/gmw-main.c
+++ b/src/gmw-main.c
@@ -1296,13 +1296,9 @@ gmw_startup_cb (GApplication *application, GmwPrivate *priv)
/* setup USB image */
w = GTK_WIDGET (gtk_builder_get_object (priv->builder, "image_usb"));
- pixbuf = gdk_pixbuf_new_from_resource_at_scale ("/org/gnome/MultiWriter/usb.svg",
- -1, 48, TRUE, &error);
- if (pixbuf == NULL) {
- g_warning ("failed to load usb.svg: %s", error->message);
- return;
- }
- gtk_image_set_from_pixbuf (GTK_IMAGE (w), pixbuf);
+ gtk_image_set_from_resource (GTK_IMAGE (w),
+ "/org/gnome/MultiWriter/usb-symbolic.svg");
+ gtk_image_set_pixel_size (GTK_IMAGE (w), 48);
/* get previously loaded image */
filename = g_settings_get_string (priv->settings, "filename");
diff --git a/src/gnome-multi-writer.gresource.xml b/src/gnome-multi-writer.gresource.xml
index ee92a2a..c8da38b 100644
--- a/src/gnome-multi-writer.gresource.xml
+++ b/src/gnome-multi-writer.gresource.xml
@@ -3,6 +3,6 @@
<gresource prefix="/org/gnome/MultiWriter">
<file compressed="true" alias="gtk/menus.ui">gmw-menus.ui</file>
<file compressed="true">gmw-main.ui</file>
- <file compressed="true">usb.svg</file>
+ <file compressed="true" alias="usb-symbolic.svg">usb.svg</file>
</gresource>
</gresources>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]