Changeset 10358 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2016-06-12T12:00:38+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/SideButton.java
r10356 r10358 92 92 action.addPropertyChangeListener(propertyChangeListener); 93 93 } 94 int iconHeight = ImageProvider.ImageSizes.SIDEBUTTON.getImage Size();94 int iconHeight = ImageProvider.ImageSizes.SIDEBUTTON.getImageDimension().height; 95 95 Icon i = getIcon(); 96 96 if (i instanceof ImageIcon && i.getIconHeight() != iconHeight) { -
trunk/src/org/openstreetmap/josm/gui/SplashScreen.java
r10254 r10358 9 9 import java.awt.GridBagConstraints; 10 10 import java.awt.GridBagLayout; 11 import java.awt.Image;12 11 import java.awt.Insets; 13 12 import java.awt.event.MouseAdapter; … … 18 17 19 18 import javax.swing.BorderFactory; 20 import javax.swing.ImageIcon;21 19 import javax.swing.JFrame; 22 20 import javax.swing.JLabel; … … 70 68 71 69 // Add the logo 72 JLabel logo = new JLabel(new Image Icon(ImageProvider.get("logo.svg").getImage().getScaledInstance(128, 129, Image.SCALE_SMOOTH)));70 JLabel logo = new JLabel(new ImageProvider("logo.svg").setSize(ImageProvider.ImageSizes.SPLASH_LOGO).get()); 73 71 GridBagConstraints gbc = new GridBagConstraints(); 74 72 gbc.gridheight = 2; -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r10325 r10358 34 34 import javax.swing.BorderFactory; 35 35 import javax.swing.ButtonGroup; 36 import javax.swing.ImageIcon; 36 37 import javax.swing.JButton; 37 38 import javax.swing.JCheckBoxMenuItem; … … 506 507 507 508 // scale down the dialog icon 508 lblTitle = new JLabel("", new ImageProvider("dialogs", iconName).setWidth(16).get(), JLabel.TRAILING); 509 ImageIcon icon = new ImageProvider("dialogs", iconName).setSize(ImageProvider.ImageSizes.SMALLICON).get(); 510 lblTitle = new JLabel("", icon, JLabel.TRAILING); 509 511 lblTitle.setIconTextGap(8); 510 512 … … 543 545 // show the pref button if applicable 544 546 if (preferenceClass != null) { 545 JButton pref = new JButton(new ImageProvider("preference").set Width(16).get());547 JButton pref = new JButton(new ImageProvider("preference").setSize(ImageProvider.ImageSizes.SMALLICON).get()); 546 548 pref.setToolTipText(tr("Open preferences for this panel")); 547 549 pref.setBorder(BorderFactory.createEmptyBorder()); -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r9965 r10358 147 147 public static ImageIcon getIcon(IconReference ref, int width, int height) { 148 148 final String namespace = ref.source.getPrefName(); 149 ImageIcon i = getIconProvider(ref, false).set Width(width).setHeight(height).get();149 ImageIcon i = getIconProvider(ref, false).setSize(width, height).get(); 150 150 if (i == null) { 151 151 Main.warn("Mappaint style \""+namespace+"\" ("+ref.source.getDisplayString()+") icon \"" + ref.iconName + "\" not found."); -
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
r10212 r10358 510 510 // Get icon 511 511 String iconName = tps.getIconName(); 512 ImageIcon icon = iconName != null && !iconName.isEmpty() ? ImageProvider.get("preferences", iconName) :null;513 // See #6985 - Force icons to be 48x48 pixels 514 if (icon!= null &&(icon.getIconHeight() != 48 || icon.getIconWidth() != 48)) {515 icon = new Image Icon(icon.getImage().getScaledInstance(48, 48, Image.SCALE_DEFAULT));512 ImageIcon icon = null; 513 514 if(iconName != null && !iconName.isEmpty()) { 515 icon = new ImageProvider("preferences", iconName).setSize(ImageProvider.ImageSizes.SETTINGS_TAB).get(); 516 516 } 517 517 if (settingsInitialized.contains(tps)) { -
trunk/src/org/openstreetmap/josm/gui/widgets/TextContextualPopupMenu.java
r9231 r10358 180 180 mi.setText(label); 181 181 if (iconName != null && Main.pref.getBoolean("text.popupmenu.useicons", true)) { 182 ImageIcon icon = new ImageProvider(iconName).set Width(16).get();182 ImageIcon icon = new ImageProvider(iconName).setSize(ImageProvider.ImageSizes.SMALLICON).get(); 183 183 if (icon != null) { 184 184 mi.setIcon(icon);
Note:
See TracChangeset
for help on using the changeset viewer.