Changeset 5454 in josm


Ignore:
Timestamp:
2012-08-18T21:37:17+02:00 (8 years ago)
Author:
Don-vip
Message:

see #6985 - Rescale preferences tab icons to 48x48 pixels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java

    r5226 r5454  
    77import java.awt.Font;
    88import java.awt.GridBagLayout;
     9import java.awt.Image;
    910import java.awt.event.MouseWheelEvent;
    1011import java.awt.event.MouseWheelListener;
     
    357358                    String iconName = tps.getIconName();
    358359                    ImageIcon icon = iconName != null && iconName.length() > 0 ? ImageProvider.get("preferences", iconName) : null;
     360                    // See #6985 - Force icons to be 48x48 pixels
     361                    if (icon != null && (icon.getIconHeight() != 48 || icon.getIconWidth() != 48)) {
     362                        icon = new ImageIcon(icon.getImage().getScaledInstance(48, 48, Image.SCALE_DEFAULT));
     363                    }
    359364                    if (settingsInitialized.contains(tps)) {
    360365                        // If it has been initialized, add corresponding tab(s)
Note: See TracChangeset for help on using the changeset viewer.