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


Ignore:
Timestamp:
2009-07-03T23:50:09+02:00 (15 years ago)
Author:
stoecker
Message:

missing button markers for layer switches (e.g. for audio tracks) fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ButtonMarker.java

    r1724 r1726  
    5252        Point mousePosition = mv.getMousePosition();
    5353
    54         if (mousePosition != null) {
    55             // mouse is inside the window
    56             if (mousePressed) {
    57                 b = BorderFactory.createBevelBorder(BevelBorder.LOWERED);
    58             } else {
    59                 b = BorderFactory.createBevelBorder(BevelBorder.RAISED);
    60             }
    61             Insets inset = b.getBorderInsets(mv);
    62             Rectangle r = new Rectangle(buttonRectangle);
    63             r.grow((inset.top+inset.bottom)/2, (inset.left+inset.right)/2);
    64             b.paintBorder(mv, g, r.x, r.y, r.width, r.height);
     54        // mouse is inside the window
     55        if (mousePosition != null && mousePressed) {
     56            b = BorderFactory.createBevelBorder(BevelBorder.LOWERED);
     57        } else {
     58            b = BorderFactory.createBevelBorder(BevelBorder.RAISED);
    6559        }
     60        Insets inset = b.getBorderInsets(mv);
     61        Rectangle r = new Rectangle(buttonRectangle);
     62        r.grow((inset.top+inset.bottom)/2, (inset.left+inset.right)/2);
     63        b.paintBorder(mv, g, r.x, r.y, r.width, r.height);
    6664        if ((text != null) && (show.equalsIgnoreCase("show")) && Main.pref.getBoolean("marker.buttonlabels", true))
    6765            g.drawString(text, screen.x+4, screen.y+2);
Note: See TracChangeset for help on using the changeset viewer.