mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
Compare commits
5 Commits
f8e53c9064
...
3.6.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36d5685f4c | ||
|
|
ddc8d6e29c | ||
|
|
119b4a922d | ||
|
|
5e4f00f0c8 | ||
|
|
15cbf28a0d |
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -67,11 +67,10 @@ jobs:
|
||||
- 8
|
||||
- 17 # LTS
|
||||
- 21 # LTS
|
||||
- 23 # latest
|
||||
toolchain: [""]
|
||||
# include:
|
||||
# - java: 21
|
||||
# toolchain: 22 # latest
|
||||
include:
|
||||
- java: 21
|
||||
toolchain: 25 # LTS
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FlatLaf Change Log
|
||||
==================
|
||||
|
||||
## 3.7-SNAPSHOT
|
||||
## 3.6.2
|
||||
|
||||
#### New features and improvements
|
||||
|
||||
@@ -15,6 +15,8 @@ FlatLaf Change Log
|
||||
- Tree and List: Fixed painting of rounded drop backgrounds. (issue #1023)
|
||||
- Popup: Showing tooltip in inactive window brought that window to front (made
|
||||
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
|
||||
vice versa). Especially when using animated theme changer (see
|
||||
[FlatLaf Extras](flatlaf-extras)).
|
||||
|
||||
11
README.md
11
README.md
@@ -196,6 +196,8 @@ Applications using FlatLaf
|
||||
- 
|
||||
[Zettelkasten](https://github.com/Zettelkasten-Team/Zettelkasten) - knowledge
|
||||
management tool
|
||||
-  [QStudio](https://www.timestored.com/qstudio/) - free
|
||||
SQL editor
|
||||
|
||||
### Security
|
||||
|
||||
@@ -236,6 +238,8 @@ Applications using FlatLaf
|
||||
mobile & web platform
|
||||
-  [EduMIPS64](https://github.com/EduMIPS64/edumips64) -
|
||||
visual MIPS64 CPU simulator
|
||||
-  [Launch4j](https://launch4j.sourceforge.net/) -
|
||||
cross-platform Java executable wrapper
|
||||
|
||||
### Electrical
|
||||
|
||||
@@ -281,9 +285,16 @@ Applications using FlatLaf
|
||||
from any webnovel and lightnovel site
|
||||
- [lectureStudio](https://www.lecturestudio.org/) - digitize your lectures with
|
||||
ease
|
||||
-  [Nortantis](https://jandjheydorn.com/nortantis) -
|
||||
fantasy map generator and editor
|
||||
|
||||
### Modelling / Planning
|
||||
|
||||
-  [OpenRocket](https://github.com/openrocket/openrocket) -
|
||||
model-rocketry aerodynamics and trajectory simulation software
|
||||
- 
|
||||
[Warteschlangensimulator](https://github.com/A-Herzog/Warteschlangensimulator) -
|
||||
discrete-event stochastic simulator
|
||||
-  [Gephi](https://github.com/gephi/gephi) - the Open
|
||||
Graph Viz Platform
|
||||
- [Astah](https://astah.net/) (**commercial**) - create UML, ER Diagram,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#Signature file v4.1
|
||||
#Version 3.6.1
|
||||
#Version 3.6.2
|
||||
|
||||
CLSS public abstract interface com.formdev.flatlaf.FlatClientProperties
|
||||
fld public final static java.lang.String BUTTON_TYPE = "JButton.buttonType"
|
||||
@@ -297,6 +297,7 @@ CLSS public abstract interface com.formdev.flatlaf.FlatSystemProperties
|
||||
fld public final static java.lang.String ANIMATION = "flatlaf.animation"
|
||||
fld public final static java.lang.String MENUBAR_EMBEDDED = "flatlaf.menuBarEmbedded"
|
||||
fld public final static java.lang.String NATIVE_LIBRARY_PATH = "flatlaf.nativeLibraryPath"
|
||||
fld public final static java.lang.String REUSE_VISIBLE_POPUP_WINDOW = "flatlaf.reuseVisiblePopupWindow"
|
||||
fld public final static java.lang.String UI_SCALE = "flatlaf.uiScale"
|
||||
fld public final static java.lang.String UI_SCALE_ALLOW_SCALE_DOWN = "flatlaf.uiScale.allowScaleDown"
|
||||
fld public final static java.lang.String UI_SCALE_ENABLED = "flatlaf.uiScale.enabled"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.formdev.flatlaf;
|
||||
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.SwingUtilities;
|
||||
import com.formdev.flatlaf.util.UIScale;
|
||||
|
||||
@@ -147,6 +148,25 @@ public interface FlatSystemProperties
|
||||
*/
|
||||
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.6.2
|
||||
*/
|
||||
String REUSE_VISIBLE_POPUP_WINDOW = "flatlaf.reuseVisiblePopupWindow";
|
||||
|
||||
|
||||
/**
|
||||
* Specifies whether vertical text position is corrected when UI is scaled on HiDPI screens.
|
||||
* <p>
|
||||
|
||||
@@ -205,30 +205,43 @@ class UIDefaultsLoader
|
||||
if( classLoader != null && !addonClassLoaders.contains( classLoader ) )
|
||||
addonClassLoaders.add( classLoader );
|
||||
|
||||
packageName = packageName.replace( '.', '/' );
|
||||
if( classLoader == null )
|
||||
classLoader = FlatLaf.class.getClassLoader();
|
||||
|
||||
// Get package URL using ClassLoader.getResource(...) because this works
|
||||
// also in named Java modules, even without opening the package in module-info.java.
|
||||
// This extra step is necessary because ClassLoader.getResource("<package>/<file>.properties")
|
||||
// does not work for named Java modules.
|
||||
URL url = classLoader.getResource( packageName.replace( '.', '/' ) );
|
||||
if( url == null ) {
|
||||
LoggingFacade.INSTANCE.logSevere( "FlatLaf: Failed to find package '"
|
||||
+ packageName + "' to load properties files.", null );
|
||||
continue;
|
||||
}
|
||||
String packageUrl = url.toExternalForm();
|
||||
if( !packageUrl.endsWith( "/" ) )
|
||||
packageUrl = packageUrl.concat( "/" );
|
||||
|
||||
boolean found = false;
|
||||
for( Class<?> lafClass : lafClasses ) {
|
||||
URL propertiesUrl = new URL( packageUrl + simpleClassName( lafClass ) + ".properties" );
|
||||
String propertiesName = packageName + '/' + simpleClassName( lafClass ) + ".properties";
|
||||
try( InputStream in = classLoader.getResourceAsStream( propertiesName ) ) {
|
||||
if( in != null ) {
|
||||
properties.load( in );
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try( InputStream in = propertiesUrl.openStream() ) {
|
||||
properties.load( in );
|
||||
} catch( FileNotFoundException ex ) {
|
||||
// ignore
|
||||
// fallback for named Java modules
|
||||
if( !found ) {
|
||||
// Get package URL using ClassLoader.getResource(...) because this works
|
||||
// also in named Java modules, even without opening the package in module-info.java.
|
||||
// This extra step is necessary because ClassLoader.getResource("<package>/<file>.properties")
|
||||
// does not work for named Java modules.
|
||||
URL url = classLoader.getResource( packageName );
|
||||
if( url == null )
|
||||
continue;
|
||||
|
||||
String packageUrl = url.toExternalForm();
|
||||
if( !packageUrl.endsWith( "/" ) )
|
||||
packageUrl = packageUrl.concat( "/" );
|
||||
|
||||
for( Class<?> lafClass : lafClasses ) {
|
||||
URL propertiesUrl = new URL( packageUrl + simpleClassName( lafClass ) + ".properties" );
|
||||
|
||||
try( InputStream in = propertiesUrl.openStream() ) {
|
||||
properties.load( in );
|
||||
} catch( FileNotFoundException ex ) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if( source instanceof URL ) {
|
||||
|
||||
@@ -676,8 +676,11 @@ public class FlatPopupFactory
|
||||
return;
|
||||
disposed = true;
|
||||
|
||||
// immediately hide non-heavy weight popups or combobox popups
|
||||
if( !(popupWindow instanceof JWindow) || contents instanceof BasicComboPopup ) {
|
||||
// immediately hide non-heavy weight popups, popup menus and combobox popups
|
||||
// of if system property is false
|
||||
if( !(popupWindow instanceof JWindow) || contents instanceof JPopupMenu ||
|
||||
!FlatSystemProperties.getBoolean( FlatSystemProperties.REUSE_VISIBLE_POPUP_WINDOW, true ) )
|
||||
{
|
||||
hideImpl();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
flatlaf.releaseVersion = 3.6.1
|
||||
flatlaf.releaseVersion = 3.6.2
|
||||
flatlaf.developmentVersion = 3.7-SNAPSHOT
|
||||
|
||||
org.gradle.parallel = true
|
||||
|
||||
Reference in New Issue
Block a user