mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
Compare commits
2 Commits
f8e53c9064
...
5e4f00f0c8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e4f00f0c8 | ||
|
|
15cbf28a0d |
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -67,11 +67,10 @@ jobs:
|
|||||||
- 8
|
- 8
|
||||||
- 17 # LTS
|
- 17 # LTS
|
||||||
- 21 # LTS
|
- 21 # LTS
|
||||||
- 23 # latest
|
|
||||||
toolchain: [""]
|
toolchain: [""]
|
||||||
# include:
|
include:
|
||||||
# - java: 21
|
- java: 21
|
||||||
# toolchain: 22 # latest
|
toolchain: 25 # LTS
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ FlatLaf Change Log
|
|||||||
- Tree and List: Fixed painting of rounded drop backgrounds. (issue #1023)
|
- Tree and List: Fixed painting of rounded drop backgrounds. (issue #1023)
|
||||||
- Popup: Showing tooltip in inactive window brought that window to front (made
|
- Popup: Showing tooltip in inactive window brought that window to front (made
|
||||||
it active) and potentially hid the previously active window. (issue #1037)
|
it active) and potentially hid the previously active window. (issue #1037)
|
||||||
|
- Popup: No longer reuse popup windows for menus to avoid immediately closing
|
||||||
|
dialogs on ChromeOS. (issue #1029)
|
||||||
- macOS: Fixed window "flashing" when switching from a light to a dark theme (or
|
- macOS: Fixed window "flashing" when switching from a light to a dark theme (or
|
||||||
vice versa). Especially when using animated theme changer (see
|
vice versa). Especially when using animated theme changer (see
|
||||||
[FlatLaf Extras](flatlaf-extras)).
|
[FlatLaf Extras](flatlaf-extras)).
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.formdev.flatlaf;
|
package com.formdev.flatlaf;
|
||||||
|
|
||||||
|
import javax.swing.JPopupMenu;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import com.formdev.flatlaf.util.UIScale;
|
import com.formdev.flatlaf.util.UIScale;
|
||||||
|
|
||||||
@@ -147,6 +148,25 @@ public interface FlatSystemProperties
|
|||||||
*/
|
*/
|
||||||
String USE_ROUNDED_POPUP_BORDER = "flatlaf.useRoundedPopupBorder";
|
String USE_ROUNDED_POPUP_BORDER = "flatlaf.useRoundedPopupBorder";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Species whether popup windows may be reused without (temporary) hiding them.
|
||||||
|
* E.g. if "moving" a tooltip to follow the mouse pointer, normally it is necessary
|
||||||
|
* to hide the tooltip and show it again at the new location, which causes some
|
||||||
|
* flicker with heavy-weight popup windows that FlatLaf uses on all platforms.
|
||||||
|
* <p>
|
||||||
|
* If {@code true}, hiding popup window is deferred for an event cycle,
|
||||||
|
* which allows reusing still visible popup window and avoids flicker when "moving" the popup.
|
||||||
|
* <p>
|
||||||
|
* Note that {@link JPopupMenu} popup windows (menus and combobox lists) are newer reused.
|
||||||
|
* <p>
|
||||||
|
* <strong>Allowed Values</strong> {@code false} and {@code true}<br>
|
||||||
|
* <strong>Default</strong> {@code true}
|
||||||
|
*
|
||||||
|
* @since 3.7
|
||||||
|
*/
|
||||||
|
String REUSE_VISIBLE_POPUP_WINDOW = "flatlaf.reuseVisiblePopupWindow";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies whether vertical text position is corrected when UI is scaled on HiDPI screens.
|
* Specifies whether vertical text position is corrected when UI is scaled on HiDPI screens.
|
||||||
* <p>
|
* <p>
|
||||||
|
|||||||
@@ -676,8 +676,11 @@ public class FlatPopupFactory
|
|||||||
return;
|
return;
|
||||||
disposed = true;
|
disposed = true;
|
||||||
|
|
||||||
// immediately hide non-heavy weight popups or combobox popups
|
// immediately hide non-heavy weight popups, popup menus and combobox popups
|
||||||
if( !(popupWindow instanceof JWindow) || contents instanceof BasicComboPopup ) {
|
// of if system property is false
|
||||||
|
if( !(popupWindow instanceof JWindow) || contents instanceof JPopupMenu ||
|
||||||
|
!FlatSystemProperties.getBoolean( FlatSystemProperties.REUSE_VISIBLE_POPUP_WINDOW, true ) )
|
||||||
|
{
|
||||||
hideImpl();
|
hideImpl();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user