This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 34574 - [2004-05-21] Toolbar icons should be 24x24
Summary: [2004-05-21] Toolbar icons should be 24x24
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: mslama
URL:
Keywords: API, API_REVIEW_FAST, UI
Depends on: 43476
Blocks: 63645
  Show dependency tree
 
Reported: 2003-06-24 21:57 UTC by Jesse Glick
Modified: 2008-12-22 20:49 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Diff of enhancement (34.87 KB, text/plain)
2004-05-13 11:05 UTC, mslama
Details
Diff of test (5.67 KB, text/plain)
2004-05-13 16:20 UTC, mslama
Details
Commit log of changes in core and openide (6.66 KB, text/plain)
2004-05-18 18:22 UTC, mslama
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2003-06-24 21:57:28 UTC
Many applications use 24x24 icons for the toolbar
as a matter of course, as they tend to look much
better than 16x16 icons.

NetBeans (in keeping with javax.swing.Action) does
not directly support such icons; you can override
getToolbarPresenter to create a button with a
bigger button, but this is somewhat cumbersome.
You can also return a 24x24 icon for
Action.SMALL_ICON ~ SystemAction.iconResource, but
this is undesirable as then menu items will look
wrong (they should use only 16x16).

Also I am not sure if the NB toolbars correctly
handle non-default component heights - need to check.

Suggest perhaps adding new attribute name
constants for bigger icons (at least 24x24), and I
guess some option (system property? toolbar config
XML attr?) to try to use the bigger icons in a
toolbar when they are available.

This would permit custom apps (or perhaps NB) to
add bigger icons for common actions and begin
using bigger toolbars, without needing to patch
individual NB action classes (e.g. SaveAction, etc.).
Comment 1 Jesse Glick 2003-07-22 22:00:53 UTC
BTW see:

http://developer.java.sun.com/developer/bugParade/bugs/4491747.html

which suggests that a new constant will be added specifically for
24x24 icons.
Comment 2 Jesse Glick 2004-01-03 22:39:50 UTC
See also issue #32256 which is a bit related.
Comment 3 _ ttran 2004-04-18 23:05:30 UTC
In Promo D we plan to use 24x24 icons in toolbars

  - added core-promod to status whiteboard
  - changed summary from "Better support 24x24 actions icons" to
    "Toolbar icons should be 24x24"
  - assigned this to mslama
  - increased prio to P2
Comment 4 mslama 2004-05-13 11:05:02 UTC
To support both 16x16 and 24x24 icons in toolbar some API changes are
necessary:

Addition:
org.openide.awt.Toolbar:
    method public static int getBasicHeight ()
    (toolbar height depends on size of icons)
org.openide.awt.ToolbarPool:
    method public int getPreferredIconSize ()
    method public void setPreferredIconSize (int preferredIconSize)
    (global preferred size of icons used in toolbar buttons)
Deprecation:
org.openide.awt.Toolbar:
    field public static final int BASIC_HEIGHT = 34;

How can Presenter.Toolbar know about icons size? Method could be added
to this interface but it would mean a lot of changes and it is
incompatible change. We decided to use client property on JComponent
(JButton): Client property "PreferredIconSize" is set to "24" when
24x24 icon should be used. Otherwise 16x16 icon is used. Suffix "24"
is added to icon name eg. cut.gif and cut24.gif icons are provided.

Complete diff is attached.

Comment 5 mslama 2004-05-13 11:05:53 UTC
Created attachment 14836 [details]
Diff of enhancement
Comment 6 Jaroslav Tulach 2004-05-13 14:34:35 UTC
Request: Complete diff shall include test for behaviour of Actions.
Similar test have been provided for rollover icons, so just extend it.

Little advice: Use something other than string "24" to signal the size
of the icons. Integer(24)?
Comment 7 mslama 2004-05-13 16:18:42 UTC
Is Integer(20) better than "24"? It is used as value in if clause
anyway. Of course it can be changed.

Extended test diff attached to test test24,gif, test24_pressed.gif,...
Comment 8 mslama 2004-05-13 16:20:07 UTC
Created attachment 14849 [details]
Diff of test
Comment 9 mslama 2004-05-17 12:01:00 UTC
Please object quickly. This issue should be committed tomorrow. I will
change client property value from String("24") to Integer(24).
Comment 10 mslama 2004-05-18 18:22:53 UTC
Created attachment 14950 [details]
Commit log of changes in core and openide
Comment 11 mslama 2004-05-18 18:26:40 UTC
Fixed in trunk.