Modify

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#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:

https://i.ibb.co/MPTmLcp/Snag-276259f8.png

https://i.ibb.co/gRRkTWh/Snag-27628415.png

https://i.ibb.co/crH9GbP/Snag-27625a08.png

https://i.ibb.co/KhNq7g0/Snag-276283c7.png

https://i.ibb.co/9gjPcTL/Snag-276283f6.png

https://i.ibb.co/93Sth5Y/Snag-27625a36.png

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)

JOSM FlatLaf patch 1.diff (2.1 KB ) - added by DevCharly 4 years ago.
JOSM-Hilfeanzeiger.png (79.4 KB ) - added by Klumbumbus 4 years ago.

Download all attachments as: .zip

Change History (33)

by DevCharly, 4 years ago

Attachment: JOSM FlatLaf patch 1.diff added

comment:1 by simon04, 4 years ago

The JAR file is 290 kB -- https://mvnrepository.com/artifact/com.formdev/flatlaf/0.28

It might be a good candidate for a plugin.

comment:2 by stoecker, 4 years ago

Component: CorePlugin

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:4 by DevCharly, 4 years ago

OK, then I'll create a plugin.
Thanks for the link to the plastic_laf plugin.

comment:5 by simon04, 4 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:6 by skyper, 4 years ago

Plugin does not show up under Plugins, yet.

Last edited 4 years ago by skyper (previous) (diff)

comment:7 by skyper, 4 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 simon04, 4 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:9 by simon04, 4 years ago

In 16974/josm:

see #19027, see #19290 - PluginHandler.loadVeryEarlyPlugins for plugins providing a LookAndFeel

comment:10 by simon04, 4 years ago

Owner: changed from team to simon04
Status: newassigned

comment:11 by simon04, 4 years ago

In 35535/osm:

see #19027 - Update to flatlaf 0.40

comment:12 by simon04, 4 years ago

In 35536/osm:

see #19027 - Specify negative plugin.stage for very early loading

comment:14 by simon04, 4 years ago

Resolution: fixed
Status: assignedclosed

In 35538/osm:

fix #19027 - dist flatlaf.jar

comment:15 by Klumbumbus, 4 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.

in reply to:  15 ; comment:16 by skyper, 4 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.

Last edited 4 years ago by skyper (previous) (diff)

in reply to:  16 comment:17 by Klumbumbus, 4 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 DevCharly, 4 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:19 by simon04, 4 years ago

In 35541/osm:

see #19027 - Use UIManager.installLookAndFeel

comment:20 by simon04, 4 years ago

In 35542/osm:

see #19027 - dist flatlaf.jar

comment:21 by simon04, 4 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. :-)

comment:22 by Klumbumbus, 4 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.

Last edited 4 years ago by Klumbumbus (previous) (diff)

in reply to:  22 comment:23 by skyper, 4 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 Klumbumbus, 4 years ago

The blue links are hard to read too, imho. See preferences -> plugins or the help browser.

Version 0, edited 4 years ago by Klumbumbus (next)

by Klumbumbus, 4 years ago

Attachment: JOSM-Hilfeanzeiger.png added

comment:26 by Klumbumbus, 4 years ago

Component: PluginPlugin flatlaf

comment:27 by Klumbumbus, 4 years ago

follow up in #19819

comment:28 by anonymous, 4 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.

comment:29 by Klumbumbus, 4 years ago

preferences -> display settings -> look and feel -> look and feel drop down box above the language drop down box

in reply to:  29 comment:30 by anonymous, 3 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

comment:31 by skyper, 3 years ago

Are you sure? I have four Flatlaf items including "Flatlaf Dark".

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.