mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-08 06:50:56 +03:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95a15c3cf8 | ||
|
|
ab320684f5 | ||
|
|
a284b69a1e | ||
|
|
b590f41254 | ||
|
|
a97076ead5 | ||
|
|
0b6df8be1c | ||
|
|
150bab0b57 |
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,6 +1,26 @@
|
|||||||
FlatLaf Change Log
|
FlatLaf Change Log
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
## 1.6.2
|
||||||
|
|
||||||
|
#### Fixed bugs
|
||||||
|
|
||||||
|
- ComboBox (not editable): Fixed background painted outside of border if round
|
||||||
|
edges are enabled (client property `JComponent.roundRect` is `true`). (similar
|
||||||
|
to issue #382; regression since fixing #330 in FlatLaf 1.4)
|
||||||
|
- ComboBox: Fixed `NullPointerException`, which may occur under special
|
||||||
|
circumstances. (issue #408)
|
||||||
|
- Table: Do not select text in cell editor when it gets focus (when
|
||||||
|
`JTable.surrendersFocusOnKeystroke` is `true`) and
|
||||||
|
`TextComponent.selectAllOnFocusPolicy` is `once` (the default) or `always`.
|
||||||
|
(issue #395)
|
||||||
|
- Linux: Fixed NPE when using `java.awt.TrayIcon`. (issue #405)
|
||||||
|
- FileChooser: Workaround for crash on Windows with Java 17 32-bit (disabled
|
||||||
|
Windows icons). Java 17 64-bit is not affected. (issue #403)
|
||||||
|
- Native window decorations: Fixed layout loop, which may occur under special
|
||||||
|
circumstances and slows down the application. (issue #420)
|
||||||
|
|
||||||
|
|
||||||
## 1.6.1
|
## 1.6.1
|
||||||
|
|
||||||
#### Fixed bugs
|
#### Fixed bugs
|
||||||
@@ -33,7 +53,7 @@ FlatLaf Change Log
|
|||||||
- ComboBox (editable): Fixed wrong border of internal text field under special
|
- ComboBox (editable): Fixed wrong border of internal text field under special
|
||||||
circumstances.
|
circumstances.
|
||||||
- Spinner: Fixed painting of border corners on left side. (issue #382;
|
- Spinner: Fixed painting of border corners on left side. (issue #382;
|
||||||
regression since FlatLaf 1.4)
|
regression since fixing #330 in FlatLaf 1.4)
|
||||||
- TableHeader: Do not show resize cursor for last column if resizing last column
|
- TableHeader: Do not show resize cursor for last column if resizing last column
|
||||||
is not possible because auto resize mode of table is not off. (issue #332)
|
is not possible because auto resize mode of table is not off. (issue #332)
|
||||||
- TableHeader: Fixed missing trailing vertical separator line if used in upper
|
- TableHeader: Fixed missing trailing vertical separator line if used in upper
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
val releaseVersion = "1.6.1"
|
val releaseVersion = "1.6.2"
|
||||||
val developmentVersion = "2.0-SNAPSHOT"
|
val developmentVersion = "2.0-SNAPSHOT"
|
||||||
|
|
||||||
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion
|
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion
|
||||||
|
|||||||
@@ -264,6 +264,12 @@ public abstract class FlatLaf
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
Toolkit toolkit = Toolkit.getDefaultToolkit();
|
Toolkit toolkit = Toolkit.getDefaultToolkit();
|
||||||
|
|
||||||
|
// make sure that AWT desktop properties are initialized (on Linux)
|
||||||
|
// before invoking toolkit.addPropertyChangeListener()
|
||||||
|
// https://github.com/JFormDesigner/FlatLaf/issues/405#issuecomment-960242342
|
||||||
|
toolkit.getDesktopProperty( "dummy" );
|
||||||
|
|
||||||
toolkit.addPropertyChangeListener( desktopPropertyName, desktopPropertyListener );
|
toolkit.addPropertyChangeListener( desktopPropertyName, desktopPropertyListener );
|
||||||
if( desktopPropertyName2 != null )
|
if( desktopPropertyName2 != null )
|
||||||
toolkit.addPropertyChangeListener( desktopPropertyName2, desktopPropertyListener );
|
toolkit.addPropertyChangeListener( desktopPropertyName2, desktopPropertyListener );
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ public class FlatCaret
|
|||||||
protected void selectAllOnFocusGained() {
|
protected void selectAllOnFocusGained() {
|
||||||
JTextComponent c = getComponent();
|
JTextComponent c = getComponent();
|
||||||
Document doc = c.getDocument();
|
Document doc = c.getDocument();
|
||||||
if( doc == null || !c.isEnabled() || !c.isEditable() )
|
if( doc == null || !c.isEnabled() || !c.isEditable() || FlatUIUtils.isCellEditor( c ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Object selectAllOnFocusPolicy = c.getClientProperty( SELECT_ALL_ON_FOCUS_POLICY );
|
Object selectAllOnFocusPolicy = c.getClientProperty( SELECT_ALL_ON_FOCUS_POLICY );
|
||||||
|
|||||||
@@ -482,6 +482,22 @@ public class FlatComboBoxUI
|
|||||||
@Override
|
@Override
|
||||||
@SuppressWarnings( "unchecked" )
|
@SuppressWarnings( "unchecked" )
|
||||||
public void paintCurrentValue( Graphics g, Rectangle bounds, boolean hasFocus ) {
|
public void paintCurrentValue( Graphics g, Rectangle bounds, boolean hasFocus ) {
|
||||||
|
// apply clipping using rounded rectangle to avoid that renderer paints
|
||||||
|
// outside of border if combobox uses larger arc for edges
|
||||||
|
// (e.g. FlatClientProperties.COMPONENT_ROUND_RECT is true)
|
||||||
|
FlatBorder border = FlatUIUtils.getOutsideFlatBorder( comboBox );
|
||||||
|
if( border != null ) {
|
||||||
|
int clipArc = border.getArc( comboBox ) - (border.getLineWidth( comboBox ) * 2);
|
||||||
|
if( clipArc > 0 ) {
|
||||||
|
int x = bounds.x;
|
||||||
|
int width = bounds.width + bounds.height;
|
||||||
|
if( !comboBox.getComponentOrientation().isLeftToRight() )
|
||||||
|
x -= bounds.height;
|
||||||
|
((Graphics2D)g).clip( FlatUIUtils.createComponentRectangle(
|
||||||
|
x, bounds.y, width, bounds.height, scale( (float) clipArc ) ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
paddingBorder.uninstall();
|
paddingBorder.uninstall();
|
||||||
|
|
||||||
ListCellRenderer<Object> renderer = comboBox.getRenderer();
|
ListCellRenderer<Object> renderer = comboBox.getRenderer();
|
||||||
@@ -819,7 +835,7 @@ public class FlatComboBoxUI
|
|||||||
|
|
||||||
// remember old border and replace it
|
// remember old border and replace it
|
||||||
rendererBorder = jc.getBorder();
|
rendererBorder = jc.getBorder();
|
||||||
rendererComponent.setBorder( this );
|
jc.setBorder( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -262,14 +262,22 @@ public class FlatFileChooserUI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FileView getFileView( JFileChooser fc ) {
|
public FileView getFileView( JFileChooser fc ) {
|
||||||
return fileView;
|
return doNotUseSystemIcons() ? super.getFileView( fc ) : fileView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearIconCache() {
|
public void clearIconCache() {
|
||||||
|
if( doNotUseSystemIcons() )
|
||||||
|
super.clearIconCache();
|
||||||
|
else
|
||||||
fileView.clearIconCache();
|
fileView.clearIconCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean doNotUseSystemIcons() {
|
||||||
|
// Java 17 32bit craches on Windows when using system icons
|
||||||
|
return SystemInfo.isWindows && SystemInfo.isJava_17_orLater && !SystemInfo.isX86_64;
|
||||||
|
}
|
||||||
|
|
||||||
//---- class FlatFileView -------------------------------------------------
|
//---- class FlatFileView -------------------------------------------------
|
||||||
|
|
||||||
private class FlatFileView
|
private class FlatFileView
|
||||||
|
|||||||
@@ -508,7 +508,7 @@ public class FlatTitlePane
|
|||||||
|
|
||||||
protected void menuBarLayouted() {
|
protected void menuBarLayouted() {
|
||||||
updateNativeTitleBarHeightAndHitTestSpotsLater();
|
updateNativeTitleBarHeightAndHitTestSpotsLater();
|
||||||
revalidate();
|
doLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*debug
|
/*debug
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public class SystemInfo
|
|||||||
public static final boolean isJava_9_orLater;
|
public static final boolean isJava_9_orLater;
|
||||||
public static final boolean isJava_11_orLater;
|
public static final boolean isJava_11_orLater;
|
||||||
public static final boolean isJava_15_orLater;
|
public static final boolean isJava_15_orLater;
|
||||||
|
/** @since 2 */ public static final boolean isJava_17_orLater;
|
||||||
|
|
||||||
// Java VMs
|
// Java VMs
|
||||||
public static final boolean isJetBrainsJVM;
|
public static final boolean isJetBrainsJVM;
|
||||||
@@ -82,6 +83,7 @@ public class SystemInfo
|
|||||||
isJava_9_orLater = (javaVersion >= toVersion( 9, 0, 0, 0 ));
|
isJava_9_orLater = (javaVersion >= toVersion( 9, 0, 0, 0 ));
|
||||||
isJava_11_orLater = (javaVersion >= toVersion( 11, 0, 0, 0 ));
|
isJava_11_orLater = (javaVersion >= toVersion( 11, 0, 0, 0 ));
|
||||||
isJava_15_orLater = (javaVersion >= toVersion( 15, 0, 0, 0 ));
|
isJava_15_orLater = (javaVersion >= toVersion( 15, 0, 0, 0 ));
|
||||||
|
isJava_17_orLater = (javaVersion >= toVersion( 17, 0, 0, 0 ));
|
||||||
|
|
||||||
// Java VMs
|
// Java VMs
|
||||||
isJetBrainsJVM = System.getProperty( "java.vm.vendor", "Unknown" )
|
isJetBrainsJVM = System.getProperty( "java.vm.vendor", "Unknown" )
|
||||||
|
|||||||
Reference in New Issue
Block a user