mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
ui: install logo icons to $prefix/share/icons
QEMU currently installs logos to $prefix/share/qemu/ which means no GUI toolkit or applications can find them by default. The accepted standards for desktop applications declare that application logos / icons should be installed under $prefix/share/icons, so use this directory location. Pre-rendered icons are provided at the standard sizes expected for GUI applications, along with the scalable SVG, to ensure maximum portability. The PNGs are rendered from the SVG using inkscape, however, this is not wired up into the default make rules to avoid requiring inkscape as a mandatory tool in build systems / developer workstations. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20190110120047.25369-2-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
681d61362d
commit
a8260d3876
16 changed files with 38 additions and 23 deletions
16
ui/sdl2.c
16
ui/sdl2.c
|
@ -762,7 +762,6 @@ static void sdl2_display_early_init(DisplayOptions *o)
|
|||
static void sdl2_display_init(DisplayState *ds, DisplayOptions *o)
|
||||
{
|
||||
uint8_t data = 0;
|
||||
char *filename;
|
||||
int i;
|
||||
SDL_SysWMinfo info;
|
||||
|
||||
|
@ -837,15 +836,12 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o)
|
|||
}
|
||||
|
||||
/* Load a 32x32x4 image. White pixels are transparent. */
|
||||
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, "qemu-icon.bmp");
|
||||
if (filename) {
|
||||
SDL_Surface *image = SDL_LoadBMP(filename);
|
||||
if (image) {
|
||||
uint32_t colorkey = SDL_MapRGB(image->format, 255, 255, 255);
|
||||
SDL_SetColorKey(image, SDL_TRUE, colorkey);
|
||||
SDL_SetWindowIcon(sdl2_console[0].real_window, image);
|
||||
}
|
||||
g_free(filename);
|
||||
SDL_Surface *image = SDL_LoadBMP(CONFIG_QEMU_ICONDIR
|
||||
"/hicolor/32x32/apps/qemu.bmp");
|
||||
if (image) {
|
||||
uint32_t colorkey = SDL_MapRGB(image->format, 255, 255, 255);
|
||||
SDL_SetColorKey(image, SDL_TRUE, colorkey);
|
||||
SDL_SetWindowIcon(sdl2_console[0].real_window, image);
|
||||
}
|
||||
|
||||
gui_grab = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue