Changeset 8442 in josm for trunk/src


Ignore:
Timestamp:
2015-06-02T14:58:03+02:00 (9 years ago)
Author:
Don-vip
Message:

Fix #11266 - SVG versions of JOSM and OAuth logos + some other buttons (patch by floscher)

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

Legend:

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

    r8378 r8442  
    66import java.awt.Dimension;
    77import java.awt.GridBagLayout;
     8import java.awt.Image;
    89import java.awt.event.ActionEvent;
    910import java.awt.event.KeyEvent;
    1011
    1112import javax.swing.BorderFactory;
     13import javax.swing.ImageIcon;
    1214import javax.swing.JLabel;
    1315import javax.swing.JOptionPane;
     
    3032
    3133/**
    32  * Nice about screen. I guess every application need one these days.. *sigh*
     34 * Nice about screen.
    3335 *
    34  * The REVISION resource is read and if present, it shows the revision
    35  * information of the jar-file.
     36 * The REVISION resource is read and if present, it shows the revision information of the jar-file.
    3637 *
    3738 * @author imi
     
    9091        info.add(GBC.glue(0,5), GBC.eol());
    9192        info.add(new JLabel(tr("Bug Reports")), GBC.std().insets(10,0,10,0));
    92         info.add(BugReportExceptionHandler.getBugReportUrlLabel(Utils.strip(ShowStatusReportAction.getReportHeader())), GBC.eol().fill(GBC.HORIZONTAL));
     93        info.add(BugReportExceptionHandler.getBugReportUrlLabel(Utils.strip(ShowStatusReportAction.getReportHeader())),
     94                GBC.eol().fill(GBC.HORIZONTAL));
    9395
    9496        about.addTab(tr("Info"), info);
     
    105107
    106108        GuiHelper.prepareResizeableOptionPane(panel, panel.getPreferredSize());
    107         JOptionPane.showMessageDialog(Main.parent, panel, tr("About JOSM..."),
    108                 JOptionPane.INFORMATION_MESSAGE, ImageProvider.get("logo"));
     109        JOptionPane.showMessageDialog(Main.parent, panel, tr("About JOSM..."), JOptionPane.INFORMATION_MESSAGE,
     110                new ImageIcon(ImageProvider.get("logo.svg").getImage().getScaledInstance(256, 258, Image.SCALE_SMOOTH)));
    109111    }
    110112
  • trunk/src/org/openstreetmap/josm/gui/SideButton.java

    r8308 r8442  
    8383        setLayout(new BorderLayout());
    8484        setIconTextGap(2);
    85         setMargin(new Insets(-1,0,-1,0));
     85        setMargin(new Insets(0,0,0,0));
    8686    }
    8787
  • trunk/src/org/openstreetmap/josm/gui/SplashScreen.java

    r8308 r8442  
    6060
    6161        // Add the logo
    62         JLabel logo = new JLabel(new ImageIcon(ImageProvider.get("logo.png").getImage().getScaledInstance(128, 129, Image.SCALE_SMOOTH)));
     62        JLabel logo = new JLabel(new ImageIcon(ImageProvider.get("logo.svg").getImage().getScaledInstance(128, 129, Image.SCALE_SMOOTH)));
    6363        GridBagConstraints gbc = new GridBagConstraints();
    6464        gbc.gridheight = 2;
  • trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java

    r8308 r8442  
    335335        public RunAuthorisationAction() {
    336336            putValue(NAME, tr("Authorize now"));
    337             putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth"));
     337            putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));
    338338            putValue(SHORT_DESCRIPTION, tr("Click to redirect you to the authorization form on the JOSM web site"));
    339339            updateEnabledState();
  • trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java

    r8308 r8442  
    247247        public TestAccessTokenAction() {
    248248            putValue(NAME, tr("Test Access Token"));
    249             putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth"));
     249            putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));
    250250            putValue(SHORT_DESCRIPTION, tr("Click to test the Access Token"));
    251251            updateEnabledState();
  • trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java

    r8426 r8442  
    8989     * Builds the panel with general information in the header
    9090     *
    91      * @return panel woth information display
     91     * @return panel with information display
    9292     */
    9393    protected JPanel buildHeaderInfoPanel() {
     
    101101        gc.weightx = 1.0;
    102102        gc.gridwidth = 2;
    103         JLabel lbl = new JLabel();
    104         lbl.setIcon(ImageProvider.get("oauth", "oauth-logo"));
     103        ImageProvider logoProv = new ImageProvider("oauth", "oauth-logo");
     104        JLabel lbl = new JLabel(logoProv.get());
     105        lbl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    105106        lbl.setOpaque(true);
    106107        pnl.add(lbl, gc);
     
    167168
    168169        setTitle(tr("Get an Access Token for ''{0}''", apiUrl));
     170        this.setMinimumSize(new Dimension(420, 400));
    169171
    170172        pnlFullyAutomaticAuthorisationUI = new FullyAutomaticAuthorizationUI(apiUrl);
  • trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java

    r8426 r8442  
    385385        public RetrieveRequestTokenAction() {
    386386            putValue(NAME, tr("Retrieve Request Token"));
    387             putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth"));
     387            putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));
    388388            putValue(SHORT_DESCRIPTION, tr("Click to retrieve a Request Token"));
    389389        }
     
    421421        public RetrieveAccessTokenAction() {
    422422            putValue(NAME, tr("Retrieve Access Token"));
    423             putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth"));
     423            putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));
    424424            putValue(SHORT_DESCRIPTION, tr("Click to retrieve an Access Token"));
    425425        }
     
    458458        public TestAccessTokenAction() {
    459459            putValue(NAME, tr("Test Access Token"));
    460             putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth"));
     460            putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));
    461461            putValue(SHORT_DESCRIPTION, tr("Click to test the Access Token"));
    462462        }
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java

    r6901 r8442  
    311311            putValue(NAME, tr("Authorize now"));
    312312            putValue(SHORT_DESCRIPTION, tr("Click to step through the OAuth authorization process"));
    313             putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth"));
     313            putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));
    314314
    315315        }
     
    337337            putValue(NAME, tr("New Access Token"));
    338338            putValue(SHORT_DESCRIPTION, tr("Click to step through the OAuth authorization process and generate a new Access Token"));
    339             putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth"));
     339            putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));
    340340
    341341        }
     
    363363            putValue(NAME, tr("Test Access Token"));
    364364            putValue(SHORT_DESCRIPTION, tr("Click test access to the OSM server with the current access token"));
    365             putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth"));
     365            putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));
    366366
    367367        }
Note: See TracChangeset for help on using the changeset viewer.