Opened 7 years ago
Closed 7 years ago
#4363 closed enhancement (fixed)
The main game has no window icon
Reported by: | Imarok | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 23 |
Component: | Core engine | Keywords: | |
Cc: | Patch: | D768 |
Description (last modified by )
0ad itself has an application icon, but no window icon (the one you can see when switching between windows and that is displayed in the top left corner of the window on microsoft windows ) Atlas (scenario editor) has a window icon (the globe: ), which is set here. This maybe could be accomplished with SDL_SetWindowIcon()
The missing window icon is confirmed for windows and ubuntu gnome
Attachments (1)
Change History (8)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Description: | modified (diff) |
---|
follow-up: 4 comment:3 by , 7 years ago
I tested SDL_SetWindowIcon() with a hardcoded icon and it works perfectly on windows and linux. The difficult part is loading the 0ad icon from a file and transform it into a SDL_Surface
.
For reference: That is also done for cursors here.
follow-up: 5 comment:4 by , 7 years ago
Replying to Imarok:
I tested SDL_SetWindowIcon() with a hardcoded icon and it works perfectly on windows and linux. The difficult part is loading the 0ad icon from a file and transform it into a
SDL_Surface
. For reference: That is also done for cursors here.
Solution on the link above should work for icons too.
comment:5 by , 7 years ago
Replying to vladislavbelov:
Replying to Imarok:
I tested SDL_SetWindowIcon() with a hardcoded icon and it works perfectly on windows and linux. The difficult part is loading the 0ad icon from a file and transform it into a
SDL_Surface
. For reference: That is also done for cursors here.Solution on the link above should work for icons too.
Not with the format we have the 0ad icon in. I managed to get it working, but it looked very ugly. So the main issue is finding the right format/size and the right way to import it.
by , 7 years ago
Attachment: | set_window_icon.patch added |
---|
comment:6 by , 7 years ago
The code above works on windows, IMO, there should be sys-dependencies, because different OSs and WMs have different icon constraints: windows: 64x64 (old: up to 32x32), linux: 256x256 (avg, sometimes 1024x1024), os x: 512x512 (AFAIC). And an autoresizing will make the icon worse, than artists (from another side, we could use few basics resolutions: 64x64, 256x256, 1024x1024 to resize to the nearest).
comment:7 by , 7 years ago
Description: | modified (diff) |
---|---|
Keywords: | simple removed |
Milestone: | Backlog → Alpha 23 |
Patch: | → D768 |
Resolution: | → fixed |
Status: | new → closed |
Type: | defect → enhancement |
Committed in r20067 (Phab:rP20067)
It should be solved with resource files (*.rc) if I'm not mistaken, if it's the only windows issue.