Changeset 5568 in josm for trunk/src/org


Ignore:
Timestamp:
2012-11-04T14:43:57+01:00 (12 years ago)
Author:
Don-vip
Message:

fix #7952 - GUI expert settings for enabling GPX/wireframe antialiasing (patch by Cobra)

Location:
trunk/src/org/openstreetmap/josm/gui/preferences/display
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java

    r4968 r5568  
    4545    private JCheckBox drawHelperLine = new JCheckBox(tr("Draw rubber-band helper line"));
    4646    private JCheckBox useAntialiasing = new JCheckBox(tr("Smooth map graphics (antialiasing)"));
     47    private JCheckBox useWireframeAntialiasing = new JCheckBox(tr("Smooth map graphics in wireframe mode (antialiasing)"));
    4748    private JCheckBox outlineOnly = new JCheckBox(tr("Draw only outlines of areas"));
    4849
     
    109110        useAntialiasing.setSelected(Main.pref.getBoolean("mappaint.use-antialiasing", true));
    110111
     112        // wireframe mode antialiasing
     113        useWireframeAntialiasing.setToolTipText(tr("Apply antialiasing to the map view in wireframe mode resulting in a smoother appearance."));
     114        useWireframeAntialiasing.setSelected(Main.pref.getBoolean("mappaint.wireframe.use-antialiasing", false));
     115
    111116        // highlighting
    112117        useHighlighting.setToolTipText(tr("Hightlight target nodes and ways while drawing or selecting"));
     
    124129        panel.add(performanceLabel, GBC.eop().insets(5,10,0,0));
    125130        panel.add(useAntialiasing, GBC.eop().insets(20,5,0,0));
     131        panel.add(useWireframeAntialiasing, GBC.eop().insets(20, 0, 0, 0));
    126132        panel.add(useHighlighting, GBC.eop().insets(20,0,0,0));
    127133        panel.add(outlineOnly, GBC.eol().insets(20,0,0,5));
     
    129135        ExpertToggleAction.addVisibilitySwitcher(performanceLabel);
    130136        ExpertToggleAction.addVisibilitySwitcher(useAntialiasing);
     137        ExpertToggleAction.addVisibilitySwitcher(useWireframeAntialiasing);
    131138        ExpertToggleAction.addVisibilitySwitcher(useHighlighting);
    132139        ExpertToggleAction.addVisibilitySwitcher(outlineOnly);
     
    148155        Main.pref.put("draw.data.inactive_color", inactive.isSelected());
    149156        Main.pref.put("mappaint.use-antialiasing", useAntialiasing.isSelected());
     157        Main.pref.put("mappaint.wireframe.use-antialiasing", useWireframeAntialiasing.isSelected());
    150158        Main.pref.put("draw.target-highlight", useHighlighting.isSelected());
    151159        Main.pref.put("draw.helper-line", drawHelperLine.isSelected());
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java

    r5429 r5568  
    6868    private JosmComboBox audioWaypointLabel = new JosmComboBox(LABEL_PATTERN_DESC);
    6969    private JTextField audioWaypointLabelPattern = new JTextField();
     70    private JCheckBox useGpsAntialiasing = new JCheckBox(tr("Smooth GPX graphics (antialiasing)"));
    7071
    7172    private String layerName;
     
    196197        add(new JLabel(tr("Drawing width of GPX lines")), GBC.std().insets(20,0,0,0));
    197198        add(drawLineWidth, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
     199
     200        // antialiasing
     201        useGpsAntialiasing.setToolTipText(tr("Apply antialiasing to the GPX lines resulting in a smoother appearance."));
     202        add(useGpsAntialiasing, GBC.eop().insets(20, 0, 0, 0));
     203        ExpertToggleAction.addVisibilitySwitcher(useGpsAntialiasing);
    198204
    199205        // colorTracks
     
    321327        hdopCircleGpsPoints.setSelected(Main.pref.getBoolean("draw.rawgps.hdopcircle",layerName, false));
    322328        largeGpsPoints.setSelected(Main.pref.getBoolean("draw.rawgps.large",layerName, false));
     329        useGpsAntialiasing.setSelected(Main.pref.getBoolean("mappaint.gpx.use-antialiasing", false));
    323330        drawRawGpsLinesActionListener.actionPerformed(null);
    324331
     
    381388        Main.pref.put("draw.rawgps.large"+layerNameDot, largeGpsPoints.isSelected());
    382389        Main.pref.put("draw.rawgps.linewidth"+layerNameDot, drawLineWidth.getText());
     390        Main.pref.put("mappaint.gpx.use-antialiasing", useGpsAntialiasing.isSelected());
    383391
    384392        TemplateEntryProperty.forMarker(layerName).put(waypointLabelPattern.getText());
Note: See TracChangeset for help on using the changeset viewer.