Ignore:
Timestamp:
2018-05-26T17:11:30+02:00 (6 years ago)
Author:
Don-vip
Message:

see #16319 - scale properly all icons using ButtonSpec

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
10 edited

Legend:

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

    r13840 r13842  
    3030import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
    3131import org.openstreetmap.josm.tools.ImageProvider;
     32import org.openstreetmap.josm.tools.ImageProvider.ImageSizes;
    3233import org.openstreetmap.josm.tools.InputMapUtils;
    3334import org.openstreetmap.josm.tools.Logging;
     
    6566
    6667        private final Collection<ChangeListener> listeners = new HashSet<>();
     68
     69        /**
     70         * Constructs a new {@code ButtonSpec}.
     71         * @param text the button text
     72         * @param imageProvider provides the icon to display. Can be null
     73         * @param tooltipText the tooltip text. Can be null.
     74         * @param helpTopic the help topic. Can be null.
     75         * @since 13842
     76         */
     77        public ButtonSpec(String text, ImageProvider imageProvider, String tooltipText, String helpTopic) {
     78            this(text, imageProvider != null ? imageProvider.setSize(ImageSizes.LARGEICON).get() : null, tooltipText, helpTopic, true);
     79        }
    6780
    6881        /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java

    r13761 r13842  
    619619                    new ButtonSpec(
    620620                            tr("OK"),
    621                             ImageProvider.get("ok"),
     621                            new ImageProvider("ok"),
    622622                            tr("Click to close this dialog and continue editing"),
    623623                            null /* no specific help */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/CancelAction.java

    r12846 r13842  
    7575                new ButtonSpec(
    7676                        tr("Yes, save the changes and close"),
    77                         ImageProvider.get("ok"),
     77                        new ImageProvider("ok"),
    7878                        tr("Click to save the changes and close this relation editor"),
    7979                        null /* no specific help topic */
     
    8181                new ButtonSpec(
    8282                        tr("No, discard the changes and close"),
    83                         ImageProvider.get("cancel"),
     83                        new ImageProvider("cancel"),
    8484                        tr("Click to discard the changes and close this relation editor"),
    8585                        null /* no specific help topic */
     
    8787                new ButtonSpec(
    8888                        tr("Cancel, continue editing"),
    89                         ImageProvider.get("cancel"),
     89                        new ImageProvider("cancel"),
    9090                        tr("Click to return to the relation editor and to resume relation editing"),
    9191                        null /* no specific help topic */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RefreshAction.java

    r13130 r13842  
    8585                new ButtonSpec(
    8686                        tr("Yes, discard changes and reload"),
    87                         ImageProvider.get("ok"),
     87                        new ImageProvider("ok"),
    8888                        tr("Click to discard the changes and reload data from layer"),
    8989                        null /* no specific help topic */
     
    9191                new ButtonSpec(
    9292                        tr("Cancel, continue editing"),
    93                         ImageProvider.get("cancel"),
     93                        new ImageProvider("cancel"),
    9494                        tr("Click to return to the relation editor and to resume relation editing"),
    9595                        null /* no specific help topic */
     
    114114                new ButtonSpec(
    115115                        tr("Yes"),
    116                         ImageProvider.get("ok"),
    117                         tr("Click to close window"),
     116                        new ImageProvider("ok"),
     117                        tr("Click to closnew ImageProvidere window"),
    118118                        null /* no specific help topic */
    119119                ),
    120120                new ButtonSpec(
    121121                        tr("No, continue editing"),
    122                         ImageProvider.get("cancel"),
     122                        new ImageProvider("cancel"),
    123123                        tr("Click to return to the relation editor and to resume relation editing"),
    124124                        null /* no specific help topic */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SavingAction.java

    r13654 r13842  
    116116                new ButtonSpec(
    117117                        tr("Yes, create a conflict and close"),
    118                         ImageProvider.get("ok"),
     118                        new ImageProvider("ok"),
    119119                        tr("Click to create a conflict and close this relation editor"),
    120120                        null /* no specific help topic */
     
    122122                new ButtonSpec(
    123123                        tr("No, continue editing"),
    124                         ImageProvider.get("cancel"),
     124                        new ImageProvider("cancel"),
    125125                        tr("Click to return to the relation editor and to resume relation editing"),
    126126                        null /* no specific help topic */
  • trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java

    r12636 r13842  
    132132                new ButtonSpec(
    133133                        lbl,
    134                         ImageProvider.get("updatedata"),
    135                         null,
    136                         null
    137                 ),
     134                        new ImageProvider("updatedata"),
     135                        null, null),
    138136                new ButtonSpec(
    139137                        tr("Synchronize entire dataset"),
    140                         ImageProvider.get("updatedata"),
    141                         null,
    142                         null
    143                 ),
     138                        new ImageProvider("updatedata"),
     139                        null, null),
    144140                new ButtonSpec(
    145141                        tr("Cancel"),
    146                         ImageProvider.get("cancel"),
    147                         null,
    148                         null
    149                 )
     142                        new ImageProvider("cancel"),
     143                        null, null)
    150144        };
    151145        String msg = tr("<html>Uploading <strong>failed</strong> because the server has a newer version of one<br>"
     
    186180                new ButtonSpec(
    187181                        tr("Synchronize entire dataset"),
    188                         ImageProvider.get("updatedata"),
    189                         null,
    190                         null
    191                 ),
     182                        new ImageProvider("updatedata"),
     183                        null, null),
    192184                new ButtonSpec(
    193185                        tr("Cancel"),
    194                         ImageProvider.get("cancel"),
    195                         null,
    196                         null
    197                 )
     186                        new ImageProvider("cancel"),
     187                        null, null)
    198188        };
    199189        String msg = tr("<html>Uploading <strong>failed</strong> because the server has a newer version of one<br>"
     
    249239                new ButtonSpec(
    250240                        tr("Prepare conflict resolution"),
    251                         ImageProvider.get("ok"),
     241                        new ImageProvider("ok"),
    252242                        tr("Click to download all referring objects for {0}", conflict.a),
    253243                        null /* no specific help context */
     
    255245                new ButtonSpec(
    256246                        tr("Cancel"),
    257                         ImageProvider.get("cancel"),
     247                        new ImageProvider("cancel"),
    258248                        tr("Click to cancel and to resume editing the map"),
    259249                        null /* no specific help context */
  • trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java

    r13453 r13842  
    8686                new ButtonSpec(
    8787                        tr("Continue uploading"),
    88                         ImageProvider.get("upload"),
     88                        new ImageProvider("upload"),
    8989                        tr("Click to continue uploading to additional new changesets"),
    9090                        null /* no specific help text */
     
    9292                new ButtonSpec(
    9393                        tr("Go back to Upload Dialog"),
    94                         ImageProvider.get("dialogs", "uploadproperties"),
     94                        new ImageProvider("dialogs", "uploadproperties"),
    9595                        tr("Click to return to the Upload Dialog"),
    9696                        null /* no specific help text */
     
    9898                new ButtonSpec(
    9999                        tr("Abort"),
    100                         ImageProvider.get("cancel"),
     100                        new ImageProvider("cancel"),
    101101                        tr("Click to abort uploading"),
    102102                        null /* no specific help text */
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongPanel.java

    r13724 r13842  
    167167                new ButtonSpec(
    168168                        tr("Download"),
    169                         ImageProvider.get("download"),
     169                        new ImageProvider("download"),
    170170                        tr("Click to download"),
    171171                        null // no specific help text
     
    173173                new ButtonSpec(
    174174                        tr("Cancel"),
    175                         ImageProvider.get("cancel"),
     175                        new ImageProvider("cancel"),
    176176                        tr("Click to cancel"),
    177177                        null // no specific help text
  • trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java

    r13173 r13842  
    164164                new ButtonSpec(
    165165                        tr("Continue"),
    166                         ImageProvider.get("ok"),
     166                        new ImageProvider("ok"),
    167167                        tr("Click to reset the OAuth settings to default values"),
    168168                        null /* no dedicated help topic */
     
    170170                new ButtonSpec(
    171171                        tr("Cancel"),
    172                         ImageProvider.get("cancel"),
     172                        new ImageProvider("cancel"),
    173173                        tr("Click to abort resetting to the OAuth default values"),
    174174                        null /* no dedicated help topic */
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java

    r13799 r13842  
    272272                new ButtonSpec(
    273273                        tr("OK"),
    274                         ImageProvider.get("ok"),
     274                        new ImageProvider("ok"),
    275275                        tr("Accept the new plugin sites and close the dialog"),
    276276                        null /* no special help topic */
     
    278278                        new ButtonSpec(
    279279                                tr("Cancel"),
    280                                 ImageProvider.get("cancel"),
     280                                new ImageProvider("cancel"),
    281281                                tr("Close the dialog"),
    282282                                null /* no special help topic */
Note: See TracChangeset for help on using the changeset viewer.