Issue Details (XML | Word | Printable)

Key: JDIC-196
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: bino_george
Reporter: davyboyhayes
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
jdic

Improved API for Icon Size determination

Created: 25/Feb/05 03:25 AM   Updated: 03/Mar/05 12:39 AM
Component/s: JDIC API (package org.jdesktop.jdic.tray)
Affects Version/s: 0.8.8
Fix Version/s: None

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: All


Issuezilla Id: 196
Tags:
Participants: bino_george, davyboyhayes and georgez


 Description  « Hide

I won't reiterate a previous issue for more getter methods, but add to them
instead. I noticed that when running under Windows (XP), the default icon size
is 16x16. Upon inspecting the WinTrayIconService.java code, I see that these are
constants. This is not the true case in windows. You can actually have larger or
smaller icon sizes under windows, due to change in DPI settings etc.... For some
random reason, my current system setting has them set to 17x17. Under my
KDE-linux setup, my icon size is 32x32.

What would be good to see, is under SystemTray, there is a java.awt.Dimension
getCurrentIconSize() method which would inspect the current tray settings on the
OS, to determine the size of the icon you need to generate. Furthermore, under
TrayIcon, a similar java.awt.Dimension getCurrentIconSize(). This may be
difficult to achieve though under Windows, as I have not been able to find
suitable methods of detecting this.

Why would this be useful? If you were able to get the size of the icon first,
you would be able to select suitable pre-drawn icons for the size, rather than
resize a large graphic down. The duke.gif animated gif in the TrayDemo looks a
little awful under Windows, because it is being squashed out of it's aspect
ratio, and there is no kind of sub-pixel rendering to improve the graphic. If
this was left up to the graphic designer or the java implementor at the time, to
know what size icon they need to draw, it would look a lot better.

Thanks,

Davy Boy Out...



davyboyhayes added a comment - 25/Feb/05 03:37 AM

Found a project on CodeProject which might help for windows side of things...
http://www.codeproject.com/shell/trayposition.asp

Many thanks,

Davy Boy Out...


georgez added a comment - 03/Mar/05 12:39 AM

Should be an "ENHANCEMENT".