JetBrains / jewel

An implementation of the IntelliJ look and feels in Compose for Desktop
Apache License 2.0
634 stars 30 forks source link

Fix tooltips: metrics and positioning #377

Closed rock3r closed 1 month ago

rock3r commented 1 month ago

This fixes the tooltip metrics defaults to something looking more like the IJP's, both in terms of delay and of behaviour.

We now use a simplified position calculation that is less complex than the custom logic we had both in terms of behaviour and in terms of code. It mostly piggybacks the built-in PopupPositionProviderAtPosition, but with a twist of never moving after being shown (like Swing tooltips do in the IJP).

We also set a sensible delay, matching the Swing defaults of 1.2s by default. In the bridge, we read as many metrics properties as possible from the LaF/Registry.

Fixes #375