jdic
  1. jdic
  2. JDIC-196

Improved API for Icon Size determination

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.8.8
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      196

      Description

      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...

        Activity

        Hide
        davyboyhayes added a comment -

        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...

        Show
        davyboyhayes added a comment - 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...
        Hide
        georgez added a comment -

        Should be an "ENHANCEMENT".

        Show
        georgez added a comment - Should be an "ENHANCEMENT".

          People

          • Assignee:
            bino_george
            Reporter:
            davyboyhayes
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: