Hi
I have a coolBar filled with OpenPerspectiveActions. All of this actions
have an icon. The user can change the size of the icons in the preferences
dialog.
When I start the application with the large icons and the user changes the
preferred icon size to small, it works fine and the small icons are
displayed. Although the coolBar hight still is as tal as the large icons
were.
When I start the application with the small icons and the user changes the
preferred icon size to large, the coolBar doesn't display the icons.
I assume the coolBar is too small to display the large icons. But how can
i resize the coolBar?
Thats my code to update the icons in the coolBar:
I first remove all contribution items and then update the coolBar.
I set a larger icon (or a smaller one) to the actions and then add the
action again to the coolBar. At the end i call update on the coolBar.
preferenceStore.addPropertyChangeListener(new IPropertyChangeListener()
{
public void propertyChange(PropertyChangeEvent event)
{
String iconSize = (String) event.getNewValue();
if (PreferencePageIconSize.LARGE_ICON_SIZE.equals(iconSize)
|| PreferencePageIconSize.NORMAL_ICON_SIZE.equals(iconSize))
{
coolBar.removeAll();
coolBar.update(true);