GTK: Replace the logo with a SVG version
This makes it render crisp on desktop environments which use an icon size bigger than 32×32, such as GNOME.
This commit is contained in:
parent
0896b99b49
commit
626d5b4d36
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 32 32">
|
||||
<linearGradient id="a" x1="0" x2="0" y1="2" y2="30" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#f6f6fb"/>
|
||||
<stop offset="1" stop-color="#8080c0"/>
|
||||
</linearGradient>
|
||||
<path fill="#000" d="M3 0 H 23 V 20 H 26 V 32 H 8 V 22 H 5 V 15 H 0 V 2 H 3 Z"/>
|
||||
<path fill="url(#a)" d="M5 2 V 4 H 2 V 13 H 7 V 2 H 5 Z M4 5 H 5 V 12 H 4 V 5 Z"/>
|
||||
<path fill="url(#a)" d="M9 2 H 14 v 1 h -3 v 1 h 3 V 5 h -3 v 7 h 1 V 6 h 2 V 13 H 9 Z"/>
|
||||
<path fill="url(#a)" d="M16 2 h 5 v 1 h -3 v 1 h 3 v 9 H 16 V 6 h 2 v 6 h 1 V 5 h -3 Z"/>
|
||||
<path fill="url(#a)" d="M7 14 h 8 v 6 h -2 v -5 h -1 v 5 H 10 V 15 H 9 v 5 H 7 Z"/>
|
||||
<path fill="url(#a)" d="M16 14 h 2 v 5 h 1 v -5 h 2 v 6 h -5 Z"/>
|
||||
<path fill="url(#a)" d="M19 22 h 5 v 1 h -3 v 1 h 3 v 1 h -3 v 4 h 1 v -3 h 2 v 4 h -5 Z"/>
|
||||
<path fill="url(#a)" d="M10 22 h 8 v 8 h -2 v -7 h -1 v 7 h -2 v -7 h -1 v 7 H 10 Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1001 B |
|
@ -1,50 +0,0 @@
|
|||
/* XPM */
|
||||
static const char * DeSmuME_xpm[] = {
|
||||
"32 32 15 1",
|
||||
" c None",
|
||||
". c #000000",
|
||||
"+ c #F6F6FB",
|
||||
"@ c #ECECF6",
|
||||
"# c #E2E2F1",
|
||||
"$ c #D8D8EC",
|
||||
"% c #CFCFE7",
|
||||
"& c #C5C5E2",
|
||||
"* c #BBBBDE",
|
||||
"= c #B1B1D9",
|
||||
"- c #A8A8D4",
|
||||
"; c #9E9ECF",
|
||||
"> c #9494CA",
|
||||
", c #8A8AC5",
|
||||
"' c #8080C0",
|
||||
" .................... ",
|
||||
" .................... ",
|
||||
".....++..+++++..+++++.. ",
|
||||
".....++..++.....++..... ",
|
||||
"..@@@@@..@@@@@..@@@@@.. ",
|
||||
"..@@.@@..@@........@@.. ",
|
||||
"..##.##..##.##..##.##.. ",
|
||||
"..##.##..##.##..##.##.. ",
|
||||
"..$$.$$..$$.$$..$$.$$.. ",
|
||||
"..$$.$$..$$.$$..$$.$$.. ",
|
||||
"..%%.%%..%%.%%..%%.%%.. ",
|
||||
"..%%.%%..%%.%%..%%.%%.. ",
|
||||
"..&&&&&..&&&&&..&&&&&.. ",
|
||||
"....................... ",
|
||||
".......********.**.**.. ",
|
||||
" ..==.==.==.==.==.. ",
|
||||
" ..==.==.==.==.==.. ",
|
||||
" ..--.--.--.--.--.. ",
|
||||
" ..--.--.--.--.--.. ",
|
||||
" ..;;.;;.;;.;;;;;.. ",
|
||||
" ..................... ",
|
||||
" ..................... ",
|
||||
" ..>>>>>>>>.>>>>>.. ",
|
||||
" ..>>.>>.>>.>>..... ",
|
||||
" ..,,.,,.,,.,,,,,.. ",
|
||||
" ..,,.,,.,,.,,..... ",
|
||||
" ..''.''.''.''.''.. ",
|
||||
" ..''.''.''.''.''.. ",
|
||||
" ..''.''.''.''.''.. ",
|
||||
" ..''.''.''.'''''.. ",
|
||||
" .................. ",
|
||||
" .................. "};
|
|
@ -6,8 +6,8 @@ AM_CPPFLAGS += $(SDL_CFLAGS) $(GTK_CFLAGS) $(GTHREAD_CFLAGS) $(ALSA_CFLAGS) $(LI
|
|||
Applicationsdir = $(datadir)/applications
|
||||
Applications_DATA = desmume.desktop
|
||||
pixmapdir = $(datadir)/pixmaps
|
||||
pixmap_DATA = DeSmuME.xpm
|
||||
EXTRA_DIST = DeSmuME.xpm desmume.desktop
|
||||
pixmap_DATA = DeSmuME.svg
|
||||
EXTRA_DIST = DeSmuME.svg desmume.desktop
|
||||
bin_PROGRAMS = desmume
|
||||
desmume_SOURCES = \
|
||||
avout.h \
|
||||
|
|
|
@ -88,8 +88,6 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include "DeSmuME.xpm"
|
||||
|
||||
#undef GPOINTER_TO_INT
|
||||
#define GPOINTER_TO_INT(p) ((gint) (glong) (p))
|
||||
|
||||
|
@ -1515,8 +1513,6 @@ static inline void UpdateStatusBar (const char *message)
|
|||
|
||||
static void About(GSimpleAction *action, GVariant *parameter, gpointer user_data)
|
||||
{
|
||||
GdkPixbuf * pixbuf = gdk_pixbuf_new_from_xpm_data(DeSmuME_xpm);
|
||||
|
||||
static const gchar *authors[] = {
|
||||
"yopyop (original author)",
|
||||
"DeSmuME team",
|
||||
|
@ -1527,12 +1523,10 @@ static void About(GSimpleAction *action, GVariant *parameter, gpointer user_data
|
|||
"program-name", "DeSmuME",
|
||||
"version", EMU_DESMUME_VERSION_STRING() + 1, // skip space
|
||||
"website", "http://desmume.org",
|
||||
"logo", pixbuf,
|
||||
"logo-icon-name", "DeSmuME",
|
||||
"comments", "Nintendo DS emulator based on work by Yopyop",
|
||||
"authors", authors,
|
||||
NULL);
|
||||
|
||||
g_object_unref(pixbuf);
|
||||
}
|
||||
|
||||
static void ToggleMenuVisible(GSimpleAction *action, GVariant *parameter, gpointer user_data)
|
||||
|
@ -3918,7 +3912,7 @@ common_gtk_main(GApplication *app, gpointer user_data)
|
|||
pWindow = gtk_application_window_new(GTK_APPLICATION(app));
|
||||
gtk_window_set_title(GTK_WINDOW(pWindow), "DeSmuME");
|
||||
gtk_window_set_resizable(GTK_WINDOW (pWindow), TRUE);
|
||||
gtk_window_set_icon(GTK_WINDOW (pWindow), gdk_pixbuf_new_from_xpm_data(DeSmuME_xpm));
|
||||
gtk_window_set_icon_name(GTK_WINDOW (pWindow), "DeSmuME");
|
||||
|
||||
g_signal_connect(G_OBJECT(pWindow), "destroy", G_CALLBACK(DoQuit), NULL);
|
||||
g_signal_connect(G_OBJECT(pWindow), "key_press_event", G_CALLBACK(Key_Press), NULL);
|
||||
|
|
|
@ -35,4 +35,4 @@ executable('desmume',
|
|||
)
|
||||
|
||||
install_data('desmume.desktop', install_dir: get_option('datadir') / 'applications')
|
||||
install_data('DeSmuME.xpm', install_dir: get_option('datadir') / 'pixmaps')
|
||||
install_data('DeSmuME.svg', install_dir: get_option('datadir') / 'pixmaps')
|
||||
|
|
Loading…
Reference in New Issue