Compare commits
105 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c0b122fbc | ||
|
|
4da2bd90cb | ||
|
|
cb70fb4e82 | ||
|
|
2593a43d72 | ||
|
|
e44ff5b72a | ||
|
|
22cb1b50a6 | ||
|
|
95a15c3cf8 | ||
|
|
ab320684f5 | ||
|
|
a284b69a1e | ||
|
|
b590f41254 | ||
|
|
a97076ead5 | ||
|
|
0b6df8be1c | ||
|
|
150bab0b57 | ||
|
|
a253b6c0cf | ||
|
|
efcbc1fbdb | ||
|
|
ae28c595f9 | ||
|
|
1d08ddda60 | ||
|
|
578379fd00 | ||
|
|
7c9f550d4c | ||
|
|
84d4510d70 | ||
|
|
fa194ec258 | ||
|
|
fd56de403d | ||
|
|
85fde46504 | ||
|
|
b283178979 | ||
|
|
bddef38a7c | ||
|
|
b5f2f77944 | ||
|
|
fca0718ed0 | ||
|
|
0d44ade6ea | ||
|
|
6018f83a22 | ||
|
|
0b6247851b | ||
|
|
8640dee053 | ||
|
|
824db2e3bd | ||
|
|
c2c79c4676 | ||
|
|
4795fe5687 | ||
|
|
d508f339c1 | ||
|
|
c7054537e7 | ||
|
|
b98b904023 | ||
|
|
253df9325d | ||
|
|
78a9cc1d0c | ||
|
|
b25fcc3381 | ||
|
|
51d7bc2c37 | ||
|
|
09a18b2305 | ||
|
|
31f2feee2e | ||
|
|
218bb62bfd | ||
|
|
694c2ad767 | ||
|
|
97943fcd38 | ||
|
|
77f33467d2 | ||
|
|
651454170d | ||
|
|
7ca48bd136 | ||
|
|
968e508bb5 | ||
|
|
a6d318a197 | ||
|
|
cd20f4086b | ||
|
|
ebd5905947 | ||
|
|
817a3c62bb | ||
|
|
f8f58400fe | ||
|
|
ef06840649 | ||
|
|
b17c14d62e | ||
|
|
19dba94064 | ||
|
|
601e24f9e7 | ||
|
|
c7f323ee13 | ||
|
|
e4522f3af4 | ||
|
|
79af461a5b | ||
|
|
2e8e07faf6 | ||
|
|
ecdb000818 | ||
|
|
999fd0d4da | ||
|
|
705dd9558f | ||
|
|
97ca866ffa | ||
|
|
543b977db7 | ||
|
|
ebb8a6d025 | ||
|
|
506543281e | ||
|
|
60322be22a | ||
|
|
e1f30f24a8 | ||
|
|
1759f6b25c | ||
|
|
6578f25cc9 | ||
|
|
8c26e0323f | ||
|
|
a5575894ab | ||
|
|
357823a027 | ||
|
|
a6d3f6b3eb | ||
|
|
ae4c69e75c | ||
|
|
31cadc532b | ||
|
|
6e8443473b | ||
|
|
cca4ab3cd8 | ||
|
|
dab0ee3306 | ||
|
|
c6d1ed91a7 | ||
|
|
a613a244f4 | ||
|
|
268fe15004 | ||
|
|
7bc9be686f | ||
|
|
751919ec5a | ||
|
|
da913b426e | ||
|
|
d8ef99cd8f | ||
|
|
d08a6d7dd3 | ||
|
|
896e9bca8e | ||
|
|
1df9597bb1 | ||
|
|
eaf55f2099 | ||
|
|
5018a1f9eb | ||
|
|
71ba8f55a7 | ||
|
|
b65db707ed | ||
|
|
ed62266a43 | ||
|
|
49913b7dad | ||
|
|
3eeeb9e00b | ||
|
|
bfb1642284 | ||
|
|
0544a605c3 | ||
|
|
3f5acda132 | ||
|
|
02b1ba2926 | ||
|
|
7f7f9e3c7c |
27
.github/workflows/ci.yml
vendored
@@ -34,6 +34,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
if: matrix.java == '1.8'
|
||||
|
||||
- name: Setup Java ${{ matrix.java }}
|
||||
uses: actions/setup-java@v1
|
||||
@@ -97,11 +98,22 @@ jobs:
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
|
||||
- name: Publish snapshot to oss.sonatype.org
|
||||
run: ./gradlew publish -Dorg.gradle.internal.publish.checksums.insecure=true
|
||||
run: ./gradlew publish :flatlaf-theme-editor:build -Dorg.gradle.internal.publish.checksums.insecure=true
|
||||
env:
|
||||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
|
||||
|
||||
- name: Upload theme editor
|
||||
uses: sebastianpopp/ftp-action@releases/v2
|
||||
with:
|
||||
host: ${{ secrets.FTP_SERVER }}
|
||||
user: ${{ secrets.FTP_USERNAME }}
|
||||
password: ${{ secrets.FTP_PASSWORD }}
|
||||
forceSsl: true
|
||||
localDir: "flatlaf-theme-editor/build/libs"
|
||||
remoteDir: "snapshots"
|
||||
options: "--only-newer --no-recursion --verbose=1"
|
||||
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -133,7 +145,7 @@ jobs:
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
|
||||
- name: Release a new stable version to Maven Central
|
||||
run: ./gradlew publish :flatlaf-demo:build -Drelease=true
|
||||
run: ./gradlew publish :flatlaf-demo:build :flatlaf-theme-editor:build -Drelease=true
|
||||
env:
|
||||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
|
||||
@@ -150,3 +162,14 @@ jobs:
|
||||
localDir: "flatlaf-demo/build/libs"
|
||||
remoteDir: "."
|
||||
options: "--only-newer --no-recursion --verbose=1"
|
||||
|
||||
- name: Upload theme editor
|
||||
uses: sebastianpopp/ftp-action@releases/v2
|
||||
with:
|
||||
host: ${{ secrets.FTP_SERVER }}
|
||||
user: ${{ secrets.FTP_USERNAME }}
|
||||
password: ${{ secrets.FTP_PASSWORD }}
|
||||
forceSsl: true
|
||||
localDir: "flatlaf-theme-editor/build/libs"
|
||||
remoteDir: "."
|
||||
options: "--only-newer --no-recursion --verbose=1"
|
||||
|
||||
83
CHANGELOG.md
@@ -1,13 +1,94 @@
|
||||
FlatLaf Change Log
|
||||
==================
|
||||
|
||||
## 1.6.4
|
||||
|
||||
#### Fixed bugs
|
||||
|
||||
- ComboBox: Fixed regression in FlatLaf 1.6.3 that makes selected item invisible
|
||||
in popup list if `DefaultListCellRenderer` is used as renderer. If using
|
||||
default renderer, it works. (issue #426)
|
||||
|
||||
|
||||
## 1.6.3
|
||||
|
||||
#### Fixed bugs
|
||||
|
||||
- ComboBox (not editable): Fixed regression in FlatLaf 1.6.2 that may display
|
||||
text in non-editable combo boxes in bold. (issue #423)
|
||||
- Tree: Fixed editing cell issue with custom cell renderer and cell editor that
|
||||
use same component for rendering and editing. (issue #385)
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
#### Fixed bugs
|
||||
|
||||
- Native window decorations: Catch `UnsatisfiedLinkError` when trying to load
|
||||
`jawt.dll` to avoid an application crash (Java 8 on Windows 10 only).
|
||||
|
||||
|
||||
## 1.6
|
||||
|
||||
#### New features and improvements
|
||||
|
||||
- InternalFrame: Double-click on icon in internal frame title bar now closes the
|
||||
internal frame. (issue #374)
|
||||
- IntelliJ Themes: Removed deprecated `install()` methods.
|
||||
|
||||
#### Fixed bugs
|
||||
|
||||
- Menus: Fixed missing modifiers flags in `ActionEvent` (e.g. `Ctrl` key
|
||||
pressed) when running in Java 9+ on Linux, macOS. Occurs also on Windows in
|
||||
large popup menus that do not fit into the window. (issue #371; regression
|
||||
since FlatLaf 1.3)
|
||||
- OptionPane: Fixed `OptionPane.sameSizeButtons`, which did not work as expected
|
||||
when setting to `false`.
|
||||
- OptionPane: Fixed rendering of longer HTML text if it is passed as
|
||||
`StringBuilder`, `StringBuffer`, or any other object that returns HTML text in
|
||||
method `toString()`. (similar to issue #12)
|
||||
- ComboBox: Fixed popup border painting on HiDPI screens (e.g. at 150% scaling).
|
||||
- ComboBox: Fixed popup location if shown above of combo box (Java 8 only).
|
||||
- ComboBox (editable): Fixed wrong border of internal text field under special
|
||||
circumstances.
|
||||
- Spinner: Fixed painting of border corners on left side. (issue #382;
|
||||
regression since fixing #330 in FlatLaf 1.4)
|
||||
- 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)
|
||||
- TableHeader: Fixed missing trailing vertical separator line if used in upper
|
||||
left corner of scroll pane. (issue #332)
|
||||
- TextField, FormattedTextField, PasswordField and ComboBox: Fixed alignment of
|
||||
placeholder text in right-to-left component orientation.
|
||||
- Slider: Fixed calculation of baseline, which was wrong under some
|
||||
circumstances.
|
||||
|
||||
|
||||
## 1.5
|
||||
|
||||
#### New features and improvements
|
||||
|
||||
- SwingX: Added search and clear icons to `JXSearchField`. (issue #359)
|
||||
|
||||
|
||||
#### Fixed bugs
|
||||
|
||||
- Button and TextComponent: Do not apply minimum width/height if margins are
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
val releaseVersion = "1.5"
|
||||
val developmentVersion = "1.6-SNAPSHOT"
|
||||
val releaseVersion = "1.6.4"
|
||||
val developmentVersion = "2.0-SNAPSHOT"
|
||||
|
||||
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.Properties;
|
||||
@@ -66,6 +67,7 @@ import javax.swing.text.html.HTMLEditorKit;
|
||||
import com.formdev.flatlaf.ui.FlatNativeWindowBorder;
|
||||
import com.formdev.flatlaf.ui.FlatPopupFactory;
|
||||
import com.formdev.flatlaf.ui.FlatRootPaneUI;
|
||||
import com.formdev.flatlaf.ui.FlatUIUtils;
|
||||
import com.formdev.flatlaf.util.GrayFilter;
|
||||
import com.formdev.flatlaf.util.LoggingFacade;
|
||||
import com.formdev.flatlaf.util.MultiResolutionImageSupport;
|
||||
@@ -96,6 +98,7 @@ public abstract class FlatLaf
|
||||
private MnemonicHandler mnemonicHandler;
|
||||
|
||||
private Consumer<UIDefaults> postInitialization;
|
||||
private List<Function<Object, Object>> uiDefaultsGetters;
|
||||
|
||||
/**
|
||||
* Sets the application look and feel to the given LaF
|
||||
@@ -261,6 +264,12 @@ public abstract class FlatLaf
|
||||
}
|
||||
};
|
||||
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 );
|
||||
if( desktopPropertyName2 != null )
|
||||
toolkit.addPropertyChangeListener( desktopPropertyName2, desktopPropertyListener );
|
||||
@@ -354,7 +363,14 @@ public abstract class FlatLaf
|
||||
|
||||
@Override
|
||||
public UIDefaults getDefaults() {
|
||||
UIDefaults defaults = super.getDefaults();
|
||||
// use larger initial capacity to avoid resizing UI defaults hash table
|
||||
// (from 610 to 1221 to 2443 entries) and to save some memory
|
||||
UIDefaults defaults = new FlatUIDefaults( 1500, 0.75f );
|
||||
|
||||
// initialize basic defaults (see super.getDefaults())
|
||||
initClassDefaults( defaults );
|
||||
initSystemColorDefaults( defaults );
|
||||
initComponentDefaults( defaults );
|
||||
|
||||
// add flag that indicates whether the LaF is light or dark
|
||||
// (can be queried without using FlatLaf API)
|
||||
@@ -914,6 +930,139 @@ public abstract class FlatLaf
|
||||
return super.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a UI defaults getter function that is invoked before the standard getter.
|
||||
* This allows using different UI defaults for special purposes
|
||||
* (e.g. using multiple themes at the same time).
|
||||
* <p>
|
||||
* The key is passed as parameter to the function.
|
||||
* If the function returns {@code null}, then the next registered function is invoked.
|
||||
* If all registered functions return {@code null}, then the current look and feel is asked.
|
||||
* If the function returns {@link #NULL_VALUE}, then the UI value becomes {@code null}.
|
||||
*
|
||||
* @see #unregisterUIDefaultsGetter(Function)
|
||||
* @see #runWithUIDefaultsGetter(Function, Runnable)
|
||||
* @since 1.6
|
||||
*/
|
||||
public void registerUIDefaultsGetter( Function<Object, Object> uiDefaultsGetter ) {
|
||||
if( uiDefaultsGetters == null )
|
||||
uiDefaultsGetters = new ArrayList<>();
|
||||
|
||||
uiDefaultsGetters.remove( uiDefaultsGetter );
|
||||
uiDefaultsGetters.add( uiDefaultsGetter );
|
||||
|
||||
// disable shared UIs
|
||||
FlatUIUtils.setUseSharedUIs( false );
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters a UI defaults getter function that was invoked before the standard getter.
|
||||
*
|
||||
* @see #registerUIDefaultsGetter(Function)
|
||||
* @see #runWithUIDefaultsGetter(Function, Runnable)
|
||||
* @since 1.6
|
||||
*/
|
||||
public void unregisterUIDefaultsGetter( Function<Object, Object> uiDefaultsGetter ) {
|
||||
if( uiDefaultsGetters == null )
|
||||
return;
|
||||
|
||||
uiDefaultsGetters.remove( uiDefaultsGetter );
|
||||
|
||||
// enable shared UIs
|
||||
if( uiDefaultsGetters.isEmpty() )
|
||||
FlatUIUtils.setUseSharedUIs( true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a UI defaults getter function that is invoked before the standard getter,
|
||||
* runs the given runnable and unregisters the UI defaults getter function again.
|
||||
* This allows using different UI defaults for special purposes
|
||||
* (e.g. using multiple themes at the same time).
|
||||
* If the current look and feel is not FlatLaf, then the getter is ignored and
|
||||
* the given runnable invoked.
|
||||
* <p>
|
||||
* The key is passed as parameter to the function.
|
||||
* If the function returns {@code null}, then the next registered function is invoked.
|
||||
* If all registered functions return {@code null}, then the current look and feel is asked.
|
||||
* If the function returns {@link #NULL_VALUE}, then the UI value becomes {@code null}.
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre>{@code
|
||||
* // create secondary theme
|
||||
* UIDefaults darkDefaults = new FlatDarkLaf().getDefaults();
|
||||
*
|
||||
* // create panel using secondary theme
|
||||
* FlatLaf.runWithUIDefaultsGetter( key -> {
|
||||
* Object value = darkDefaults.get( key );
|
||||
* return (value != null) ? value : FlatLaf.NULL_VALUE;
|
||||
* }, () -> {
|
||||
* // TODO create components that should use secondary theme here
|
||||
* } );
|
||||
* }</pre>
|
||||
*
|
||||
* @see #registerUIDefaultsGetter(Function)
|
||||
* @see #unregisterUIDefaultsGetter(Function)
|
||||
* @since 1.6
|
||||
*/
|
||||
public static void runWithUIDefaultsGetter( Function<Object, Object> uiDefaultsGetter, Runnable runnable ) {
|
||||
LookAndFeel laf = UIManager.getLookAndFeel();
|
||||
if( laf instanceof FlatLaf ) {
|
||||
((FlatLaf)laf).registerUIDefaultsGetter( uiDefaultsGetter );
|
||||
try {
|
||||
runnable.run();
|
||||
} finally {
|
||||
((FlatLaf)laf).unregisterUIDefaultsGetter( uiDefaultsGetter );
|
||||
}
|
||||
} else
|
||||
runnable.run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Special value returned by functions used in {@link #runWithUIDefaultsGetter(Function, Runnable)}
|
||||
* or {@link #registerUIDefaultsGetter(Function)} to indicate that the UI value should
|
||||
* become {@code null}.
|
||||
*
|
||||
* @see #runWithUIDefaultsGetter(Function, Runnable)
|
||||
* @see #registerUIDefaultsGetter(Function)
|
||||
* @since 1.6
|
||||
*/
|
||||
public static final Object NULL_VALUE = new Object();
|
||||
|
||||
//---- class FlatUIDefaults -----------------------------------------------
|
||||
|
||||
private class FlatUIDefaults
|
||||
extends UIDefaults
|
||||
{
|
||||
FlatUIDefaults( int initialCapacity, float loadFactor ) {
|
||||
super( initialCapacity, loadFactor );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object get( Object key ) {
|
||||
Object value = getValue( key );
|
||||
return (value != null) ? (value != NULL_VALUE ? value : null) : super.get( key );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object get( Object key, Locale l ) {
|
||||
Object value = getValue( key );
|
||||
return (value != null) ? (value != NULL_VALUE ? value : null) : super.get( key, l );
|
||||
}
|
||||
|
||||
private Object getValue( Object key ) {
|
||||
if( uiDefaultsGetters == null )
|
||||
return null;
|
||||
|
||||
for( int i = uiDefaultsGetters.size() - 1; i >= 0; i-- ) {
|
||||
Object value = uiDefaultsGetters.get( i ).apply( key );
|
||||
if( value != null )
|
||||
return value;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
//---- class ActiveFont ---------------------------------------------------
|
||||
|
||||
private static class ActiveFont
|
||||
|
||||
@@ -604,6 +604,13 @@ class UIDefaultsLoader
|
||||
case "fadeout": return parseColorHSLIncreaseDecrease( 3, false, params, resolver, reportError );
|
||||
case "fade": return parseColorFade( params, resolver, reportError );
|
||||
case "spin": return parseColorSpin( params, resolver, reportError );
|
||||
case "changeHue": return parseColorChange( 0, params, resolver, reportError );
|
||||
case "changeSaturation":return parseColorChange( 1, params, resolver, reportError );
|
||||
case "changeLightness": return parseColorChange( 2, params, resolver, reportError );
|
||||
case "changeAlpha": return parseColorChange( 3, params, resolver, reportError );
|
||||
case "mix": return parseColorMix( null, params, resolver, reportError );
|
||||
case "tint": return parseColorMix( "#fff", params, resolver, reportError );
|
||||
case "shade": return parseColorMix( "#000", params, resolver, reportError );
|
||||
}
|
||||
} finally {
|
||||
parseColorDepth--;
|
||||
@@ -753,6 +760,68 @@ class UIDefaultsLoader
|
||||
return parseFunctionBaseColor( colorStr, function, derived, resolver, reportError );
|
||||
}
|
||||
|
||||
/**
|
||||
* Syntax: changeHue(color,value[,options]) or
|
||||
* changeSaturation(color,value[,options]) or
|
||||
* changeLightness(color,value[,options]) or
|
||||
* changeAlpha(color,value[,options])
|
||||
* - color: a color (e.g. #f00) or a color function
|
||||
* - value: for hue: number of degrees; otherwise: percentage 0-100%
|
||||
* - options: [derived]
|
||||
*/
|
||||
private static Object parseColorChange( int hslIndex,
|
||||
List<String> params, Function<String, String> resolver, boolean reportError )
|
||||
{
|
||||
String colorStr = params.get( 0 );
|
||||
int value = (hslIndex == 0)
|
||||
? parseInteger( params.get( 1 ), true )
|
||||
: parsePercentage( params.get( 1 ) );
|
||||
boolean derived = false;
|
||||
|
||||
if( params.size() > 2 ) {
|
||||
String options = params.get( 2 );
|
||||
derived = options.contains( "derived" );
|
||||
}
|
||||
|
||||
// create function
|
||||
ColorFunction function = new ColorFunctions.HSLChange( hslIndex, value );
|
||||
|
||||
// parse base color, apply function and create derived color
|
||||
return parseFunctionBaseColor( colorStr, function, derived, resolver, reportError );
|
||||
}
|
||||
|
||||
/**
|
||||
* Syntax: mix(color1,color2[,weight]) or
|
||||
* tint(color[,weight]) or
|
||||
* shade(color[,weight])
|
||||
* - color1: a color (e.g. #f00) or a color function
|
||||
* - color2: a color (e.g. #f00) or a color function
|
||||
* - weight: the weight (in range 0-100%) to mix the two colors
|
||||
* larger weight uses more of first color, smaller weight more of second color
|
||||
*/
|
||||
private static Object parseColorMix( String color1Str, List<String> params, Function<String, String> resolver, boolean reportError ) {
|
||||
int i = 0;
|
||||
if( color1Str == null )
|
||||
color1Str = params.get( i++ );
|
||||
String color2Str = params.get( i++ );
|
||||
int weight = 50;
|
||||
|
||||
if( params.size() > i )
|
||||
weight = parsePercentage( params.get( i++ ) );
|
||||
|
||||
// parse second color
|
||||
String resolvedColor2Str = resolver.apply( color2Str );
|
||||
ColorUIResource color2 = (ColorUIResource) parseColorOrFunction( resolvedColor2Str, resolver, reportError );
|
||||
if( color2 == null )
|
||||
return null;
|
||||
|
||||
// create function
|
||||
ColorFunction function = new ColorFunctions.Mix( color2, weight );
|
||||
|
||||
// parse first color, apply function and create mixed color
|
||||
return parseFunctionBaseColor( color1Str, function, false, resolver, reportError );
|
||||
}
|
||||
|
||||
private static Object parseFunctionBaseColor( String colorStr, ColorFunction function,
|
||||
boolean derived, Function<String, String> resolver, boolean reportError )
|
||||
{
|
||||
|
||||
@@ -45,6 +45,7 @@ import com.formdev.flatlaf.util.DerivedColor;
|
||||
*
|
||||
* @uiDefault Component.focusWidth int
|
||||
* @uiDefault Component.innerFocusWidth int or float
|
||||
* @uiDefault Component.innerOutlineWidth int or float
|
||||
* @uiDefault Component.focusColor Color
|
||||
* @uiDefault Component.borderColor Color
|
||||
* @uiDefault Component.disabledBorderColor Color
|
||||
|
||||
@@ -108,7 +108,7 @@ public class FlatCaret
|
||||
protected void selectAllOnFocusGained() {
|
||||
JTextComponent c = getComponent();
|
||||
Document doc = c.getDocument();
|
||||
if( doc == null || !c.isEnabled() || !c.isEditable() )
|
||||
if( doc == null || !c.isEnabled() || !c.isEditable() || FlatUIUtils.isCellEditor( c ) )
|
||||
return;
|
||||
|
||||
Object selectAllOnFocusPolicy = c.getClientProperty( SELECT_ALL_ON_FOCUS_POLICY );
|
||||
|
||||
@@ -44,7 +44,6 @@ import java.beans.PropertyChangeListener;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.CellRendererPane;
|
||||
import javax.swing.ComboBoxEditor;
|
||||
import javax.swing.DefaultListCellRenderer;
|
||||
import javax.swing.InputMap;
|
||||
import javax.swing.JButton;
|
||||
@@ -338,33 +337,25 @@ public class FlatComboBoxUI
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ComboBoxEditor createEditor() {
|
||||
ComboBoxEditor comboBoxEditor = super.createEditor();
|
||||
protected void configureEditor() {
|
||||
super.configureEditor();
|
||||
|
||||
Component editor = comboBoxEditor.getEditorComponent();
|
||||
if( editor instanceof JTextField ) {
|
||||
JTextField textField = (JTextField) editor;
|
||||
textField.setColumns( editorColumns );
|
||||
|
||||
// assign a non-null and non-javax.swing.plaf.UIResource border to the text field,
|
||||
// otherwise it is replaced with default text field border when switching LaF
|
||||
// because javax.swing.plaf.basic.BasicComboBoxEditor.BorderlessTextField.setBorder()
|
||||
// uses "border instanceof javax.swing.plaf.basic.BasicComboBoxEditor.UIResource"
|
||||
// instead of "border instanceof javax.swing.plaf.UIResource"
|
||||
textField.setBorder( BorderFactory.createEmptyBorder() );
|
||||
// remove default text field border from editor
|
||||
Border border = textField.getBorder();
|
||||
if( border == null || border instanceof UIResource ) {
|
||||
// assign a non-null and non-javax.swing.plaf.UIResource border to the text field,
|
||||
// otherwise it is replaced with default text field border when switching LaF
|
||||
// because javax.swing.plaf.basic.BasicComboBoxEditor.BorderlessTextField.setBorder()
|
||||
// uses "border instanceof javax.swing.plaf.basic.BasicComboBoxEditor.UIResource"
|
||||
// instead of "border instanceof javax.swing.plaf.UIResource"
|
||||
textField.setBorder( BorderFactory.createEmptyBorder() );
|
||||
}
|
||||
}
|
||||
|
||||
return comboBoxEditor;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureEditor() {
|
||||
super.configureEditor();
|
||||
|
||||
// remove default text field border from editor
|
||||
if( editor instanceof JTextField && ((JTextField)editor).getBorder() instanceof FlatTextBorder )
|
||||
((JTextField)editor).setBorder( BorderFactory.createEmptyBorder() );
|
||||
|
||||
// explicitly make non-opaque
|
||||
if( editor instanceof JComponent )
|
||||
((JComponent)editor).setOpaque( false );
|
||||
@@ -504,11 +495,20 @@ public class FlatComboBoxUI
|
||||
c.setBackground( getBackground( enabled ) );
|
||||
c.setForeground( getForeground( enabled ) );
|
||||
|
||||
// make renderer component temporary non-opaque to avoid that renderer paints
|
||||
// background outside of border if combobox uses larger arc for edges
|
||||
// (e.g. FlatClientProperties.COMPONENT_ROUND_RECT is true)
|
||||
if( c instanceof JComponent )
|
||||
((JComponent)c).setOpaque( false );
|
||||
|
||||
boolean shouldValidate = (c instanceof JPanel);
|
||||
|
||||
paddingBorder.install( c );
|
||||
currentValuePane.paintComponent( g, c, comboBox, bounds.x, bounds.y, bounds.width, bounds.height, shouldValidate );
|
||||
paddingBorder.uninstall();
|
||||
|
||||
if( c instanceof JComponent )
|
||||
((JComponent)c).setOpaque( true );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -704,6 +704,9 @@ public class FlatComboBoxUI
|
||||
protected void configurePopup() {
|
||||
super.configurePopup();
|
||||
|
||||
// make opaque to avoid that background shines thru border (e.g. at 150% scaling)
|
||||
setOpaque( true );
|
||||
|
||||
Border border = UIManager.getBorder( "PopupMenu.border" );
|
||||
if( border != null )
|
||||
setBorder( border );
|
||||
@@ -736,6 +739,21 @@ public class FlatComboBoxUI
|
||||
return height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show( Component invoker, int x, int y ) {
|
||||
// Java 8: fix y coordinate if popup is shown above the combobox
|
||||
// (already fixed in Java 9+ https://bugs.openjdk.java.net/browse/JDK-7072653)
|
||||
if( y < 0 && !SystemInfo.isJava_9_orLater ) {
|
||||
Border popupBorder = getBorder();
|
||||
if( popupBorder != null ) {
|
||||
Insets insets = popupBorder.getBorderInsets( this );
|
||||
y -= insets.top + insets.bottom;
|
||||
}
|
||||
}
|
||||
|
||||
super.show( invoker, x, y );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void paintChildren( Graphics g ) {
|
||||
super.paintChildren( g );
|
||||
@@ -810,7 +828,7 @@ public class FlatComboBoxUI
|
||||
|
||||
// remember old border and replace it
|
||||
rendererBorder = jc.getBorder();
|
||||
rendererComponent.setBorder( this );
|
||||
jc.setBorder( this );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -262,12 +262,20 @@ public class FlatFileChooserUI
|
||||
|
||||
@Override
|
||||
public FileView getFileView( JFileChooser fc ) {
|
||||
return fileView;
|
||||
return doNotUseSystemIcons() ? super.getFileView( fc ) : fileView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearIconCache() {
|
||||
fileView.clearIconCache();
|
||||
if( doNotUseSystemIcons() )
|
||||
super.clearIconCache();
|
||||
else
|
||||
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 -------------------------------------------------
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.LayoutManager;
|
||||
import java.awt.Rectangle;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import javax.swing.BorderFactory;
|
||||
@@ -146,6 +147,19 @@ public class FlatInternalFrameTitlePane
|
||||
closeButton.setVisible( frame.isClosable() );
|
||||
}
|
||||
|
||||
Rectangle getFrameIconBounds() {
|
||||
Icon icon = titleLabel.getIcon();
|
||||
if( icon == null )
|
||||
return null;
|
||||
|
||||
int iconWidth = icon.getIconWidth();
|
||||
int iconHeight = icon.getIconHeight();
|
||||
boolean leftToRight = titleLabel.getComponentOrientation().isLeftToRight();
|
||||
int x = titleLabel.getX() + (leftToRight ? 0 : (titleLabel.getWidth() - iconWidth));
|
||||
int y = titleLabel.getY() + ((titleLabel.getHeight() - iconHeight) / 2);
|
||||
return new Rectangle( x, y, iconWidth, iconHeight );
|
||||
}
|
||||
|
||||
/**
|
||||
* Does nothing because FlatLaf internal frames do not have system menus.
|
||||
*/
|
||||
|
||||
@@ -22,10 +22,13 @@ import java.awt.Component;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Insets;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.event.MouseEvent;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JInternalFrame;
|
||||
import javax.swing.LookAndFeel;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.event.MouseInputAdapter;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.basic.BasicInternalFrameUI;
|
||||
|
||||
@@ -122,6 +125,11 @@ public class FlatInternalFrameUI
|
||||
return new FlatWindowResizer.InternalFrameResizer( frame, this::getDesktopManager );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MouseInputAdapter createBorderListener( JInternalFrame w ) {
|
||||
return new FlatBorderListener();
|
||||
}
|
||||
|
||||
//---- class FlatInternalFrameBorder --------------------------------------
|
||||
|
||||
public static class FlatInternalFrameBorder
|
||||
@@ -195,4 +203,29 @@ public class FlatInternalFrameUI
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---- class FlatBorderListener -------------------------------------------
|
||||
|
||||
/**
|
||||
* @since 1.6
|
||||
*/
|
||||
protected class FlatBorderListener
|
||||
extends BorderListener
|
||||
{
|
||||
@Override
|
||||
public void mouseClicked( MouseEvent e ) {
|
||||
if( e.getClickCount() == 2 && !frame.isIcon() &&
|
||||
e.getSource() instanceof FlatInternalFrameTitlePane )
|
||||
{
|
||||
Rectangle iconBounds = ((FlatInternalFrameTitlePane)e.getSource()).getFrameIconBounds();
|
||||
if( iconBounds != null && iconBounds.contains( e.getX(), e.getY() ) ) {
|
||||
if( frame.isClosable() )
|
||||
frame.doDefaultCloseAction();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
super.mouseClicked( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,10 +20,12 @@ import java.awt.Color;
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.event.FocusEvent;
|
||||
import java.awt.event.FocusListener;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.basic.BasicListUI;
|
||||
import com.formdev.flatlaf.FlatClientProperties;
|
||||
|
||||
/**
|
||||
* Provides the Flat LaF UI delegate for {@link javax.swing.JList}.
|
||||
@@ -95,6 +97,17 @@ public class FlatListUI
|
||||
selectionInactiveForeground = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PropertyChangeListener createPropertyChangeListener() {
|
||||
PropertyChangeListener superListener = super.createPropertyChangeListener();
|
||||
return e -> {
|
||||
superListener.propertyChange( e );
|
||||
|
||||
if( FlatClientProperties.COMPONENT_FOCUS_OWNER.equals( e.getPropertyName() ) )
|
||||
toggleSelectionColors();
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FocusListener createFocusListener() {
|
||||
return new BasicListUI.FocusHandler() {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.formdev.flatlaf.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Container;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.Window;
|
||||
import java.beans.PropertyChangeListener;
|
||||
@@ -24,7 +25,6 @@ import java.util.List;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JRootPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import com.formdev.flatlaf.FlatClientProperties;
|
||||
@@ -76,6 +76,11 @@ public class FlatNativeWindowBorder
|
||||
if( !isSupported() )
|
||||
return null;
|
||||
|
||||
// do nothing if root pane has a parent that is not a window (e.g. a JInternalFrame)
|
||||
Container parent = rootPane.getParent();
|
||||
if( parent != null && !(parent instanceof Window) )
|
||||
return null;
|
||||
|
||||
// Check whether root pane already has a window, which is the case when
|
||||
// switching from another LaF to FlatLaf.
|
||||
// Also check whether the window is displayable, which is required to install
|
||||
@@ -83,9 +88,8 @@ public class FlatNativeWindowBorder
|
||||
// If the window is not displayable, then it was probably closed/disposed but not yet removed
|
||||
// from the list of windows that AWT maintains and returns with Window.getWindows().
|
||||
// It could be also be a window that is currently hidden, but may be shown later.
|
||||
Window window = SwingUtilities.windowForComponent( rootPane );
|
||||
if( window != null && window.isDisplayable() )
|
||||
install( window );
|
||||
if( parent instanceof Window && parent.isDisplayable() )
|
||||
install( (Window) parent );
|
||||
|
||||
// Install FlatLaf native window border, which must be done late,
|
||||
// when the native window is already created, because it needs access to the window.
|
||||
@@ -174,9 +178,9 @@ public class FlatNativeWindowBorder
|
||||
return;
|
||||
|
||||
// uninstall native window border
|
||||
Window window = SwingUtilities.windowForComponent( rootPane );
|
||||
if( window != null )
|
||||
uninstall( window );
|
||||
Container parent = rootPane.getParent();
|
||||
if( parent instanceof Window )
|
||||
uninstall( (Window) parent );
|
||||
}
|
||||
|
||||
private static void uninstall( Window window ) {
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.awt.GridBagConstraints;
|
||||
import java.awt.Insets;
|
||||
import javax.swing.Box;
|
||||
import javax.swing.BoxLayout;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
@@ -91,6 +92,7 @@ public class FlatOptionPaneUI
|
||||
protected int messagePadding;
|
||||
protected int maxCharactersPerLine;
|
||||
private int focusWidth;
|
||||
private boolean sameSizeButtons;
|
||||
|
||||
public static ComponentUI createUI( JComponent c ) {
|
||||
return new FlatOptionPaneUI();
|
||||
@@ -104,6 +106,7 @@ public class FlatOptionPaneUI
|
||||
messagePadding = UIManager.getInt( "OptionPane.messagePadding" );
|
||||
maxCharactersPerLine = UIManager.getInt( "OptionPane.maxCharactersPerLine" );
|
||||
focusWidth = UIManager.getInt( "Component.focusWidth" );
|
||||
sameSizeButtons = FlatUIUtils.getUIBoolean( "OptionPane.sameSizeButtons", true );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -160,8 +163,15 @@ public class FlatOptionPaneUI
|
||||
cons.insets.bottom = UIScale.scale( messagePadding );
|
||||
|
||||
// disable line wrapping for HTML
|
||||
if( msg instanceof String && BasicHTML.isHTMLString( (String) msg ) )
|
||||
maxll = Integer.MAX_VALUE;
|
||||
if( msg != null &&
|
||||
!(msg instanceof Component) &&
|
||||
!(msg instanceof Object[]) &&
|
||||
!(msg instanceof Icon) )
|
||||
{
|
||||
msg = msg.toString();
|
||||
if( BasicHTML.isHTMLString( (String) msg ) )
|
||||
maxll = Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
// fix right-to-left alignment if super.addMessageComponents() breaks longer lines
|
||||
// into multiple labels and puts them into a box that aligns them to the left
|
||||
@@ -217,6 +227,11 @@ public class FlatOptionPaneUI
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean getSizeButtonsToSameWidth() {
|
||||
return sameSizeButtons;
|
||||
}
|
||||
|
||||
//---- class NonUIResourceBorder ------------------------------------------
|
||||
|
||||
private static class NonUIResourceBorder
|
||||
|
||||
@@ -24,8 +24,8 @@ import javax.swing.plaf.ComponentUI;
|
||||
*
|
||||
* <!-- BasicSeparatorUI -->
|
||||
*
|
||||
* @uiDefault PopupMenuSeparator.background Color unused
|
||||
* @uiDefault PopupMenuSeparator.foreground Color
|
||||
* @uiDefault Separator.background Color unused
|
||||
* @uiDefault Separator.foreground Color
|
||||
*
|
||||
* <!-- FlatSeparatorUI -->
|
||||
*
|
||||
|
||||
@@ -27,9 +27,11 @@ import java.awt.Insets;
|
||||
import java.awt.LayoutManager;
|
||||
import java.awt.LayoutManager2;
|
||||
import java.awt.Window;
|
||||
import java.awt.event.HierarchyEvent;
|
||||
import java.awt.event.HierarchyListener;
|
||||
import java.awt.event.ComponentAdapter;
|
||||
import java.awt.event.ComponentEvent;
|
||||
import java.awt.event.ComponentListener;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.function.Function;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JDialog;
|
||||
@@ -38,6 +40,7 @@ import javax.swing.JLayeredPane;
|
||||
import javax.swing.JMenuBar;
|
||||
import javax.swing.JRootPane;
|
||||
import javax.swing.LookAndFeel;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.plaf.BorderUIResource;
|
||||
@@ -81,7 +84,8 @@ public class FlatRootPaneUI
|
||||
|
||||
private Object nativeWindowBorderData;
|
||||
private LayoutManager oldLayout;
|
||||
private HierarchyListener hierarchyListener;
|
||||
private PropertyChangeListener ancestorListener;
|
||||
private ComponentListener componentListener;
|
||||
|
||||
public static ComponentUI createUI( JComponent c ) {
|
||||
return new FlatRootPaneUI();
|
||||
@@ -149,16 +153,32 @@ public class FlatRootPaneUI
|
||||
// This is very disturbing in dark themes, but hard to notice in light themes.
|
||||
// Seems to be a rounding issue when Swing adds dirty region of window
|
||||
// using RepaintManager.nativeAddDirtyRegion().
|
||||
hierarchyListener = e -> {
|
||||
if( (e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0 &&
|
||||
rootPane.getParent() instanceof Window )
|
||||
{
|
||||
// add whole root pane to dirty regions when window is initially shown
|
||||
rootPane.getParent().repaint( rootPane.getX(), rootPane.getY(),
|
||||
rootPane.getWidth(), rootPane.getHeight() );
|
||||
//
|
||||
// Note: Not using a HierarchyListener here, which would be much easier,
|
||||
// because this causes problems with mouse clicks in heavy-weight popups.
|
||||
// Instead, add a listener to the root pane that waits until it is added
|
||||
// to a window, then add a component listener to the window.
|
||||
// See: https://github.com/JFormDesigner/FlatLaf/issues/371
|
||||
ancestorListener = e -> {
|
||||
Object oldValue = e.getOldValue();
|
||||
Object newValue = e.getNewValue();
|
||||
if( newValue instanceof Window ) {
|
||||
if( componentListener == null ) {
|
||||
componentListener = new ComponentAdapter() {
|
||||
@Override
|
||||
public void componentShown( ComponentEvent e ) {
|
||||
// add whole root pane to dirty regions when window is initially shown
|
||||
root.getParent().repaint( root.getX(), root.getY(), root.getWidth(), root.getHeight() );
|
||||
}
|
||||
};
|
||||
}
|
||||
((Window)newValue).addComponentListener( componentListener );
|
||||
} else if( newValue == null && oldValue instanceof Window ) {
|
||||
if( componentListener != null )
|
||||
((Window)oldValue).removeComponentListener( componentListener );
|
||||
}
|
||||
};
|
||||
root.addHierarchyListener( hierarchyListener );
|
||||
root.addPropertyChangeListener( "ancestor", ancestorListener );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,8 +187,14 @@ public class FlatRootPaneUI
|
||||
super.uninstallListeners( root );
|
||||
|
||||
if( SystemInfo.isJava_9_orLater ) {
|
||||
root.removeHierarchyListener( hierarchyListener );
|
||||
hierarchyListener = null;
|
||||
if( componentListener != null ) {
|
||||
Window window = SwingUtilities.windowForComponent( root );
|
||||
if( window != null )
|
||||
window.removeComponentListener( componentListener );
|
||||
componentListener = null;
|
||||
}
|
||||
root.removePropertyChangeListener( "ancestor", ancestorListener );
|
||||
ancestorListener = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,11 @@ package com.formdev.flatlaf.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.FontMetrics;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Insets;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.Shape;
|
||||
import java.awt.event.MouseEvent;
|
||||
@@ -176,9 +178,27 @@ public class FlatSliderUI
|
||||
if( slider.getOrientation() == JSlider.VERTICAL )
|
||||
return -1;
|
||||
|
||||
// use default font (instead of slider font) because the slider font size
|
||||
// may be different to label font size, but we want align the track/thumb with labels
|
||||
Font font = UIManager.getFont( "defaultFont" );
|
||||
if( font == null )
|
||||
font = slider.getFont();
|
||||
FontMetrics fm = slider.getFontMetrics( font );
|
||||
|
||||
// calculate track y coordinate and height
|
||||
// (not using field trackRect here because slider size may be [0,0]
|
||||
// and field trackRect may have invalid values in this case)
|
||||
Insets insets = slider.getInsets();
|
||||
int thumbHeight = getThumbSize().height;
|
||||
int contentHeight = height - insets.top - insets.bottom - focusInsets.top - focusInsets.bottom;
|
||||
int centerSpacing = thumbHeight
|
||||
+ (slider.getPaintTicks() ? getTickLength() : 0)
|
||||
+ (slider.getPaintLabels() ? getHeightOfTallestLabel() : 0);
|
||||
int trackY = insets.top + focusInsets.top + (contentHeight - centerSpacing - 1) / 2;
|
||||
int trackHeight = thumbHeight;
|
||||
|
||||
// compute a baseline so that the track is vertically centered
|
||||
FontMetrics fm = slider.getFontMetrics( slider.getFont() );
|
||||
return trackRect.y + Math.round( (trackRect.height - fm.getHeight()) / 2f ) + fm.getAscent() - 1;
|
||||
return trackY + Math.round( (trackHeight - fm.getHeight()) / 2f ) + fm.getAscent() - 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -175,15 +175,7 @@ public class FlatSpinnerUI
|
||||
@Override
|
||||
protected JComponent createEditor() {
|
||||
JComponent editor = super.createEditor();
|
||||
|
||||
// explicitly make non-opaque
|
||||
editor.setOpaque( false );
|
||||
JTextField textField = getEditorTextField( editor );
|
||||
if( textField != null )
|
||||
textField.setOpaque( false );
|
||||
|
||||
updateEditorPadding();
|
||||
updateEditorColors();
|
||||
configureEditor( editor );
|
||||
return editor;
|
||||
}
|
||||
|
||||
@@ -191,8 +183,19 @@ public class FlatSpinnerUI
|
||||
protected void replaceEditor( JComponent oldEditor, JComponent newEditor ) {
|
||||
super.replaceEditor( oldEditor, newEditor );
|
||||
|
||||
configureEditor( newEditor );
|
||||
|
||||
removeEditorFocusListener( oldEditor );
|
||||
addEditorFocusListener( newEditor );
|
||||
}
|
||||
|
||||
/** @since 1.6 */
|
||||
protected void configureEditor( JComponent editor ) {
|
||||
// explicitly make non-opaque
|
||||
editor.setOpaque( false );
|
||||
JTextField textField = getEditorTextField( editor );
|
||||
if( textField != null )
|
||||
textField.setOpaque( false );
|
||||
|
||||
updateEditorPadding();
|
||||
updateEditorColors();
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.awt.Graphics2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import javax.swing.JScrollBar;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JViewport;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.table.JTableHeader;
|
||||
@@ -44,6 +45,7 @@ public class FlatTableHeaderBorder
|
||||
{
|
||||
protected Color separatorColor = UIManager.getColor( "TableHeader.separatorColor" );
|
||||
protected Color bottomSeparatorColor = UIManager.getColor( "TableHeader.bottomSeparatorColor" );
|
||||
/** @since 1.6 */ protected boolean showTrailingVerticalLine = UIManager.getBoolean( "TableHeader.showTrailingVerticalLine" );
|
||||
|
||||
public FlatTableHeaderBorder() {
|
||||
super( UIManager.getInsets( "TableHeader.cellMargins" ) );
|
||||
@@ -108,12 +110,23 @@ public class FlatTableHeaderBorder
|
||||
}
|
||||
|
||||
protected boolean hideTrailingVerticalLine( JTableHeader header ) {
|
||||
if( showTrailingVerticalLine )
|
||||
return false;
|
||||
|
||||
// do not hide if table header is not a child of a scroll pane
|
||||
Container viewport = header.getParent();
|
||||
Container viewportParent = (viewport != null) ? viewport.getParent() : null;
|
||||
if( !(viewportParent instanceof JScrollPane) )
|
||||
return true;
|
||||
return false;
|
||||
|
||||
JScrollBar vsb = ((JScrollPane)viewportParent).getVerticalScrollBar();
|
||||
// do not hide if table header is not the column header of the scroll pane
|
||||
JScrollPane scrollPane = (JScrollPane) viewportParent;
|
||||
JViewport columnHeader = scrollPane.getColumnHeader();
|
||||
if( viewport != columnHeader )
|
||||
return false;
|
||||
|
||||
// hide if vertical scroll bar is not shown
|
||||
JScrollBar vsb = scrollPane.getVerticalScrollBar();
|
||||
if( vsb == null || !vsb.isVisible() )
|
||||
return true;
|
||||
|
||||
|
||||
@@ -18,10 +18,13 @@ package com.formdev.flatlaf.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Cursor;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Insets;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.util.Objects;
|
||||
import javax.swing.Icon;
|
||||
@@ -31,6 +34,7 @@ import javax.swing.JTable;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.event.MouseInputListener;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.UIResource;
|
||||
import javax.swing.plaf.basic.BasicTableHeaderUI;
|
||||
@@ -58,6 +62,7 @@ import com.formdev.flatlaf.util.UIScale;
|
||||
* @uiDefault TableHeader.cellMargins Insets
|
||||
* @uiDefault TableHeader.separatorColor Color
|
||||
* @uiDefault TableHeader.bottomSeparatorColor Color
|
||||
* @uiDefault TableHeader.showTrailingVerticalLine boolean
|
||||
*
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
@@ -94,6 +99,11 @@ public class FlatTableHeaderUI
|
||||
bottomSeparatorColor = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MouseInputListener createMouseInputListener() {
|
||||
return new FlatMouseInputHandler();
|
||||
}
|
||||
|
||||
// overridden and made public to allow usage in custom renderers
|
||||
@Override
|
||||
public int getRolloverColumn() {
|
||||
@@ -252,4 +262,54 @@ public class FlatTableHeaderUI
|
||||
return (origBorder != null) ? origBorder.isBorderOpaque() : false;
|
||||
}
|
||||
}
|
||||
|
||||
//---- class FlatMouseInputHandler ----------------------------------------
|
||||
|
||||
/**
|
||||
* @since 1.6
|
||||
*/
|
||||
protected class FlatMouseInputHandler
|
||||
extends MouseInputHandler
|
||||
{
|
||||
Cursor oldCursor;
|
||||
|
||||
@Override
|
||||
public void mouseMoved( MouseEvent e ) {
|
||||
// restore old cursor, which is necessary because super.mouseMoved() swaps cursors
|
||||
if( oldCursor != null ) {
|
||||
header.setCursor( oldCursor );
|
||||
oldCursor = null;
|
||||
}
|
||||
|
||||
super.mouseMoved( e );
|
||||
|
||||
// if resizing last column is not possible, then Swing still shows a resize cursor,
|
||||
// which can be confusing for the user --> change cursor to standard cursor
|
||||
JTable table;
|
||||
int column;
|
||||
if( header.isEnabled() &&
|
||||
(table = header.getTable()) != null &&
|
||||
table.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF &&
|
||||
header.getCursor() == Cursor.getPredefinedCursor( Cursor.E_RESIZE_CURSOR ) &&
|
||||
(column = header.columnAtPoint( e.getPoint() )) >= 0 &&
|
||||
column == header.getColumnModel().getColumnCount() - 1 )
|
||||
{
|
||||
// mouse is in last column
|
||||
Rectangle r = header.getHeaderRect( column );
|
||||
r.grow( -3, 0 );
|
||||
if( !r.contains( e.getX(), e.getY() ) ) {
|
||||
// mouse is in left or right resize area of last column
|
||||
boolean isResizeLastColumn = (e.getX() >= r.x + (r.width / 2));
|
||||
if( !header.getComponentOrientation().isLeftToRight() )
|
||||
isResizeLastColumn = !isResizeLastColumn;
|
||||
|
||||
if( isResizeLastColumn ) {
|
||||
// resize is not possible --> change cursor to standard cursor
|
||||
oldCursor = header.getCursor();
|
||||
header.setCursor( Cursor.getDefaultCursor() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.awt.Graphics2D;
|
||||
import java.awt.event.FocusEvent;
|
||||
import java.awt.event.FocusListener;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JViewport;
|
||||
@@ -34,6 +35,7 @@ import javax.swing.UIManager;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.basic.BasicTableUI;
|
||||
import javax.swing.table.JTableHeader;
|
||||
import com.formdev.flatlaf.FlatClientProperties;
|
||||
import com.formdev.flatlaf.util.Graphics2DProxy;
|
||||
import com.formdev.flatlaf.util.SystemInfo;
|
||||
import com.formdev.flatlaf.util.UIScale;
|
||||
@@ -69,6 +71,7 @@ import com.formdev.flatlaf.util.UIScale;
|
||||
* @uiDefault Table.rowHeight int
|
||||
* @uiDefault Table.showHorizontalLines boolean
|
||||
* @uiDefault Table.showVerticalLines boolean
|
||||
* @uiDefault Table.showTrailingVerticalLine boolean
|
||||
* @uiDefault Table.intercellSpacing Dimension
|
||||
* @uiDefault Table.selectionInactiveBackground Color
|
||||
* @uiDefault Table.selectionInactiveForeground Color
|
||||
@@ -90,6 +93,7 @@ public class FlatTableUI
|
||||
{
|
||||
protected boolean showHorizontalLines;
|
||||
protected boolean showVerticalLines;
|
||||
/** @since 1.6 */ protected boolean showTrailingVerticalLine;
|
||||
protected Dimension intercellSpacing;
|
||||
|
||||
protected Color selectionBackground;
|
||||
@@ -101,6 +105,8 @@ public class FlatTableUI
|
||||
private boolean oldShowVerticalLines;
|
||||
private Dimension oldIntercellSpacing;
|
||||
|
||||
private PropertyChangeListener propertyChangeListener;
|
||||
|
||||
public static ComponentUI createUI( JComponent c ) {
|
||||
return new FlatTableUI();
|
||||
}
|
||||
@@ -111,6 +117,7 @@ public class FlatTableUI
|
||||
|
||||
showHorizontalLines = UIManager.getBoolean( "Table.showHorizontalLines" );
|
||||
showVerticalLines = UIManager.getBoolean( "Table.showVerticalLines" );
|
||||
showTrailingVerticalLine = UIManager.getBoolean( "Table.showTrailingVerticalLine" );
|
||||
intercellSpacing = UIManager.getDimension( "Table.intercellSpacing" );
|
||||
|
||||
selectionBackground = UIManager.getColor( "Table.selectionBackground" );
|
||||
@@ -159,6 +166,25 @@ public class FlatTableUI
|
||||
table.setIntercellSpacing( oldIntercellSpacing );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void installListeners() {
|
||||
super.installListeners();
|
||||
|
||||
propertyChangeListener = e -> {
|
||||
if( FlatClientProperties.COMPONENT_FOCUS_OWNER.equals( e.getPropertyName() ) )
|
||||
toggleSelectionColors();
|
||||
};
|
||||
table.addPropertyChangeListener( propertyChangeListener );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void uninstallListeners() {
|
||||
super.uninstallListeners();
|
||||
|
||||
table.removePropertyChangeListener( propertyChangeListener );
|
||||
propertyChangeListener = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FocusListener createFocusListener() {
|
||||
return new BasicTableUI.FocusHandler() {
|
||||
@@ -292,6 +318,10 @@ public class FlatTableUI
|
||||
}
|
||||
|
||||
protected boolean hideLastVerticalLine() {
|
||||
if( showTrailingVerticalLine )
|
||||
return false;
|
||||
|
||||
// do not hide if table is not a child of a scroll pane
|
||||
Container viewport = SwingUtilities.getUnwrappedParent( table );
|
||||
Container viewportParent = (viewport != null) ? viewport.getParent() : null;
|
||||
if( !(viewportParent instanceof JScrollPane) )
|
||||
|
||||
@@ -237,12 +237,13 @@ public class FlatTextFieldUI
|
||||
// compute placeholder location
|
||||
Rectangle r = getVisibleEditorRect();
|
||||
FontMetrics fm = c.getFontMetrics( c.getFont() );
|
||||
String clippedPlaceholder = JavaCompatibility.getClippedString( c, fm, (String) placeholder, r.width );
|
||||
int x = r.x + (c.getComponentOrientation().isLeftToRight() ? 0 : r.width - fm.stringWidth( clippedPlaceholder ));
|
||||
int y = r.y + fm.getAscent() + ((r.height - fm.getHeight()) / 2);
|
||||
|
||||
// paint placeholder
|
||||
g.setColor( placeholderForeground );
|
||||
String clippedPlaceholder = JavaCompatibility.getClippedString( c, fm, (String) placeholder, r.width );
|
||||
FlatUIUtils.drawString( c, g, clippedPlaceholder, r.x, y );
|
||||
FlatUIUtils.drawString( c, g, clippedPlaceholder, x, y );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -508,7 +508,7 @@ public class FlatTitlePane
|
||||
|
||||
protected void menuBarLayouted() {
|
||||
updateNativeTitleBarHeightAndHitTestSpotsLater();
|
||||
revalidate();
|
||||
doLayout();
|
||||
}
|
||||
|
||||
/*debug
|
||||
|
||||
@@ -230,6 +230,26 @@ public class FlatTreeUI
|
||||
tree.repaint( 0, r.y, tree.getWidth(), r.height );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Rectangle getPathBounds( JTree tree, TreePath path ) {
|
||||
Rectangle bounds = super.getPathBounds( tree, path );
|
||||
|
||||
// If this method was invoked from JTree.getPathForLocation(int x, int y) to check whether
|
||||
// the location is within tree node bounds, then return the bounds of a wide node.
|
||||
// This changes the behavior of JTree.getPathForLocation(int x, int y) and
|
||||
// JTree.getRowForLocation(int x, int y), which now return the path/row even
|
||||
// if [x,y] is in the wide row area outside of the actual tree node.
|
||||
if( bounds != null &&
|
||||
isWideSelection() &&
|
||||
UIManager.getBoolean( "FlatLaf.experimental.tree.widePathForLocation" ) &&
|
||||
StackUtils.wasInvokedFrom( JTree.class.getName(), "getPathForLocation", 5 ) )
|
||||
{
|
||||
bounds.x = 0;
|
||||
bounds.width = tree.getWidth();
|
||||
}
|
||||
return bounds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Same as super.paintRow(), but supports wide selection and uses
|
||||
* inactive selection background/foreground if tree is not focused.
|
||||
@@ -243,9 +263,19 @@ public class FlatTreeUI
|
||||
boolean isDropRow = isDropRow( row );
|
||||
boolean needsSelectionPainting = (isSelected || isDropRow) && isPaintSelection();
|
||||
|
||||
// do not paint row if editing, except if selection needs painted
|
||||
if( isEditing && !needsSelectionPainting )
|
||||
// do not paint row if editing
|
||||
if( isEditing ) {
|
||||
// paint wide selection
|
||||
// (do not access cell renderer here to avoid side effect
|
||||
// if renderer component is also used as editor component)
|
||||
if( isSelected && isWideSelection() ) {
|
||||
Color oldColor = g.getColor();
|
||||
g.setColor( selectionInactiveBackground );
|
||||
paintWideSelection( g, clipBounds, insets, bounds, path, row, isExpanded, hasBeenExpanded, isLeaf );
|
||||
g.setColor( oldColor );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
boolean hasFocus = FlatUIUtils.isPermanentFocusOwner( tree );
|
||||
boolean cellHasFocus = hasFocus && (row == getLeadSelectionRow());
|
||||
@@ -302,14 +332,7 @@ public class FlatTreeUI
|
||||
|
||||
if( isWideSelection() ) {
|
||||
// wide selection
|
||||
g.fillRect( 0, bounds.y, tree.getWidth(), bounds.height );
|
||||
|
||||
// paint expand/collapse icon
|
||||
// (was already painted before, but painted over with wide selection)
|
||||
if( shouldPaintExpandControl( path, row, isExpanded, hasBeenExpanded, isLeaf ) ) {
|
||||
paintExpandControl( g, clipBounds, insets, bounds,
|
||||
path, row, isExpanded, hasBeenExpanded, isLeaf );
|
||||
}
|
||||
paintWideSelection( g, clipBounds, insets, bounds, path, row, isExpanded, hasBeenExpanded, isLeaf );
|
||||
} else {
|
||||
// non-wide selection
|
||||
paintCellBackground( g, rendererComponent, bounds );
|
||||
@@ -333,8 +356,7 @@ public class FlatTreeUI
|
||||
}
|
||||
|
||||
// paint renderer
|
||||
if( !isEditing )
|
||||
rendererPane.paintComponent( g, rendererComponent, tree, bounds.x, bounds.y, bounds.width, bounds.height, true );
|
||||
rendererPane.paintComponent( g, rendererComponent, tree, bounds.x, bounds.y, bounds.width, bounds.height, true );
|
||||
|
||||
// restore background selection color and border selection color
|
||||
if( oldBackgroundSelectionColor != null )
|
||||
@@ -343,6 +365,19 @@ public class FlatTreeUI
|
||||
((DefaultTreeCellRenderer)rendererComponent).setBorderSelectionColor( oldBorderSelectionColor );
|
||||
}
|
||||
|
||||
private void paintWideSelection( Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds,
|
||||
TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf )
|
||||
{
|
||||
g.fillRect( 0, bounds.y, tree.getWidth(), bounds.height );
|
||||
|
||||
// paint expand/collapse icon
|
||||
// (was already painted before, but painted over with wide selection)
|
||||
if( shouldPaintExpandControl( path, row, isExpanded, hasBeenExpanded, isLeaf ) ) {
|
||||
paintExpandControl( g, clipBounds, insets, bounds,
|
||||
path, row, isExpanded, hasBeenExpanded, isLeaf );
|
||||
}
|
||||
}
|
||||
|
||||
private void paintCellBackground( Graphics g, Component rendererComponent, Rectangle bounds ) {
|
||||
int xOffset = 0;
|
||||
int imageOffset = 0;
|
||||
|
||||
@@ -69,6 +69,7 @@ public class FlatUIUtils
|
||||
{
|
||||
public static final boolean MAC_USE_QUARTZ = Boolean.getBoolean( "apple.awt.graphics.UseQuartz" );
|
||||
|
||||
private static boolean useSharedUIs = true;
|
||||
private static WeakHashMap<LookAndFeel, IdentityHashMap<Object, ComponentUI>> sharedUIinstances = new WeakHashMap<>();
|
||||
|
||||
public static Rectangle addInsets( Rectangle r, Insets insets ) {
|
||||
@@ -825,6 +826,27 @@ debug*/
|
||||
return explicitlySet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether shared UI delegates are used.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public static boolean isUseSharedUIs() {
|
||||
return useSharedUIs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies whether shared UI delegates are used.
|
||||
* This does not change already existing UI delegates.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public static boolean setUseSharedUIs( boolean useSharedUIs ) {
|
||||
boolean old = FlatUIUtils.useSharedUIs;
|
||||
FlatUIUtils.useSharedUIs = useSharedUIs;
|
||||
return old;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a shared component UI for the given key and the current Laf.
|
||||
* Each Laf instance has its own shared component UI instance.
|
||||
@@ -833,6 +855,9 @@ debug*/
|
||||
* may use multiple Laf instances at the same time.
|
||||
*/
|
||||
public static ComponentUI createSharedUI( Object key, Supplier<ComponentUI> newInstanceSupplier ) {
|
||||
if( !useSharedUIs )
|
||||
return newInstanceSupplier.get();
|
||||
|
||||
return sharedUIinstances
|
||||
.computeIfAbsent( UIManager.getLookAndFeel(), k -> new IdentityHashMap<>() )
|
||||
.computeIfAbsent( key, k -> newInstanceSupplier.get() );
|
||||
|
||||
@@ -96,6 +96,11 @@ class FlatWindowsNativeWindowBorder
|
||||
// Java 9 and later does not have this problem.
|
||||
try {
|
||||
System.loadLibrary( "jawt" );
|
||||
} catch( UnsatisfiedLinkError ex ) {
|
||||
// log error only if native library jawt.dll not already loaded
|
||||
String message = ex.getMessage();
|
||||
if( message == null || !message.contains( "already loaded in another classloader" ) )
|
||||
LoggingFacade.INSTANCE.logSevere( null, ex );
|
||||
} catch( Exception ex ) {
|
||||
LoggingFacade.INSTANCE.logSevere( null, ex );
|
||||
}
|
||||
|
||||
@@ -70,9 +70,10 @@ public class JBRCustomDecorations
|
||||
return null;
|
||||
|
||||
// check whether root pane already has a parent, which is the case when switching LaF
|
||||
Window window = SwingUtilities.windowForComponent( rootPane );
|
||||
if( window != null ) {
|
||||
FlatNativeWindowBorder.install( window );
|
||||
Container parent = rootPane.getParent();
|
||||
if( parent != null ) {
|
||||
if( parent instanceof Window )
|
||||
FlatNativeWindowBorder.install( (Window) parent );
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -110,9 +111,9 @@ public class JBRCustomDecorations
|
||||
// since it is actually not possible to uninstall JBR decorations,
|
||||
// simply reduce titleBarHeight so that it is still possible to resize window
|
||||
// and remove hitTestSpots
|
||||
Window window = SwingUtilities.windowForComponent( rootPane );
|
||||
if( window != null )
|
||||
setHasCustomDecoration( window, false );
|
||||
Container parent = rootPane.getParent();
|
||||
if( parent instanceof Window )
|
||||
setHasCustomDecoration( (Window) parent, false );
|
||||
}
|
||||
|
||||
static boolean hasCustomDecoration( Window window ) {
|
||||
|
||||
@@ -26,13 +26,16 @@ import java.awt.Color;
|
||||
public class ColorFunctions
|
||||
{
|
||||
public static Color applyFunctions( Color color, ColorFunction... functions ) {
|
||||
// convert RGB to HSL
|
||||
float[] hsl = HSLColor.fromRGB( color );
|
||||
float alpha = color.getAlpha() / 255f;
|
||||
float[] hsla = { hsl[0], hsl[1], hsl[2], alpha * 100 };
|
||||
|
||||
// apply color functions
|
||||
for( ColorFunction function : functions )
|
||||
function.apply( hsla );
|
||||
|
||||
// convert HSL to RGB
|
||||
return HSLColor.toRGB( hsla[0], hsla[1], hsla[2], hsla[3] / 100 );
|
||||
}
|
||||
|
||||
@@ -145,7 +148,46 @@ public class ColorFunctions
|
||||
}
|
||||
}
|
||||
|
||||
//---- class HSLIncreaseDecrease ------------------------------------------
|
||||
//---- class HSLChange ----------------------------------------------------
|
||||
|
||||
/**
|
||||
* Set the hue, saturation, luminance or alpha of a color.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public static class HSLChange
|
||||
implements ColorFunction
|
||||
{
|
||||
public final int hslIndex;
|
||||
public final float value;
|
||||
|
||||
public HSLChange( int hslIndex, float value ) {
|
||||
this.hslIndex = hslIndex;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply( float[] hsla ) {
|
||||
hsla[hslIndex] = (hslIndex == 0)
|
||||
? value % 360
|
||||
: clamp( value );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String name;
|
||||
switch( hslIndex ) {
|
||||
case 0: name = "changeHue"; break;
|
||||
case 1: name = "changeSaturation"; break;
|
||||
case 2: name = "changeLightness"; break;
|
||||
case 3: name = "changeAlpha"; break;
|
||||
default: throw new IllegalArgumentException();
|
||||
}
|
||||
return String.format( "%s(%.0f%s)", name, value, (hslIndex == 0 ? "" : "%") );
|
||||
}
|
||||
}
|
||||
|
||||
//---- class Fade ---------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Set the alpha of a color.
|
||||
@@ -169,4 +211,42 @@ public class ColorFunctions
|
||||
return String.format( "fade(%.0f%%)", amount );
|
||||
}
|
||||
}
|
||||
|
||||
//---- class Mix ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Mix two colors.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public static class Mix
|
||||
implements ColorFunction
|
||||
{
|
||||
public final Color color2;
|
||||
public final float weight;
|
||||
|
||||
public Mix( Color color2, float weight ) {
|
||||
this.color2 = color2;
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply( float[] hsla ) {
|
||||
// convert from HSL to RGB because color mixing is done on RGB values
|
||||
Color color1 = HSLColor.toRGB( hsla[0], hsla[1], hsla[2], hsla[3] / 100 );
|
||||
|
||||
// mix
|
||||
Color color = mix( color1, color2, weight / 100 );
|
||||
|
||||
// convert RGB to HSL
|
||||
float[] hsl = HSLColor.fromRGB( color );
|
||||
System.arraycopy( hsl, 0, hsla, 0, hsl.length );
|
||||
hsla[3] = (color.getAlpha() / 255f) * 100;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format( "mix(#%08x,%.0f%%)", color2.getRGB(), weight );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ public class SystemInfo
|
||||
public static final boolean isJava_9_orLater;
|
||||
public static final boolean isJava_11_orLater;
|
||||
public static final boolean isJava_15_orLater;
|
||||
/** @since 2 */ public static final boolean isJava_17_orLater;
|
||||
|
||||
// Java VMs
|
||||
public static final boolean isJetBrainsJVM;
|
||||
@@ -82,6 +83,7 @@ public class SystemInfo
|
||||
isJava_9_orLater = (javaVersion >= toVersion( 9, 0, 0, 0 ));
|
||||
isJava_11_orLater = (javaVersion >= toVersion( 11, 0, 0, 0 ));
|
||||
isJava_15_orLater = (javaVersion >= toVersion( 15, 0, 0, 0 ));
|
||||
isJava_17_orLater = (javaVersion >= toVersion( 17, 0, 0, 0 ));
|
||||
|
||||
// Java VMs
|
||||
isJetBrainsJVM = System.getProperty( "java.vm.vendor", "Unknown" )
|
||||
|
||||
@@ -628,6 +628,7 @@ TabbedPane.closeCrossLineWidth = {float}1
|
||||
Table.rowHeight = 20
|
||||
Table.showHorizontalLines = false
|
||||
Table.showVerticalLines = false
|
||||
Table.showTrailingVerticalLine = false
|
||||
Table.consistentHomeEndKeyBehavior = true
|
||||
Table.intercellSpacing = {dimension}0,0
|
||||
Table.scrollPaneBorder = com.formdev.flatlaf.ui.FlatBorder
|
||||
@@ -657,7 +658,7 @@ TableHeader.cellBorder = com.formdev.flatlaf.ui.FlatTableHeaderBorder
|
||||
TableHeader.cellMargins = 2,3,2,3
|
||||
TableHeader.focusCellBackground = $TableHeader.background
|
||||
TableHeader.background = @textComponentBackground
|
||||
|
||||
TableHeader.showTrailingVerticalLine = false
|
||||
|
||||
#---- TextArea ----
|
||||
|
||||
|
||||
@@ -18,6 +18,10 @@ package com.formdev.flatlaf.demo;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.time.Year;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.prefs.Preferences;
|
||||
@@ -37,6 +41,7 @@ import com.formdev.flatlaf.extras.FlatSVGUtils;
|
||||
import com.formdev.flatlaf.ui.FlatUIUtils;
|
||||
import com.formdev.flatlaf.ui.JBRCustomDecorations;
|
||||
import com.formdev.flatlaf.util.SystemInfo;
|
||||
import com.formdev.flatlaf.util.UIScale;
|
||||
import net.miginfocom.layout.ConstraintParser;
|
||||
import net.miginfocom.layout.LC;
|
||||
import net.miginfocom.layout.UnitValue;
|
||||
@@ -128,7 +133,36 @@ class DemoFrame
|
||||
}
|
||||
|
||||
private void aboutActionPerformed() {
|
||||
JOptionPane.showMessageDialog( this, "FlatLaf Demo", "About", JOptionPane.PLAIN_MESSAGE );
|
||||
JLabel titleLabel = new JLabel( "FlatLaf Demo" );
|
||||
Font titleFont = titleLabel.getFont();
|
||||
titleLabel.setFont( titleFont.deriveFont( (float) titleFont.getSize() + UIScale.scale( 6 ) ) );
|
||||
|
||||
String link = "https://www.formdev.com/flatlaf/";
|
||||
JLabel linkLabel = new JLabel( "<html><a href=\"#\">" + link + "</a></html>" );
|
||||
linkLabel.setCursor( Cursor.getPredefinedCursor( Cursor.HAND_CURSOR ) );
|
||||
linkLabel.addMouseListener( new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked( MouseEvent e ) {
|
||||
try {
|
||||
Desktop.getDesktop().browse( new URI( link ) );
|
||||
} catch( IOException | URISyntaxException ex ) {
|
||||
JOptionPane.showMessageDialog( linkLabel,
|
||||
"Failed to open '" + link + "' in browser.",
|
||||
"About", JOptionPane.PLAIN_MESSAGE );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
JOptionPane.showMessageDialog( this,
|
||||
new Object[] {
|
||||
titleLabel,
|
||||
"Demonstrates FlatLaf Swing look and feel",
|
||||
" ",
|
||||
"Copyright 2019-" + Year.now() + " FormDev Software GmbH",
|
||||
linkLabel,
|
||||
},
|
||||
"About", JOptionPane.PLAIN_MESSAGE );
|
||||
}
|
||||
|
||||
private void selectedTabChanged() {
|
||||
|
||||
@@ -169,14 +169,6 @@ public class IJThemesClassGenerator
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
"\n" +
|
||||
" /**\n" +
|
||||
" * @deprecated use {@link #setup()} instead; this method will be removed in a future version\n" +
|
||||
" */\n" +
|
||||
" @Deprecated\n" +
|
||||
" public static boolean install() {\n" +
|
||||
" return setup();\n" +
|
||||
" }\n" +
|
||||
"\n" +
|
||||
" public static void installLafInfo() {\n" +
|
||||
" installLafInfo( NAME, ${themeClass}.class );\n" +
|
||||
" }\n" +
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd" transform="translate(2 2)">
|
||||
<rect width="5.5" height="5.5" fill="#59A869"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 550 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="#6E6E6E" d="M11,3 L4,3 L4,11 L2,11 L2,1 L11,1 L11,3 Z"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 363 B After Width: | Height: | Size: 510 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<polygon fill="#59A869" fill-rule="evenodd" points="4 2 14 8 4 14"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 309 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<rect width="6" height="1" x="5" y="12" fill="#6E6E6E"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 493 B After Width: | Height: | Size: 640 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<rect width="6" height="1" x="5" y="12" fill="#6E6E6E"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 493 B After Width: | Height: | Size: 640 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<rect width="10" height="10" x="3" y="3" fill="#DB5860" fill-rule="evenodd"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 318 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
||||
<path fill="#DB5860" fill-rule="evenodd" d="M16,30 C8.2680135,30 2,23.7319865 2,16 C2,8.2680135 8.2680135,2 16,2 C23.7319865,2 30,8.2680135 30,16 C30,23.7319865 23.7319865,30 16,30 Z M14,7 L14,18 L18,18 L18,7 L14,7 Z M14,21 L14,25 L18,25 L18,21 L14,21 Z"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 497 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
||||
<path fill="#389FD6" fill-rule="evenodd" d="M16,30 C8.2680135,30 2,23.7319865 2,16 C2,8.2680135 8.2680135,2 16,2 C23.7319865,2 30,8.2680135 30,16 C30,23.7319865 23.7319865,30 16,30 Z M14,7 L14,18 L18,18 L18,7 L14,7 Z M14,21 L14,25 L18,25 L18,21 L14,21 Z" transform="rotate(180 16 16)"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 527 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
|
||||
<defs>
|
||||
<rect id="abstractclass-a" width="8" height="14"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
|
||||
<defs>
|
||||
<rect id="abstractmethod-a" width="8" height="14"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="#62B543" fill-opacity=".6" d="M15,8 C15,11.866 11.866,15 8,15 C4.134,15 1,11.866 1,8 C1,4.134 4.134,1 8,1 C11.866,1 15,4.134 15,8"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -1,10 +1,17 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<polygon fill="#9AA7B0" fill-opacity=".8" points="7 1 3 5 7 5"/>
|
||||
<polygon fill="#9AA7B0" fill-opacity=".8" points="8 1 8 6 3 6 3 8 13 8 13 1"/>
|
||||
<polygon fill="#40B6E0" fill-opacity=".7" points="1 16 16 16 16 9 1 9"/>
|
||||
<path fill="#231F20" fill-opacity=".7" d="M0,2.501 C0,1 0.931,2.02832126e-16 2.256,0 C3.20239258,0 3.55,0.311 3.969,0.753 L3.42669678,1.42712402 C3.07669678,1.06812402 2.75,1 2.25,1 C1.418,1 1,1.73791504 1,2.487 C1,3.23608496 1.412,4 2.25,4 C2.787,4 3.05169678,3.89340869 3.42669678,3.50640869 L4,4.144 C3.544,4.669 3.19732666,5 2.225,5 C0.949,5 7.35277938e-17,4.002 0,2.501 Z" transform="translate(2 10)"/>
|
||||
<path fill="#231F20" fill-opacity=".7" d="M0.972767969,1.50152588 C0.972767969,1.13305664 1.284,1 1.845,1 C1.85033333,1 2.23533333,1 3,1 L3,0 C2.26266667,0 1.88266667,0 1.86,0 C0.778,0 0,0.45916748 0,1.45 C0,2.31452637 0.419555664,2.69049072 1.47125244,2.91607666 C2.24158869,3.08131157 2.496155,3.22862939 2.496155,3.548 C2.496155,3.86737061 2.13842773,4 1.47125244,4 C1.46058577,4 1.07016829,4 0.3,4 L0.3,5 C1.07550163,5 1.46591911,5 1.47125244,5 C3.5,5 3.5,4 3.5,3.548 C3.5,2.91607666 3.02026367,2.42071533 2.15869141,2.14685059 C1.29711914,1.87298584 0.972767969,1.86999512 0.972767969,1.50152588 Z" transform="translate(7 10)"/>
|
||||
<path fill="#231F20" fill-opacity=".7" d="M0.972767969,1.50152588 C0.972767969,1.13305664 1.284,1 1.845,1 C1.85033333,1 2.23533333,1 3,1 L3,0 C2.26266667,0 1.88266667,0 1.86,0 C0.778,0 0,0.45916748 0,1.45 C0,2.31452637 0.419555664,2.69049072 1.47125244,2.91607666 C2.24158869,3.08131157 2.496155,3.22862939 2.496155,3.548 C2.496155,3.86737061 2.13842773,4 1.47125244,4 C1.46058577,4 1.07016829,4 0.3,4 L0.3,5 C1.07550163,5 1.46591911,5 1.47125244,5 C3.5,5 3.5,4 3.5,3.548 C3.5,2.91607666 3.02026367,2.42071533 2.15869141,2.14685059 C1.29711914,1.87298584 0.972767969,1.86999512 0.972767969,1.50152588 Z" transform="translate(11 10)"/>
|
||||
</g>
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="css">
|
||||
<path id="Fill 1" fill-rule="evenodd" clip-rule="evenodd" d="M7 1L3 5H7V1Z" fill="#9AA7B0" fill-opacity="0.8"/>
|
||||
<path id="Fill 3" fill-rule="evenodd" clip-rule="evenodd" d="M8 1V6H3V8H13V1H8Z" fill="#9AA7B0" fill-opacity="0.8"/>
|
||||
<path id="Fill 5" fill-rule="evenodd" clip-rule="evenodd" d="M1 16H16V9H1V16Z" fill="#F98B9E" fill-opacity="0.6"/>
|
||||
<g id="⌘/alphabet/C">
|
||||
<path id="⌘/alphabet/C_2" fill-rule="evenodd" clip-rule="evenodd" d="M2 12.501C2 11 2.931 10 4.256 10C5.20239 10 5.55 10.311 5.969 10.753L5.4267 11.4271C5.0767 11.0681 4.75 11 4.25 11C3.418 11 3 11.7379 3 12.487C3 13.2361 3.412 14 4.25 14C4.787 14 5.0517 13.8934 5.4267 13.5064L6 14.144C5.544 14.669 5.19733 15 4.225 15C2.949 15 2 14.002 2 12.501Z" fill="#231F20" fill-opacity="0.7"/>
|
||||
</g>
|
||||
<g id="⌘/alphabet/S">
|
||||
<path id="⌘/alphabet/S_2" fill-rule="evenodd" clip-rule="evenodd" d="M7.97277 11.5015C7.97277 11.1331 8.284 11 8.845 11C8.853 11 10 11 10 11V10C10 10 8.894 10 8.86 10C7.778 10 7 10.4592 7 11.45C7 12.3145 7.41956 12.6905 8.47125 12.9161C9.24159 13.0813 9.49616 13.2286 9.49616 13.548C9.49616 13.8674 9.13843 14 8.47125 14C8.45525 14 7.3 14 7.3 14V15C7.3 15 8.46325 15 8.47125 15C10.5 15 10.5 14 10.5 13.548C10.5 12.9161 10.0203 12.4207 9.15869 12.1469C8.29712 11.873 7.97277 11.87 7.97277 11.5015Z" fill="#231F20" fill-opacity="0.7"/>
|
||||
</g>
|
||||
<g id="⌘/alphabet/S_3">
|
||||
<path id="⌘/alphabet/S_4" fill-rule="evenodd" clip-rule="evenodd" d="M11.9728 11.5015C11.9728 11.1331 12.284 11 12.845 11C12.853 11 14 11 14 11V10C14 10 12.894 10 12.86 10C11.778 10 11 10.4592 11 11.45C11 12.3145 11.4196 12.6905 12.4713 12.9161C13.2416 13.0813 13.4962 13.2286 13.4962 13.548C13.4962 13.8674 13.1384 14 12.4713 14C12.4553 14 11.3 14 11.3 14V15C11.3 15 12.4633 15 12.4713 15C14.5 15 14.5 14 14.5 13.548C14.5 12.9161 14.0203 12.4207 13.1587 12.1469C12.2971 11.873 11.9728 11.87 11.9728 11.5015Z" fill="#231F20" fill-opacity="0.7"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<polygon fill="#F4AF3D" fill-opacity=".7" points="1 16 16 16 16 9 1 9"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<polygon fill="#F26522" fill-opacity=".7" points="1 16 16 16 16 9 1 9"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 498 B After Width: | Height: | Size: 645 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
||||
<path fill="#EDA200" fill-rule="evenodd" d="M16,2 L31,28 L1,28 L16,2 Z M18,25 L18,21 L14,21 L14,25 L18,25 Z M18,18 L18,10 L14,10 L14,18 L18,18 Z"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 241 B After Width: | Height: | Size: 388 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 0C8.02219 0 6.08879 0.58649 4.4443 1.6853C2.79981 2.78412 1.51809 4.3459 0.761209 6.17317C0.00433284 8.00043 -0.193701 10.0111 0.192152 11.9509C0.578004 13.8907 1.53041 15.6725 2.92894 17.0711C4.32746 18.4696 6.10929 19.422 8.0491 19.8079C9.98891 20.1937 11.9996 19.9957 13.8268 19.2388C15.6541 18.4819 17.2159 17.2002 18.3147 15.5557C19.4135 13.9112 20 11.9778 20 10C20 7.34784 18.9464 4.8043 17.0711 2.92893C15.1957 1.05357 12.6522 0 10 0ZM10 18.2C8.3782 18.2 6.79281 17.7191 5.44433 16.8181C4.09585 15.917 3.04483 14.6364 2.42419 13.138C1.80355 11.6397 1.64117 9.9909 1.95757 8.40026C2.27396 6.80961 3.05494 5.34852 4.20173 4.20172C5.34852 3.05493 6.80962 2.27396 8.40026 1.95756C9.99091 1.64116 11.6397 1.80355 13.138 2.42419C14.6364 3.04483 15.917 4.09584 16.8181 5.44432C17.7191 6.79281 18.2 8.37819 18.2 10C18.1974 12.174 17.3326 14.2581 15.7954 15.7954C14.2581 17.3326 12.174 18.1974 10 18.2ZM10.9 9.43L14.46 11.09L13.7 12.72L9.10001 10.57V4H10.9V9.43Z" fill="#9AA7B0" fill-opacity="0.8"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="#6E6E6E" fill-rule="evenodd" transform="translate(1 3)">
|
||||
<rect width="12" height="2" x="1" y="4"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 589 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="#389FD6" fill-rule="evenodd" d="M14.0431479,8.44999981 L14.3048222,13.4430431 L12.574725,11.885269 C11.4741571,13.1817306 9.83248424,14.0044386 7.99865879,14.0044386 C5.03921121,14.0044386 2.58020312,11.8617896 2.08827651,9.04314243 L3.94798986,9.10858763 C4.43427312,10.8903005 6.0642585,12.2000519 8.00015362,12.2000519 C9.30169687,12.2000519 10.4649641,11.6080237 11.2353504,10.6785714 L9.05000019,8.71167959 L14.0431479,8.44999981 Z M7.99865879,2.00443857 C10.9184669,2.00443857 13.3511517,4.09007371 13.888219,6.85284133 L12.0226275,6.7880427 C11.5024638,5.05933714 9.89836709,3.8000774 8.00015362,3.8000774 C6.69883692,3.8000774 5.53574811,4.39189956 4.76535914,5.32107268 L6.95482203,7.29304326 L1.96167436,7.55472304 L1.70000005,2.56167973 L3.42768119,4.11762166 C4.52821742,2.82461451 6.1676575,2.00443857 7.99865879,2.00443857 Z" transform="rotate(3 8.002 8.004)"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 981 B After Width: | Height: | Size: 1.1 KiB |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<polygon fill="#59A869" points="13.789 2.09 15.535 3.837 6.292 13.08 1.95 8.738 3.698 6.99 6.293 9.585"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 346 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="#6E6E6E" d="M11,3 L4,3 L4,11 L2,11 L2,1 L11,1 L11,3 Z"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 363 B After Width: | Height: | Size: 510 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="#389FD6" fill-rule="evenodd" transform="translate(1)">
|
||||
<path d="M10.9000003,4.89999992 L14.0999999,4.89999992 L9.9000001,9.09999973 L5.70000029,4.89999992 L8.90000027,4.89999992 L8.90000027,0.899999917 L10.9000003,0.899999917 L10.9000003,4.89999992 Z" transform="rotate(90 9.9 5)"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 777 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<polygon fill="#6E6E6E" points="9 7 12 7 8 11 4 7 7 7 7 2 9 2" transform="matrix(-1 0 0 1 16 0)"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 301 B After Width: | Height: | Size: 448 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<polygon fill="#F4AF3D" fill-rule="evenodd" points="7.998 11.522 3.673 14.311 4.989 9.336 1 6.084 6.138 5.798 7.998 1 9.858 5.798 14.996 6.084 11.007 9.336 12.323 14.311"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 266 B After Width: | Height: | Size: 413 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<rect width="11" height="2" x="2" y="7" fill="#6E6E6E" transform="matrix(-1 0 0 1 15 0)"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 484 B After Width: | Height: | Size: 631 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="#161514" fill-rule="evenodd" d="M7.99707713,1 C4.13339149,1 1,4.1329619 1,7.9979363 C1,11.0896581 3.00487223,13.7122732 5.78557461,14.6375989 C6.13568621,14.7020366 6.2632729,14.4859554 6.2632729,14.3003748 C6.2632729,14.1345551 6.25725871,13.6942307 6.25382203,13.1104249 C4.30737333,13.5331364 3.89669027,12.1722117 3.89669027,12.1722117 C3.57836793,11.3637332 3.11957137,11.1485112 3.11957137,11.1485112 C2.48421546,10.7146305 3.16768487,10.7232222 3.16768487,10.7232222 C3.87005601,10.7726245 4.23949893,11.4444951 4.23949893,11.4444951 C4.86368564,12.5137317 5.87750575,12.2048602 6.27616044,12.0257233 C6.33973899,11.5738001 6.52059419,11.2653582 6.72035112,11.0905172 C5.16654292,10.9139579 3.53283195,10.3133983 3.53283195,7.63193005 C3.53283195,6.86812829 3.80561829,6.24308241 4.25324565,5.75421492 C4.1810754,5.57722598 3.9409375,4.86540398 4.32197921,3.90227487 C4.32197921,3.90227487 4.90922163,3.71411673 6.24608951,4.61968148 C6.80412015,4.46417178 7.40296136,4.38684652 7.9979363,4.38383942 C8.59248165,4.38684652 9.19089327,4.46417178 9.74978309,4.61968148 C11.0857918,3.71411673 11.672175,3.90227487 11.672175,3.90227487 C12.0540759,4.86540398 11.813938,5.57722598 11.7421974,5.75421492 C12.1906839,6.24308241 12.4613223,6.86812829 12.4613223,7.63193005 C12.4613223,10.3202717 10.8250338,10.91181 9.26650019,11.0849326 C9.51737771,11.3010138 9.74119139,11.7280211 9.74119139,12.38099 C9.74119139,13.316196 9.7325997,14.0709765 9.7325997,14.3003748 C9.7325997,14.4876738 9.85889763,14.7054733 10.2137347,14.6371693 C12.9922891,13.7096957 14.995443,11.0887989 14.995443,7.9979363 C14.995443,4.1329619 11.8620515,1 7.99707713,1"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="#FFFFFE" fill-rule="evenodd" d="M7.99707713,1 C4.13339149,1 1,4.1329619 1,7.9979363 C1,11.0896581 3.00487223,13.7122732 5.78557461,14.6375989 C6.13568621,14.7020366 6.2632729,14.4859554 6.2632729,14.3003748 C6.2632729,14.1341255 6.25725871,13.6942307 6.25382203,13.1104249 C4.30737333,13.5331364 3.89669027,12.1722117 3.89669027,12.1722117 C3.57836793,11.3637332 3.11957137,11.1485112 3.11957137,11.1485112 C2.48421546,10.7146305 3.16768487,10.7232222 3.16768487,10.7232222 C3.87005601,10.7726245 4.23949893,11.4444951 4.23949893,11.4444951 C4.86368564,12.5137317 5.87750575,12.2048602 6.27616044,12.0257233 C6.33973899,11.5738001 6.52059419,11.2653582 6.72035112,11.0905172 C5.16654292,10.9139579 3.53283195,10.3133983 3.53283195,7.63193005 C3.53283195,6.86812829 3.80561829,6.24308241 4.25324565,5.75421492 C4.1810754,5.57722598 3.9409375,4.86540398 4.32197921,3.90227487 C4.32197921,3.90227487 4.90922163,3.71411673 6.24608951,4.61968148 C6.80412015,4.46417178 7.40296136,4.38684652 7.9979363,4.38383942 C8.59248165,4.38684652 9.19089327,4.46417178 9.74978309,4.61968148 C11.0857918,3.71411673 11.672175,3.90227487 11.672175,3.90227487 C12.0540759,4.86540398 11.813938,5.57722598 11.7421974,5.75421492 C12.1906839,6.24308241 12.4613223,6.86812829 12.4613223,7.63193005 C12.4613223,10.3202717 10.8250338,10.91181 9.26650019,11.0849326 C9.51737771,11.3010138 9.74119139,11.7280211 9.74119139,12.3805604 C9.74119139,13.316196 9.7325997,14.0709765 9.7325997,14.3003748 C9.7325997,14.4876738 9.85889763,14.7054733 10.2137347,14.6371693 C12.9922891,13.7096957 14.995443,11.0887989 14.995443,7.9979363 C14.995443,4.1329619 11.8620515,1 7.99707713,1"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<rect width="12" height="2" x="2" y="3" fill="#6E6E6E"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 467 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="#6E6E6E" d="M6.53206047,5.10906 C6.68535547,4.77581 6.77200047,4.40923501 6.77200047,4.01600001 C6.77200047,2.54303502 5.57896548,1.35000002 4.10600049,1.35000002 C2.63303549,1.35000002 1.4400005,2.54303502 1.4400005,4.01600001 C1.4400005,5.488965 2.63303549,6.68199999 4.10600049,6.68199999 C4.49923548,6.68199999 4.86581048,6.59535499 5.19906048,6.44205999 L6.77200047,8.01499999 L5.19906048,9.58793998 C4.86581048,9.43464498 4.49923548,9.34799998 4.10600049,9.34799998 C2.63303549,9.34799998 1.4400005,10.541035 1.4400005,12.014 C1.4400005,13.486965 2.63303549,14.6799999 4.10600049,14.6799999 C5.57896548,14.6799999 6.77200047,13.486965 6.77200047,12.014 C6.77200047,11.620765 6.68535547,11.25419 6.53206047,10.92094 L8.10500046,9.34799998 L12.7705004,14 L14.7700004,14 L14.7700004,13.347 L6.53206047,5.10906 Z M4.1053342,5.33702364 C3.37236745,5.33702364 2.77266738,4.74383861 2.77266738,4.00402356 C2.77266738,3.26420851 3.37236745,2.67102348 4.1053342,2.67102348 C4.83830096,2.67102348 5.43800103,3.26420851 5.43800103,4.00402356 C5.43800103,4.74383861 4.83830096,5.33702364 4.1053342,5.33702364 Z M4.1053342,13.3350241 C3.37236745,13.3350241 2.77266738,12.7418391 2.77266738,12.0020241 C2.77266738,11.262209 3.37236745,10.669024 4.1053342,10.669024 C4.83830096,10.669024 5.43800103,11.262209 5.43800103,12.0020241 C5.43800103,12.7418391 4.83830096,13.3350241 4.1053342,13.3350241 Z M8.10333468,8.33627383 C7.91676132,8.33627383 7.77016797,8.18964382 7.77016797,8.00302381 C7.77016797,7.8164038 7.91676132,7.66977379 8.10333468,7.66977379 C8.28990803,7.66977379 8.43650138,7.8164038 8.43650138,8.00302381 C8.43650138,8.18964382 8.28990803,8.33627383 8.10333468,8.33627383 Z M12.7710002,2.00452344 L8.77299971,6.00352368 L10.1056665,7.33652377 L14.7700004,2.67102348 L14.7700004,2.00452344 L12.7710002,2.00452344 Z"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -1,3 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="#6E6E6E" fill-rule="evenodd" d="M3,1 L3,0 L7,0 L7,1 L10,1 L10,13 L0,13 L0,1 L3,1 Z M4,1 L4,2 L6,2 L6,1 L4,1 Z M2,4 L2,11 L8,11 L8,4 L2,4 Z" transform="translate(3 1)"/>
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="menu-paste">
|
||||
<g id="paste">
|
||||
<path id="Shape" fill-rule="evenodd" clip-rule="evenodd" d="M6 2V1H10V2H13V14H3V2H6ZM7 2V3H9V2H7ZM5 5V12H11V5H5Z" fill="#6E6E6E"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 274 B After Width: | Height: | Size: 426 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="#9AA7B0" fill-opacity=".8" d="M1,1 L15,1 L15,14 L1,14 L1,1 Z M2,4 L2,13 L14,13 L14,4 L2,4 Z"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 473 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="#6E6E6E" d="M8.35170965,4.66666667 C6.5846115,4.66666667 4.98422073,5.32666667 3.75058618,6.4 L1.35000002,4 L1.35000002,10 L7.35146542,10 L4.93754267,7.58666667 C5.86443566,6.81333333 7.04472385,6.33333333 8.35170965,6.33333333 C10.712286,6.33333333 12.7194428,7.87333333 13.4196138,10 L14.9999996,9.48 C14.0731067,6.68666667 11.4524668,4.66666667 8.35170965,4.66666667 Z" transform="matrix(-1 0 0 1 16.35 0)"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 664 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="#6E6E6E" fill-rule="evenodd" d="M12.5747152,11.8852806 C11.4741474,13.1817355 9.83247882,14.0044386 7.99865879,14.0044386 C5.03907292,14.0044386 2.57997332,11.8615894 2.08820756,9.0427473 L3.94774327,9.10768372 C4.43372186,10.8898575 6.06393114,12.2000519 8.00015362,12.2000519 C9.30149237,12.2000519 10.4645985,11.6082097 11.2349873,10.6790094 L9.05000019,8.71167959 L14.0431479,8.44999981 L14.3048222,13.4430431 L12.5747152,11.8852806 Z M3.42785637,4.11741586 C4.52839138,2.82452748 6.16775464,2.00443857 7.99865879,2.00443857 C10.918604,2.00443857 13.3513802,4.09026967 13.8882946,6.8532307 L12.0226389,6.78808057 C11.5024872,5.05935553 9.89838095,3.8000774 8.00015362,3.8000774 C6.69867367,3.8000774 5.53545628,4.39204806 4.76506921,5.32142241 L6.95482203,7.29304326 L1.96167436,7.55472304 L1.70000005,2.56167973 L3.42785637,4.11741586 Z" transform="rotate(3 8.002 8.004)"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 984 B After Width: | Height: | Size: 1.1 KiB |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="#7F8B91" fill-opacity=".9" fill-rule="evenodd" d="M11.038136,9.94904865 L13.9980971,12.9090097 L12.9374369,13.9696699 L9.98176525,11.0139983 C9.14925083,11.6334368 8.11743313,12 7,12 C4.23857625,12 2,9.76142375 2,7 C2,4.23857625 4.23857625,2 7,2 C9.76142375,2 12,4.23857625 12,7 C12,8.1028408 11.642948,9.12228765 11.038136,9.94904865 Z M7,11 C9.209139,11 11,9.209139 11,7 C11,4.790861 9.209139,3 7,3 C4.790861,3 3,4.790861 3,7 C3,9.209139 4.790861,11 7,11 Z"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 714 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="#6E6E6E" d="M8,3 C4.81818182,3 2.10090909,5.07333333 1,8 C2.10090909,10.9266667 4.81818182,13 8,13 C11.1818182,13 13.8990909,10.9266667 15,8 C13.8990909,5.07333333 11.1818182,3 8,3 Z M8,11.5 C6.068,11.5 4.5,9.932 4.5,8 C4.5,6.068 6.068,4.5 8,4.5 C9.932,4.5 11.5,6.068 11.5,8 C11.5,9.932 9.932,11.5 8,11.5 Z M8,6 C6.89333333,6 6,6.89333333 6,8 C6,9.10666667 6.89333333,10 8,10 C9.10666667,10 10,9.10666667 10,8 C10,6.89333333 9.10666667,6 8,6 Z"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 699 B |
@@ -1,3 +1,4 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="#6E6E6E" d="M8.00170962,4.66666667 C6.23461148,4.66666667 4.63422071,5.32666667 3.40058616,6.4 L1,4 L1,10 L7.00146539,10 L4.58754265,7.58666667 C5.51443563,6.81333333 6.69472383,6.33333333 8.00170962,6.33333333 C10.362286,6.33333333 12.3694428,7.87333333 13.0696137,10 L14.6499996,9.48 C13.7231066,6.68666667 11.1024667,4.66666667 8.00170962,4.66666667 Z"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 610 B |
@@ -1 +1,4 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><rect id="frame" width="16" height="16" fill="none"/><path d="M11.6 8.5c1.104 0 1.992-.88 1.992-1.964 0-1.085-.888-1.965-1.992-1.965s-2 .88-2 1.965c0 1.084.896 1.964 2 1.964zm-6-.786c1.328 0 2.392-1.053 2.392-2.357C7.992 4.053 6.928 3 5.6 3 4.272 3 3.2 4.053 3.2 5.357c0 1.304 1.072 2.357 2.4 2.357zm6 2.357c-1.464 0-4.4.723-4.4 2.161V14H16v-1.768c0-1.438-2.936-2.16-4.4-2.16zm-6-.785c-1.864 0-5.6.919-5.6 2.75V14h5.6v-1.768c0-.668.264-1.838 1.896-2.726-.696-.142-1.368-.22-1.896-.22z" fill="#6E6E6E"/></svg>
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.6 8.5C12.704 8.5 13.592 7.62 13.592 6.53571C13.592 5.45143 12.704 4.57143 11.6 4.57143C10.496 4.57143 9.6 5.45143 9.6 6.53571C9.6 7.62 10.496 8.5 11.6 8.5ZM5.6 7.71429C6.928 7.71429 7.992 6.66143 7.992 5.35714C7.992 4.05286 6.928 3 5.6 3C4.272 3 3.2 4.05286 3.2 5.35714C3.2 6.66143 4.272 7.71429 5.6 7.71429ZM11.6 10.0714C10.136 10.0714 7.2 10.7943 7.2 12.2321V14H16V12.2321C16 10.7943 13.064 10.0714 11.6 10.0714ZM5.6 9.28571C3.736 9.28571 0 10.205 0 12.0357V14H5.6V12.2321C5.6 11.5643 5.864 10.3936 7.496 9.50571C6.8 9.36429 6.128 9.28571 5.6 9.28571Z" fill="#6E6E6E"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 835 B |
@@ -19,6 +19,7 @@ package com.formdev.flatlaf.extras;
|
||||
import java.awt.AlphaComposite;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.Window;
|
||||
import java.awt.image.VolatileImage;
|
||||
import java.util.Map;
|
||||
@@ -51,9 +52,9 @@ public class FlatAnimatedLafChange
|
||||
public static int duration = 160;
|
||||
|
||||
/**
|
||||
* The resolution of the animation in milliseconds. Default is 40 ms.
|
||||
* The resolution of the animation in milliseconds. Default is 30 ms.
|
||||
*/
|
||||
public static int resolution = 40;
|
||||
public static int resolution = 30;
|
||||
|
||||
private static Animator animator;
|
||||
private static final Map<JLayeredPane, JComponent> oldUIsnapshots = new WeakHashMap<>();
|
||||
@@ -158,6 +159,8 @@ public class FlatAnimatedLafChange
|
||||
if( e.getKey().isShowing() )
|
||||
e.getValue().repaint();
|
||||
}
|
||||
|
||||
Toolkit.getDefaultToolkit().sync();
|
||||
}, () -> {
|
||||
hideSnapshot();
|
||||
animator = null;
|
||||
|
||||
@@ -700,16 +700,16 @@ public class FlatUIDefaultsInspector
|
||||
if( value instanceof Color ) {
|
||||
Color color = (info instanceof Color[]) ? ((Color[])info)[0] : (Color) value;
|
||||
HSLColor hslColor = new HSLColor( color );
|
||||
int hue = Math.round( hslColor.getHue() );
|
||||
int saturation = Math.round( hslColor.getSaturation() );
|
||||
int luminance = Math.round( hslColor.getLuminance() );
|
||||
if( color.getAlpha() == 255 ) {
|
||||
return String.format( "%-9s HSL %3d %3d %3d",
|
||||
color2hex( color ),
|
||||
(int) hslColor.getHue(), (int) hslColor.getSaturation(),
|
||||
(int) hslColor.getLuminance() );
|
||||
color2hex( color ), hue, saturation, luminance );
|
||||
} else {
|
||||
int alpha = Math.round( hslColor.getAlpha() * 100 );
|
||||
return String.format( "%-9s HSL %3d %3d %3d %2d",
|
||||
color2hex( color ),
|
||||
(int) hslColor.getHue(), (int) hslColor.getSaturation(),
|
||||
(int) hslColor.getLuminance(), (int) (hslColor.getAlpha() * 100) );
|
||||
color2hex( color ), hue, saturation, luminance, alpha );
|
||||
}
|
||||
} else if( value instanceof Insets ) {
|
||||
Insets insets = (Insets) value;
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatArcDarkIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatArcDarkIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatArcDarkOrangeIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatArcDarkOrangeIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatArcIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatArcIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatArcOrangeIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatArcOrangeIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatCarbonIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatCarbonIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatCobalt2IJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatCobalt2IJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatCyanLightIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatCyanLightIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatDarkFlatIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatDarkFlatIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatDarkPurpleIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatDarkPurpleIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatDraculaIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatDraculaIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatGradiantoDarkFuchsiaIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatGradiantoDarkFuchsiaIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatGradiantoDeepOceanIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatGradiantoDeepOceanIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatGradiantoMidnightBlueIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatGradiantoMidnightBlueIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatGradiantoNatureGreenIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatGradiantoNatureGreenIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatGrayIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatGrayIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatGruvboxDarkHardIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatGruvboxDarkHardIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatGruvboxDarkMediumIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatGruvboxDarkMediumIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatGruvboxDarkSoftIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatGruvboxDarkSoftIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatHiberbeeDarkIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatHiberbeeDarkIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatHighContrastIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatHighContrastIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatLightFlatIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatLightFlatIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatMaterialDesignDarkIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatMaterialDesignDarkIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatMonocaiIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatMonocaiIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatNordIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatNordIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatOneDarkIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatOneDarkIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatSolarizedDarkIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatSolarizedDarkIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatSolarizedLightIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatSolarizedLightIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatSpacegrayIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatSpacegrayIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatVuesionIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatVuesionIJTheme.class );
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class FlatArcDarkContrastIJTheme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean install() {
|
||||
return setup();
|
||||
}
|
||||
|
||||
public static void installLafInfo() {
|
||||
installLafInfo( NAME, FlatArcDarkContrastIJTheme.class );
|
||||
}
|
||||
|
||||