Changeset 5660 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2013-01-03T20:59:47+01:00 (12 years ago)
Author:
Don-vip
Message:

Enable menu scroller for imagery menu

File:
1 edited

Legend:

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

    r5463 r5660  
    66
    77import java.awt.Component;
     8import java.awt.Toolkit;
    89import java.awt.event.ActionEvent;
    910import java.util.List;
     
    7273    public ImageryMenu() {
    7374        super(tr("Imagery"));
     75        int screenHeight = Toolkit.getDefaultToolkit().getScreenSize().height;
     76        int menuItemHeight = singleOffset.getPreferredSize().height;
     77        MenuScroller.setScrollerFor(this, (screenHeight / menuItemHeight)-1);
    7478        MapView.addLayerChangeListener(this);
    7579    }
Note: See TracChangeset for help on using the changeset viewer.