Changeset 7694 in josm


Ignore:
Timestamp:
2014-11-02T11:38:51+01:00 (5 years ago)
Author:
stoecker
Message:

image size fixes

Location:
trunk/src/org/openstreetmap/josm
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/HelpAction.java

    r7434 r7694  
    2727     */
    2828    public HelpAction() {
    29         super(tr("Help"), ImageProvider.get("help"));
     29        super(tr("Help"));
     30        new ImageProvider("help").getResource().getImageIcon(this);
    3031        putValue("toolbar", "help");
    3132        setEnabled(!Main.isOffline(OnlineResource.JOSM_WEBSITE));
  • trunk/src/org/openstreetmap/josm/gui/IconToggleButton.java

    r6990 r7694  
    158158    @Override
    159159    public Icon getIcon() {
    160         return (Icon) getSafeActionValue(Action.SMALL_ICON);
     160        Object o = getSafeActionValue(Action.LARGE_ICON_KEY);
     161        if (o == null)
     162            o = getSafeActionValue(Action.SMALL_ICON);
     163        return (Icon) o;
    161164    }
    162165
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r7624 r7694  
    604604        add(fileMenu, saveAs);
    605605        sessionMenu.setToolTipText(tr("Save and load the current session (list of layers, etc.)"));
    606         sessionMenu.setIcon(ImageProvider.get("session"));
     606        sessionMenu.setIcon(new ImageProvider("session").setSize(ImageProvider.ImageSizes.MENU).get());
    607607        sessionSaveAs = new SessionSaveAsAction();
    608608        sessionLoad = new SessionLoadAction();
  • trunk/src/org/openstreetmap/josm/gui/io/RecentlyOpenedFilesMenu.java

    r6070 r7694  
    3030        super(tr("Open Recent"));
    3131        setToolTipText(tr("List of recently opened files"));
    32         setIcon(ImageProvider.get("openrecent.png"));
     32        setIcon(new ImageProvider("openrecent").setSize(ImageProvider.ImageSizes.MENU).get());
    3333        putClientProperty("help", ht("/Action/OpenRecent"));
    3434
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java

    r7665 r7694  
    8585    public MapPaintMenu() {
    8686        super(tr("Map Paint Styles"));
    87         setIcon(ImageProvider.get("dialogs", "mapstyle"));
     87        setIcon(new ImageProvider("dialogs", "mapstyle").setSize(ImageProvider.ImageSizes.MENU).get());
    8888        MapPaintStyles.addMapPaintSylesUpdateListener(this);
    8989        putClientProperty("help", ht("/Dialog/MapPaint"));
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r7693 r7694  
    119119        /* MAP icon */
    120120        MAP,
    121         /* MAP icon maximum size*/
     121        /* MAP icon maximum size */
    122122        MAPMAX,
     123        /* MENU icon size */
     124        MENU,
    123125    }
    124126
     
    254256        case MAP: sizeval = Main.pref.getInteger("iconsize.mapmax", 16); break;
    255257        case LARGEICON: sizeval = Main.pref.getInteger("iconsize.largeicon", 24); break;
     258        case MENU: /* MENU is SMALLICON - only provided in case of future changes */
    256259        case SMALLICON: sizeval = Main.pref.getInteger("iconsize.smallicon", 16); break;
    257260        default: sizeval = Main.pref.getInteger("iconsize.default", 24); break;
     
    949952     * @return an icon that represent the overlay of the two given icons. The second icon is layed
    950953     * on the first relative to the given position.
    951      */
     954     * FIXME: This function does not fit into the ImageProvider concept as public function!
     955     * Overlay should be handled like all the other functions only settings arguments and
     956     * overlay must be transparent in the background.
     957     * Also scaling is not cared about with current implementation.
     958     */
     959    @Deprecated
    952960    public static ImageIcon overlay(Icon ground, Icon overlay, OverlayPosition pos) {
    953961        int w = ground.getIconWidth();
Note: See TracChangeset for help on using the changeset viewer.