Gtk: Update built-in mini-icon.

This commit is contained in:
BearOso 2020-08-23 17:46:25 -05:00
parent 1fc5a2d4d6
commit 4c3d043880
4 changed files with 15 additions and 3 deletions

BIN
gtk/data/mini_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -454,9 +454,15 @@ gtk_snes9x_ui_cpp = custom_target('sourcify',
output: 'gtk_snes9x_ui.cpp',
command: [sourcify, '@INPUT@', '@OUTPUT@', 'snes9x_ui'])
mini_icon = custom_target('mini_icon',
input: 'data/mini_icon.png',
output: 'mini_icon.cpp',
command: [sourcify, '@INPUT@', '@OUTPUT@', 'mini_icon'])
snes9x_gtk = executable('snes9x-gtk',
srcs,
gtk_snes9x_ui_cpp,
mini_icon,
c_args: args,
cpp_args: args,
dependencies: deps,

View File

@ -80,14 +80,20 @@ Snes9xWindow::Snes9xWindow(Snes9xConfig *config)
snes9x_preferences_create(config);
if (Gtk::IconTheme::get_default()->has_icon("snes9x"))
if (0 && Gtk::IconTheme::get_default()->has_icon("snes9x"))
{
window->set_default_icon_name("snes9x");
}
else
{
auto pixbuf = Gdk::Pixbuf::create_from_inline(sizeof(app_icon), app_icon, false);
window->set_default_icon(pixbuf);
extern int mini_icon_size;
extern unsigned char mini_icon[];
auto loader = Gdk::PixbufLoader::create();
loader->write(mini_icon, mini_icon_size);
loader->close();
auto pixbuf = loader->get_pixbuf();
if (pixbuf)
window->set_default_icon(pixbuf);
}
drawing_area = get_object<Gtk::DrawingArea>("drawingarea").get();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B