#19027 closed enhancement (fixed)
FlatLaf dark and light look and feels
Reported by: | DevCharly | Owned by: | simon04 |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin flatlaf | Version: | |
Keywords: | Cc: |
Description
(crosspost of https://forum.openstreetmap.org/viewtopic.php?id=69029)
Hello,
I'm the author of the FlatLaf look and feel (https://github.com/JFormDesigner/FlatLaf)
and wanted to ask whether the JOSM community is interested in using FlatLaf in JOSM.
FlatLaf is a new modern open-source L&F that looks similar to Darcula/IntelliJ
themes you maybe know from IntelliJ IDEA. It comes with dark and light themes,
supports 3rd party IntelliJ themes, scales on HiDPI displays, runs on all
platforms (Windows, Linux and macOS), uses Mac platform specific key bindings on
macOS and is easy to integrate into existing Swing applications.
While FlatLaf is still young, there are already a lot of applications using it.
Most prominent is NetBeans 11.3.
Here are some screenshots of JOSM running with FlatLaf:
If there is interest in using FlatLaf in JOSM, I'm willing to integrate it,
fix FlatLaf related issues and submit SVN patches.
JOSM with FlafLaf Dark requires some minor color adjustments where hardcoded
colors are used in JOSM UI components.
I'll attach the patch used to create the screenshots to this ticket.
Thanks,
Karl
Attachments (2)
Change History (33)
by , 5 years ago
Attachment: | JOSM FlatLaf patch 1.diff added |
---|
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Component: | Core → Plugin |
---|
Long years we had the plastic_laf, maybe that can be used as base for a new plugin. I also think this is good as plugin. It's nothing for the core.
comment:3 by , 5 years ago
plastic_laf plugin has been archived here: https://svn.openstreetmap.org/applications/editors/josm/oldplugins/plastic_laf/
comment:4 by , 5 years ago
OK, then I'll create a plugin.
Thanks for the link to the plastic_laf plugin.
comment:5 by , 5 years ago
[o35482] - see #josm19027 - Add flatlaf plugin
However, due to r16498, even the early plugins are loaded too late (since setupUIManager
is called before). I'm unsure when to load LaF plugins – ideally those would be loaded even early (before setupUIManager
)…
comment:7 by , 5 years ago
I`d like to test the plugin but it is not listed under Plugins and therefore not available under preferences.
Is there something missing ?
comment:8 by , 5 years ago
Due to the problem mentioned in comment:5 (see also: ticket:19290#comment:5 et seq.), I haven't build a flatlaf.jar
yet.
comment:10 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
follow-up: 16 comment:15 by , 5 years ago
How do I set the look and feel after installing the plugin? I can't find anything new in the preferences under wiki:/Help/Preferences/Display#LookAndFeel or somewhere else.
follow-up: 17 comment:16 by , 5 years ago
Replying to Klumbumbus:
How do I set the look and feel after installing the plugin? I can't find anything new in the preferences under wiki:/Help/Preferences/Display#LookAndFeel or somewhere else.
I got it working by setting the proper value in advanced preferences for laf
. Values are described here.
Guess a proper Gui integration to have the four values listed together with the default ones under Display Settings -> Look and Feel is needed.
comment:17 by , 5 years ago
Replying to skyper:
I got it working by setting the proper value in advanced preferences for
laf
. Values are described here.
Thx, that worked.
Guess a proper Gui integration to have the four values listed together with the default ones under Display Settings -> Look and Feel is needed.
Yes that would be useful. Can you add that Simon?
comment:18 by , 5 years ago
Have not tried it, but I think the recent change in [35535/osm]
is responsible for not showing FlatLaf in the UI.
Those FlatLaf.install()
methods invoke UIManager.setLookAndFeel()
,
but invocation of UIManager.installLookAndFeel()
is needed to show FlatLaf in the list of available LaFs in the UI.
comment:21 by , 5 years ago
@DevCharly, thanks for your invesitations. Should be fixed now (after updating the plugin).
JOSM running with GDK_SCALE=3
(HiDPI w/ 300%) and FlatLaf Light is a piece of art. :-)
follow-up: 23 comment:22 by , 5 years ago
The dark mode is great!
One thing I noticed: The text in the status bar is nearly unreadable which can be seen in the third screenshot of the ticket description.
comment:23 by , 5 years ago
Replying to Klumbumbus:
The dark mode is great!
+1
Yes, thanks for this plugin.
One thing I noticed: The text in the status bar is nearly unreadable which can be seen in the third screenshot of the ticket description.
Think all background colors, except blue, of boxes like in relation manager and history viewer could be darker at least two of the three colors. Would prefer a darker red and yellow/orange leaving the green lighter for color-bind users.
comment:24 by , 5 years ago
The blue links are hard to read too, imho. See preferences -> plugins or the help browser.
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-09-03 22:12:24 +0200 (Thu, 03 Sep 2020) Build-Date:2020-09-04 01:30:50 Revision:17007 Relative:URL: ^/trunk Identification: JOSM/1.5 (17007 de) Windows 10 64-Bit OS Build number: Windows 10 Pro 1909 (18363) Memory Usage: 820 MB / 1820 MB (536 MB allocated, but free) Java version: 1.8.0_261-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Look and Feel: com.formdev.flatlaf.FlatDarkLaf Screen: \Display0 1680x1050 (scaling 1.0x1.0) Maximum Screen Size: 1680x1050 Best cursor sizes: 16x16 -> 32x32, 32x32 -> 32x32 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=60157, -Djnlpx.jvm=<java.home>\bin\javaw.exe]
by , 5 years ago
Attachment: | JOSM-Hilfeanzeiger.png added |
---|
comment:26 by , 5 years ago
Component: | Plugin → Plugin flatlaf |
---|
comment:28 by , 5 years ago
I Have downloaded Flatlaf plugin in JOSM software but dark mode is not available under look and feel. Can anyone please guide me how to enable dark mode in JOSM? Thank you.
follow-up: 30 comment:29 by , 5 years ago
preferences -> display settings -> look and feel -> look and feel drop down box above the language drop down box
comment:30 by , 4 years ago
Replying to Klumbumbus:
preferences -> display settings -> look and feel -> look and feel drop down box above the language drop down box
the dark mode is not in the drop down
The JAR file is 290 kB -- https://mvnrepository.com/artifact/com.formdev/flatlaf/0.28
It might be a good candidate for a plugin.