#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)
Changed 2 years ago by
Attachment: | JOSM FlatLaf patch 1.diff added |
---|
comment:1 Changed 2 years ago by
comment:2 Changed 2 years ago by
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 Changed 2 years ago by
plastic_laf plugin has been archived here: https://svn.openstreetmap.org/applications/editors/josm/oldplugins/plastic_laf/
comment:4 Changed 2 years ago by
OK, then I'll create a plugin.
Thanks for the link to the plastic_laf plugin.
comment:5 Changed 2 years ago by
[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 Changed 2 years ago by
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 Changed 2 years ago by
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 Changed 21 months ago by
Owner: | changed from team to simon04 |
---|---|
Status: | new → assigned |
comment:15 follow-up: 16 Changed 21 months ago by
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.
comment:16 follow-up: 17 Changed 21 months ago by
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 Changed 21 months ago by
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 Changed 21 months ago by
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 Changed 21 months ago by
@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. :-)
comment:22 follow-up: 23 Changed 21 months ago by
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 Changed 21 months ago by
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 Changed 21 months ago by
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]
Changed 21 months ago by
Attachment: | JOSM-Hilfeanzeiger.png added |
---|
comment:26 Changed 20 months ago by
Component: | Plugin → Plugin flatlaf |
---|
comment:28 Changed 20 months ago by
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.
comment:29 follow-up: 30 Changed 20 months ago by
preferences -> display settings -> look and feel -> look and feel drop down box above the language drop down box
comment:30 Changed 17 months ago by
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
comment:31 Changed 17 months ago by
Are you sure? I have four Flatlaf items including "Flatlaf Dark".
The JAR file is 290 kB -- https://mvnrepository.com/artifact/com.formdev/flatlaf/0.28
It might be a good candidate for a plugin.