Changeset 5543 in josm for trunk/src/org
- Timestamp:
- 2012-10-30T15:40:23+01:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
r5509 r5543 341 341 342 342 public ImageIcon getIcon() { 343 return icon == null ? null : loadImageIcon(icon, zipIcons );343 return icon == null ? null : loadImageIcon(icon, zipIcons, 24); 344 344 } 345 345 … … 1264 1264 } 1265 1265 1266 protected static ImageIcon loadImageIcon(String iconName, File zipIcons ) {1266 protected static ImageIcon loadImageIcon(String iconName, File zipIcons, Integer maxSize) { 1267 1267 final Collection<String> s = Main.pref.getCollection("taggingpreset.icon.sources", null); 1268 return new ImageProvider(iconName).setDirs(s).setId("presets").setArchive(zipIcons).setOptional(true).get(); 1268 ImageProvider imgProv = new ImageProvider(iconName).setDirs(s).setId("presets").setArchive(zipIcons).setOptional(true); 1269 if (maxSize != null) { 1270 imgProv.setMaxSize(24); 1271 } 1272 return imgProv.get(); 1269 1273 } 1270 1274 -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r5540 r5543 197 197 this.maxHeight = maxSize.height; 198 198 return this; 199 } 200 201 /** 202 * Convenience method, see {@link #setMaxSize(Dimension)}. 203 */ 204 public ImageProvider setMaxSize(int maxSize) { 205 return this.setMaxSize(new Dimension(maxSize, maxSize)); 199 206 } 200 207
Note:
See TracChangeset
for help on using the changeset viewer.