Opened 10 years ago
Closed 3 years ago
#8352 closed enhancement (fixed)
Color picker for presets, color viewer for tag toolbox
Reported by: | !i! | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 20.05 |
Component: | Core | Version: | |
Keywords: | color preset-ui | Cc: | AndreasHae |
Description
As esp. 3D with OSM lifes from *:colour=* attributes to make objects looking natural, I recommend to embedd an color-viewer in the tags toolbox and allow it to click it to open an colour picker.
Maybe this simplifies for people to bring the rainbow to OSM ;)
Attachments (11)
Change History (54)
comment:1 Changed 10 years ago by
Keywords: | color added |
---|
comment:3 Changed 4 years ago by
Cc: | AndreasHae added |
---|---|
Keywords: | preset-ui added |
Summary: | Color picker → Color picker for presets, color viewer for tag toolbox |
Changed 3 years ago by
Attachment: | 2020-04-12-170330_468x707_scrot.png added |
---|
comment:6 Changed 3 years ago by
Nice, thanks.
Does it work automatically for *colour*
or what is to be done ?
Could you, please, add it to the documentation at TaggingPresets. Thanks
comment:7 Changed 3 years ago by
Done: TaggingPresets?action=diff&version=167 (your question is answered there as well)
comment:9 Changed 3 years ago by
It broke org.openstreetmap.josm.gui.tagging.presets.items.ComboTest.testAddToPanel
java.lang.NullPointerException at org.openstreetmap.josm.gui.tagging.presets.items.Combo.addToPanelAnchor(Combo.java:103) at org.openstreetmap.josm.gui.tagging.presets.items.ComboMultiSelect.addToPanel(ComboMultiSelect.java:392) at org.openstreetmap.josm.gui.tagging.presets.items.ComboTest.testAddToPanel(ComboTest.java:36)
Changed 3 years ago by
Attachment: | 2020-04-12-231958_476x380_scrot.png added |
---|
Changed 3 years ago by
Attachment: | 8352_green.png added |
---|
Changed 3 years ago by
Attachment: | 8352_brown.png added |
---|
Changed 3 years ago by
Attachment: | 8352_sort.png added |
---|
comment:12 follow-up: 15 Changed 3 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This is a great feature, but it still has some bugs for me.
- While green works in the properties dialog, brown does not, see attachment:8352_green.png and attachment:8352_brown.png (brown should be supported too, as it is in this list https://www.w3.org/TR/css-color-3/#svg-color)
- Both don't work in the preset dialog, see same screenshots
- If you sort in the properties dialog, the square doesn't sort, but keeps it position, see attachment:8352_sort.png
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-04-12 23:55:52 +0200 (Sun, 12 Apr 2020) Build-Date:2020-04-13 01:30:46 Revision:16284 Relative:URL: ^/trunk Identification: JOSM/1.5 (16284 de) Windows 10 64-Bit OS Build number: Windows 10 Pro 1909 (18363) Memory Usage: 802 MB / 1820 MB (288 MB allocated, but free) Java version: 1.8.0_241-b07, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 1680x1050 Maximum Screen Size: 1680x1050 ...
Changed 3 years ago by
Attachment: | 8352_frame.png added |
---|
comment:13 Changed 3 years ago by
If I use hex code instead of color names, I see a thin colored frame in the preset dialog, see attachment:8352_frame.png
comment:15 Changed 3 years ago by
Replying to Klumbumbus:
- While green works in the properties dialog, brown does not, see attachment:8352_green.png and attachment:8352_brown.png (brown should be supported too, as it is in this list https://www.w3.org/TR/css-color-3/#svg-color)
Java's support for color names is very limited: "Black" "Silver" "Gray" "White" "Maroon" "Red" "Purple" "Fuchsia" "Green" "Lime" "Olive" "Yellow" "Navy" "Blue" "Teal" "Aqua" "Orange" (taken from javax.swing.text.html.CSS#stringToColor
) – those correspond to the basic list from https://www.w3.org/TR/css3-color/#html4
It seems that we'll have to compile the color list from https://www.w3.org/TR/css-color-3/#svg-color into our ColourHelper
…
EDIT: We can reuse the ColorTable from svgSalamander – com.kitfox.svg.xml.ColorTable
comment:16 Changed 3 years ago by
OK, I took that statement from wiki:/Help/Styles/MapCSSImplementation#Propertyvaluesexplanations "named color as found in this list"
comment:17 Changed 3 years ago by
Ah, nice – we're shipping the colors twice:
org.openstreetmap.josm.gui.mappaint.mapcss.CSSColors
com.kitfox.svg.xml.ColorTable
comment:20 Changed 3 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:21 Changed 3 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The box in the preset still shows no color for me. Also the properties dialog doesn't display the actual value of the colour key. E.g. when the value is "green", it shows "#008000", thats not nice.
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-04-14 21:56:05 +0200 (Tue, 14 Apr 2020) Build-Date:2020-04-15 01:30:44 Revision:16301 Relative:URL: ^/trunk Identification: JOSM/1.5 (16301 de) Windows 10 64-Bit OS Build number: Windows 10 Pro 1909 (18363) Memory Usage: 636 MB / 1820 MB (413 MB allocated, but free) Java version: 1.8.0_251-b08, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 1680x1050 Maximum Screen Size: 1680x1050 VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=C:\Program Files (x86)\josm-latest.jnlp, -Djnlpx.remove=false, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=NULL,2048m, -Djnlpx.splashport=60168, -Djnlpx.jvm=<java.home>\bin\javaw.exe] Dataset consistency test: No problems found
comment:24 follow-up: 25 Changed 3 years ago by
comment:25 follow-up: 29 Changed 3 years ago by
The string display in properties dialog is fixed, but:
- regarding the square in the properties dialog, green works but red not
- the box in the preset still doesn't work
see 8352_16314.gif
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-04-15 23:44:38 +0200 (Wed, 15 Apr 2020) Build-Date:2020-04-16 01:30:46 Revision:16314 Relative:URL: ^/trunk Identification: JOSM/1.5 (16314 de) Windows 10 64-Bit OS Build number: Windows 10 Pro 1909 (18363) Memory Usage: 835 MB / 1820 MB (266 MB allocated, but free) Java version: 1.8.0_251-b08, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 1680x1050 Maximum Screen Size: 1680x1050 VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=C:\Program Files (x86)\josm-latest.jnlp, -Djnlpx.remove=false, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=NULL,2048m, -Djnlpx.splashport=50146, -Djnlpx.jvm=<java.home>\bin\javaw.exe] Dataset consistency test: No problems found
Changed 3 years ago by
Attachment: | 8352_16314.gif added |
---|
comment:27 Changed 3 years ago by
Err, "red"
matched "red".length() == 3
in trunk/src/org/openstreetmap/josm/tools/ColorHelper.java?rev=+16293#L25, and "rreedd"
is an unknown color name.
comment:29 follow-up: 31 Changed 3 years ago by
Replying to Klumbumbus:
- the box in the preset still doesn't work
see 8352_16314.gif
Maybe someone having a Windows system can debug/fix this issue. Doesn't affect Arch Linux / MetalLookAndFeel.
comment:30 Changed 3 years ago by
Replying to simon04:
In 16319/josm:
"red" works now but there is still a bug. "#FFF" and "#FFFFFF" should both be interpreted as white, but "#FFF" shows a blue square.
comment:31 follow-up: 37 Changed 3 years ago by
Replying to simon04:
Replying to Klumbumbus:
- the box in the preset still doesn't work
see 8352_16314.gif
Maybe someone having a Windows system can debug/fix this issue. Doesn't affect Arch Linux / MetalLookAndFeel.
I just tested all the other Look and Feels and it works for all except for the default "windows" look and feel.
comment:33 follow-up: 36 Changed 3 years ago by
- I would also expect the color viewer to work for localized color names. Currently it only works for English ones as you can also see in see 8352_16314.gif
E.g. if a German user selects "Blau" from a colour dropdown the colour preview for the actual tag value "blue" should show.
- Also when no colour has been selected yet there is no indication that the colour picker area is actually clickable. At least on the Mac OS X look and feel the area just blends in tone in tone with the background. Maybe adding at least an outline frame to this field or even a colour palette / pipette icon would help indicate this invokes a colour picker dialog.
Changed 3 years ago by
Attachment: | Invisible_color_picker_area.png added |
---|
Grey area right hand side of colour dropdown is missing indicator that it is clickable
comment:36 Changed 3 years ago by
Replying to Claudius:
Also when no colour has been selected yet there is no indication that the colour picker area is actually clickable. At least on the Mac OS X look and feel the area just blends in tone in tone with the background. Maybe adding at least an outline frame to this field or even a colour palette / pipette icon would help indicate this invokes a colour picker dialog.
Maybe reverting r16294 helps here?
comment:37 Changed 3 years ago by
Replying to Klumbumbus:
Replying to simon04:
Replying to Klumbumbus:
- the box in the preset still doesn't work
see 8352_16314.gif
Maybe someone having a Windows system can debug/fix this issue. Doesn't affect Arch Linux / MetalLookAndFeel.
I just tested all the other Look and Feels and it works for all except for the default "windows" look and feel.
If we chan't get it fixed before the 20.05 release maybe a workaround could be to add ▉ (U+2589) as label of the button and colorize this text?
Changed 3 years ago by
Attachment: | 2020-05-31-201708.png added |
---|
Changed 3 years ago by
Attachment: | 2020-05-31-201920.png added |
---|
comment:38 Changed 3 years ago by
I cannot reproduce the Windows LaF problem:
Revision:16530 Is-Local-Build:true Build-Date:2020-05-31 17:49:11 Identification: JOSM/1.5 (16530 SVN en_GB) Windows 10 64-Bit OS Build number: Windows 10 Pro 1909 (18363) Memory Usage: 141 MB / 2046 MB (55 MB allocated, but free) Java version: 14+36, AdoptOpenJDK, OpenJDK 64-Bit Server VM Screen: \Display0 1920x1200 Maximum Screen Size: 1920x1200 Dataset consistency test: No problems found
comment:40 Changed 3 years ago by
I just tested with another computer see below and there it works. So it is probably either due to oracle vs. openjdk or java8 vs. java9+
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-05-29 21:11:25 +0200 (Fri, 29 May 2020) Revision:16523 Build-Date:2020-05-30 01:30:48 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (16523 en) Windows 10 64-Bit OS Build number: Windows 10 Pro 1909 (18363) Memory Usage: 364 MB / 2026 MB (182 MB allocated, but free) Java version: 11.0.2+9-LTS, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 2160x1440 Maximum Screen Size: 2160x1440 Dataset consistency test: No problems found
Changed 3 years ago by
Attachment: | josm_tagsMembership_panal_color.png added |
---|
TagsMembership panel with same color as background
comment:41 Changed 3 years ago by
I still have problems if the color is the same as the background in Tags/Membership panel. Think we need some box around the color.
comment:42 Changed 3 years ago by
To summarize the open problems:
- Button visually hard to identify on OSX (at least we got the hand cursor) – attachment:Invisible_color_picker_area.png
- White on white in the tags panel – attachment:josm_tagsMembership_panal_color.png
Those two issues should be addressed eventually. However, I don't think they block the upcoming 20.05 release.
comment:43 Changed 3 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Please create a new ticket affected to 20.06 milestone for the remaining things. I just released 20.05 as r16538
See also #8935