diff --git a/data/com.github.gijsgoudzwaard.image-optimizer.gresource.xml b/data/com.github.gijsgoudzwaard.image-optimizer.gresource.xml index 97c08fa..a541fc1 100644 --- a/data/com.github.gijsgoudzwaard.image-optimizer.gresource.xml +++ b/data/com.github.gijsgoudzwaard.image-optimizer.gresource.xml @@ -1,6 +1,6 @@ - - + + icons/upload_icon.svg diff --git a/data/meson.build b/data/meson.build index b80060d..fc43faa 100644 --- a/data/meson.build +++ b/data/meson.build @@ -11,11 +11,6 @@ foreach i : icon_sizes ) endforeach -install_data( - join_paths('icons', 'upload_icon.svg'), - install_dir: 'share/icons/hicolor/scalable/apps' -) - i18n.merge_file( input: meson.project_name() + '.desktop.in', output: meson.project_name() + '.desktop', diff --git a/src/Widgets/UploadScreen.vala b/src/Widgets/UploadScreen.vala index 9a24b34..f0fd37f 100644 --- a/src/Widgets/UploadScreen.vala +++ b/src/Widgets/UploadScreen.vala @@ -13,12 +13,7 @@ public class UploadScreen : Gtk.Box { upload_area.set_valign (Gtk.Align.CENTER); upload_area.set_halign (Gtk.Align.CENTER); - Gtk.Image icon = new Gtk.Image (); - - try { - var icon_pixbuf = new Gdk.Pixbuf.from_file_at_scale ("/usr/share/icons/hicolor/scalable/apps/upload_icon.svg", 64, 64, true); - icon = new Gtk.Image.from_pixbuf (icon_pixbuf); - } catch (Error e) {} + var icon = new Gtk.Image.from_resource ("/com/github/gijsgoudzwaard/image-optimizer/icons/upload_icon.svg"); var title = new Gtk.Label (_("Drag and drop images here")); title.get_style_context ().add_class ("h1"); @@ -33,10 +28,7 @@ public class UploadScreen : Gtk.Box { this.upload_button.set_halign (Gtk.Align.CENTER); ((Gtk.Widget) this.upload_button).set_focus_on_click (false); - if (icon != null) { - upload_area.pack_start (icon, false, false, 0); - } - + upload_area.pack_start (icon, false, false, 0); upload_area.pack_start (title, false, false, 0); upload_area.pack_start (otherwise, false, false, 0); upload_area.pack_start (this.upload_button, false, false, 0);