FlatLaf icon indicating copy to clipboard operation
FlatLaf copied to clipboard

Linux: rounded borders for popups

Open DevCharly opened this issue 1 year ago • 4 comments

This PR enables rounded borders on Linux (including drop shadow) for popups. (issue #949; see also PRs #643 and #772)

PopupMenu (Ubuntu 24.10):

grafik

macOS theme (running on Ubuntu 24.10) using larger corner radius for popup menus:

grafik

ComboBox:

grafik

ToolTip:

grafik

The rounded popup borders are enabled by default for all themes and use the same UI properties and client property as in PRs #643 and #772.

Known issues

When popup becomes visible, the background is black for some milliseconds, which does not look very nice when moving mouse over menubar:

https://github.com/user-attachments/assets/bbe2d514-79e1-447b-bc1c-377e0538ac5b

Components may paint over the rounded border corners. E.g. the red selection of a combobox popup:

grafik

If moving mouse down, rounded border in corners is still missing:

grafik

Artifacts in corners on KDE when using display scale:

grafik

Feedback wanted

Currently, I've tested this only on Ubuntu 24.10 and on KDE neon 6.2. Would be great to get some feedback whether this works without problems on other Linux distros/versions.

DevCharly avatar Jan 27 '25 17:01 DevCharly

A snapshot for this PR is now available. Use PR-964-SNAPSHOT as version. https://github.com/JFormDesigner/FlatLaf#snapshots

Prebuilt binaries (Artifacts) are available here (requires GitHub login): https://github.com/JFormDesigner/FlatLaf/actions/runs/12993337682

DevCharly avatar Jan 27 '25 17:01 DevCharly

Hi,

Tested this on Manjaro with KDE Plasma v: 6.2.4. I did not notice any black out while moving the mouse over the menubar. On a 1440p screen with 1x scale the artifacts only appear briefly while moving the mouse over the menubar on the menu that is about to disappear. 1x on 4K and 2x on 4K the corner artifacts are always visible. 3x on 4K is like the 1440p case.

Hope this helps.

stefanoschalkidis avatar Feb 03 '25 20:02 stefanoschalkidis

Hello. Linux ARM KDE (raspberry pi4). XRDP connection. Same issues. No other problems. Will show test at XFCE (next post).

image

Also some jigsaw with mac laf image

{F9107979-A986-48DB-B5FF-A107DED57715}

VISTALL avatar Feb 23 '25 15:02 VISTALL

In all cases - I don't saw bug with blinking menus.

AltLinux(loongarch) - XFCE, same as KDE.

Problem with comboBox, due items not rounded - moving to lead/tail position - broke popup border

{8DA61CF9-D8C0-4A26-8462-9A69C95FE750}

VISTALL avatar Feb 23 '25 15:02 VISTALL