Changeset 6774 in josm for trunk/src


Ignore:
Timestamp:
2014-01-29T22:15:06+01:00 (11 years ago)
Author:
simon04
Message:

fix #9633 - MapCSS: allow (named) colours with alpha

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r6671 r6774  
    877877        String colStr = specName != null ? get("color."+specName) : "";
    878878        if (colStr.isEmpty()) {
    879             colStr = get("color." + colKey, ColorHelper.color2html(def));
     879            colStr = get("color." + colKey, ColorHelper.color2html(def, true));
    880880        }
    881881        if (colStr != null && !colStr.isEmpty()) {
     
    893893
    894894    synchronized public boolean putColor(String colKey, Color val) {
    895         return put("color."+colKey, val != null ? ColorHelper.color2html(val) : null);
     895        return put("color."+colKey, val != null ? ColorHelper.color2html(val, true) : null);
    896896    }
    897897
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj

    r6740 r6774  
    5252|   < REGEX: "/" <REGEX_CHAR_WITHOUT_STAR> ( <REGEX_CHAR_WITHOUT_STAR> | "*" )*  "/" >
    5353|   < #H: ["0"-"9","a"-"f","A"-"F"] >
    54 |   < HEXCOLOR: "#" ( <H><H><H><H><H><H> | <H><H><H> ) >
     54|   < HEXCOLOR: "#" ( <H><H><H><H><H><H><H><H> | <H><H><H><H><H><H> | <H><H><H> ) >
    5555|   < S: ( " " | "\t" | "\n" | "\r" | "\f" )+ >
    5656|   < STAR: "*" >
Note: See TracChangeset for help on using the changeset viewer.