Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: Rounded popup windows #715

Closed
ctipper opened this issue Aug 16, 2023 · 6 comments
Closed

macOS: Rounded popup windows #715

ctipper opened this issue Aug 16, 2023 · 6 comments
Milestone

Comments

@ctipper
Copy link

ctipper commented Aug 16, 2023

I run a cross-platform app that uses Flatlaf for macOS, Windows and Linux. On macOS I am using FlatMacLightLaf and FlatMacDarkLaf on other platforms I am using FlatLightLaf and FlatDarkLaf with theme switching. PR #643 introduced rounded popup windows but only for FlatLightLaf etc. I'd like this made the default in FlatMacLightLaf etc. This would align with the rounded menus and selection highlights in the macOS themes.

In my code the following sets the properties but there is no effect when using FlatMacLightLaf etc.

/**
 * @see <a href="https://github.com/JFormDesigner/FlatLaf/pull/643">Windows 11: Rounded popup windows #643</a>
 */
UIManager.put("PopupMenu.borderCornerRadius", 8);
UIManager.put("ComboBox.borderCornerRadius", 8);
UIManager.put("ToolTip.borderCornerRadius", 8);
UIManager.put("Popup.borderCornerRadius", 8);
@ctipper
Copy link
Author

ctipper commented Aug 18, 2023

I know it looks like an error, but I can say that these properties have long been ignored and I don't think the macos theme has ever had rounded combo boxes and tooltips in my dev environment. Now on Apple Silicon maOS 13.5.1 , but previously Intel macOS 12.6

@ctipper
Copy link
Author

ctipper commented Aug 20, 2023

No rounded drop downs on Linux either, Debian 12 JDK 17

@DevCharly
Copy link
Collaborator

PR #643 works only on Windows 11. See title and description of this PR.
Not sure why you expect that this also works on macOS or Linux 😕

Java/Swing does not support native rounded borders out-of-the-box.
PR #643 uses a native library (DLL) to modify the Win32 window, that Java created, to enable rounded border.

To do similar on macOS, a new native library for macOS is required that does modify the macOS windows.
I already know that this is possible and roughly how to do this, but implementing and testing this is time consuming.
I expect at least 3-4 days to make this work.

If you're working for a company, please ask you boss whether the company is willing to sponsor FlatLaf to finance development of this feature. Estimated cost: 2000 EUR/USD. https://www.formdev.com/flatlaf/sponsor/
I could work on it in September and release it in FlatLaf 3.3.

Sorry to ask for sponsorship, but can't implement all the features companies want for free...

@ctipper
Copy link
Author

ctipper commented Aug 22, 2023

Don't worry I realised after inspecting repo that this was an unimplemented feature I saw the pull request #643 had some properties and jumped the gun. My app is not commercial, if you have any other requests I'm happy to let it take its' course, this issue was created under a misunderstanding of the state of the project. Do you mind if I close the issue?

@DevCharly
Copy link
Collaborator

Let's keep the issue open. Maybe some company passes by and is willing to sponsor development of this feature.

@DevCharly
Copy link
Collaborator

See PR #772

@DevCharly DevCharly added this to the 3.3 milestone Dec 14, 2023
@DevCharly DevCharly unpinned this issue Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants