mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 06:57:13 -06:00
Compare commits
93 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec8213b891 | ||
|
|
ae61383742 | ||
|
|
cc90a2ad75 | ||
|
|
28634cda56 | ||
|
|
3b71fcd690 | ||
|
|
5923ac65df | ||
|
|
faffc9393d | ||
|
|
6da220f36c | ||
|
|
21d78671d6 | ||
|
|
af5a0ec0b7 | ||
|
|
ff214455a3 | ||
|
|
3e941e3e42 | ||
|
|
2f876d553f | ||
|
|
b208017117 | ||
|
|
a1dab94a61 | ||
|
|
e55b2afd60 | ||
|
|
535c3ddf6c | ||
|
|
3008d99fcd | ||
|
|
fd37339e2f | ||
|
|
e29eca203c | ||
|
|
f1fd6dcdd2 | ||
|
|
2975ed2eae | ||
|
|
5a27d03faa | ||
|
|
8bcf9dbcaf | ||
|
|
56ebd26361 | ||
|
|
b0426b81a7 | ||
|
|
368fbcdeb0 | ||
|
|
30747b7776 | ||
|
|
4eb4ddf5d8 | ||
|
|
b1d24680b2 | ||
|
|
ef38f3805e | ||
|
|
2f5ca20ca4 | ||
|
|
f29d3d84d4 | ||
|
|
02132c5fcd | ||
|
|
7057e3c6ad | ||
|
|
a8f4c8e843 | ||
|
|
a2b6e66a13 | ||
|
|
e3b3cc2896 | ||
|
|
a5b2c50f24 | ||
|
|
5ebdf64d30 | ||
|
|
2640ab2e8b | ||
|
|
e29436da04 | ||
|
|
7b35325f9a | ||
|
|
f2ab7fafcf | ||
|
|
e3cda9905a | ||
|
|
a8423f7741 | ||
|
|
5a9e620c17 | ||
|
|
9f41ec3986 | ||
|
|
5a2c0672d4 | ||
|
|
38d853b5b2 | ||
|
|
5166d4bb0f | ||
|
|
2ffd5437a9 | ||
|
|
797830ff96 | ||
|
|
008ecabd21 | ||
|
|
2cdcde8a5e | ||
|
|
e7ec3988e2 | ||
|
|
093dd9f3ef | ||
|
|
b491202ec7 | ||
|
|
8603ca827e | ||
|
|
6b148a59da | ||
|
|
de6d45fee6 | ||
|
|
65e2071937 | ||
|
|
8a6242d9ea | ||
|
|
82294b68eb | ||
|
|
c232de1996 | ||
|
|
dc18c8178d | ||
|
|
6662714277 | ||
|
|
c404a0d1a9 | ||
|
|
990da2b412 | ||
|
|
1b974379c8 | ||
|
|
835faf9773 | ||
|
|
80deecb73e | ||
|
|
64328ab9cc | ||
|
|
eafad942e7 | ||
|
|
eb5a3168b9 | ||
|
|
ac8225d8fb | ||
|
|
6f71e4ada0 | ||
|
|
7ed90cddf8 | ||
|
|
283ba83cef | ||
|
|
468c66e842 | ||
|
|
f22862b0a4 | ||
|
|
9e731cb67a | ||
|
|
7f911b61a2 | ||
|
|
cace4a9bfd | ||
|
|
0992e97a1a | ||
|
|
eee101f279 | ||
|
|
4b9f204951 | ||
|
|
019804407b | ||
|
|
65b54ced7a | ||
|
|
a308114b2f | ||
|
|
41da023bdd | ||
|
|
19fcb6a82c | ||
|
|
221a18c119 |
103
CHANGELOG.md
103
CHANGELOG.md
@@ -1,6 +1,109 @@
|
|||||||
FlatLaf Change Log
|
FlatLaf Change Log
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
## 0.41
|
||||||
|
|
||||||
|
#### New features and improvements
|
||||||
|
|
||||||
|
- Added API to register packages or folders where FlatLaf searches for
|
||||||
|
application specific properties files with custom UI defaults (see
|
||||||
|
`FlatLaf.registerCustomDefaultsSource(...)` methods).
|
||||||
|
- Demo: Show hint popups to guide users to some features of the FlatLaf Demo
|
||||||
|
application.
|
||||||
|
- Extras: `FlatSVGIcon` now allows specifying `ClassLoader` that is used to load
|
||||||
|
SVG file. (issue #163)
|
||||||
|
- Smoother transition from old to new theme, independent of UI complexity, when
|
||||||
|
using animated theme change (see [FlatLaf Extras](flatlaf-extras)).
|
||||||
|
|
||||||
|
#### Fixed bugs
|
||||||
|
|
||||||
|
- Button: "selected" state was not shown. (issue #161)
|
||||||
|
- TextArea: Update background color property if enabled or editable state
|
||||||
|
changes in the same way as Swing does it for all other text components. (issue
|
||||||
|
#147)
|
||||||
|
- Demo: Fixed restoring last used theme on startup. (regression in 0.39)
|
||||||
|
- Custom window decorations: Fixed iconify, maximize and close icon colors if
|
||||||
|
window is inactive.
|
||||||
|
- Custom window decorations: Fixed title pane background color in IntelliJ
|
||||||
|
themes if window is inactive.
|
||||||
|
- Fixed sub-pixel text rendering in animated theme change (see
|
||||||
|
[FlatLaf Extras](flatlaf-extras)).
|
||||||
|
|
||||||
|
#### Other Changes
|
||||||
|
|
||||||
|
- Extras: Updated dependency
|
||||||
|
[svgSalamander](https://github.com/JFormDesigner/svgSalamander) to version
|
||||||
|
1.1.2.3.
|
||||||
|
|
||||||
|
|
||||||
|
## 0.40
|
||||||
|
|
||||||
|
#### New features
|
||||||
|
|
||||||
|
- Table: Detect whether component is used in cell editor and automatically
|
||||||
|
disable round border style and reduce cell editor outer border width (used for
|
||||||
|
focus indicator) to zero. (issue #148)
|
||||||
|
- ComboBox, Spinner and TextField: Support disabling round border style per
|
||||||
|
component, if globally enabled (set client property `JComponent.roundRect` to
|
||||||
|
`false`). (issue #148)
|
||||||
|
|
||||||
|
#### Fixed bugs
|
||||||
|
|
||||||
|
- Custom window decorations: Embedded menu bar did not always respond to mouse
|
||||||
|
events after adding menus and when running in JetBrains Runtime. (issue #151)
|
||||||
|
- IntelliJ Themes: Fixed NPE in Solarized themes on scroll bar hover.
|
||||||
|
|
||||||
|
|
||||||
|
## 0.39
|
||||||
|
|
||||||
|
#### New features
|
||||||
|
|
||||||
|
- Animated theme change (see [FlatLaf Extras](flatlaf-extras)). Used in Demo.
|
||||||
|
- Demo: Added combo box above themes list to show only light or dark themes.
|
||||||
|
- IntelliJ Themes:
|
||||||
|
- Added "Arc Dark", "Arc Dark - Orange", "Carbon" and "Cobalt 2" themes.
|
||||||
|
- Replaced "Solarized" themes with much better ones from 4lex4.
|
||||||
|
- Updated "Arc", "One Dark" and "Vuesion" themes.
|
||||||
|
- ScrollPane: Enable/disable smooth scrolling per component if client property
|
||||||
|
"JScrollPane.smoothScrolling" is set to a `Boolean` on `JScrollPane`.
|
||||||
|
- ScrollBar: Increased minimum thumb size on macOS and Linux from 8 to 18
|
||||||
|
pixels. On Windows, it is now 10 pixels. (issue #131)
|
||||||
|
- Button: Support specifying button border width.
|
||||||
|
- ComboBox: Changed maximum row count of popup list to 15 (was 20). Set UI value
|
||||||
|
`ComboBox.maximumRowCount` to any integer to use a different value.
|
||||||
|
|
||||||
|
#### Fixed bugs
|
||||||
|
|
||||||
|
- Custom window decorations: Fixed maximized window bounds when programmatically
|
||||||
|
maximizing window. E.g. restoring window state at startup. (issue #129)
|
||||||
|
- InternalFrame: Title pane height was too small when iconify, maximize and
|
||||||
|
close buttons are hidden. (issue #132)
|
||||||
|
- ToolTip: Do not show empty tooltip component if tooltip text is an empty
|
||||||
|
string. (issue #134)
|
||||||
|
- ToolTip: Fixed truncated text in HTML formatted tooltip on HiDPI displays.
|
||||||
|
(issue #142)
|
||||||
|
- ComboBox: Fixed width of popup, which was too small if popup is wider than
|
||||||
|
combo box and vertical scroll bar is visible. (issue #137)
|
||||||
|
- MenuItem on macOS: Removed plus characters from accelerator text and made
|
||||||
|
modifier key order conform with macOS standard. (issue #141)
|
||||||
|
- FileChooser: Fixed too small text field when renaming a file/directory in Flat
|
||||||
|
IntelliJ/Darcula themes. (issue #143)
|
||||||
|
- IntelliJ Themes: Fixed text colors in ProgressBar. (issue #138)
|
||||||
|
|
||||||
|
|
||||||
|
## 0.38
|
||||||
|
|
||||||
|
- Hide focus indicator when window is inactive.
|
||||||
|
- Custom window decorations: Improved/fixed window border color in dark themes.
|
||||||
|
- Custom window decorations: Hide window border if window is maximized.
|
||||||
|
- Custom window decorations: Center title if menu bar is embedded.
|
||||||
|
- Custom window decorations: Cursor of components (e.g. TextField) was not
|
||||||
|
changed. (issue #125)
|
||||||
|
- CheckBox: Fixed colors in light IntelliJ themes. (issue #126; regression in
|
||||||
|
0.37)
|
||||||
|
- InternalFrame: Use default icon in internal frames. (issue #122)
|
||||||
|
|
||||||
|
|
||||||
## 0.37
|
## 0.37
|
||||||
|
|
||||||
- Custom window decorations (Windows 10 only; PR #108; issues #47 and #82)
|
- Custom window decorations (Windows 10 only; PR #108; issues #47 and #82)
|
||||||
|
|||||||
18
README.md
18
README.md
@@ -11,9 +11,9 @@ scales on **HiDPI** displays and runs on Java 8 or newer.
|
|||||||
The look is heavily inspired by **Darcula** and **IntelliJ** themes from
|
The look is heavily inspired by **Darcula** and **IntelliJ** themes from
|
||||||
IntelliJ IDEA 2019.2+ and uses almost the same colors and icons.
|
IntelliJ IDEA 2019.2+ and uses almost the same colors and icons.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
IntelliJ Platform Themes
|
IntelliJ Platform Themes
|
||||||
@@ -22,9 +22,7 @@ IntelliJ Platform Themes
|
|||||||
FlatLaf can use 3rd party themes created for IntelliJ Platform (see
|
FlatLaf can use 3rd party themes created for IntelliJ Platform (see
|
||||||
[IntelliJ Themes Pack](flatlaf-intellij-themes)):
|
[IntelliJ Themes Pack](flatlaf-intellij-themes)):
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
Demo
|
Demo
|
||||||
@@ -82,6 +80,7 @@ Projects using FlatLaf
|
|||||||
- [jclasslib bytecode viewer](https://github.com/ingokegel/jclasslib) 5.5
|
- [jclasslib bytecode viewer](https://github.com/ingokegel/jclasslib) 5.5
|
||||||
- [KeyStore Explorer](https://keystore-explorer.org/) 5.4.3
|
- [KeyStore Explorer](https://keystore-explorer.org/) 5.4.3
|
||||||
- [OWASP Zed Attack Proxy (ZAP)](https://www.zaproxy.org/) (in weekly releases)
|
- [OWASP Zed Attack Proxy (ZAP)](https://www.zaproxy.org/) (in weekly releases)
|
||||||
|
-  [jAlbum](https://jalbum.net/) 21 (commercial)
|
||||||
- [XMLmind XML Editor](https://www.xmlmind.com/xmleditor/) 9.3 (commercial)
|
- [XMLmind XML Editor](https://www.xmlmind.com/xmleditor/) 9.3 (commercial)
|
||||||
- [Total Validator](https://www.totalvalidator.com/) 15 (commercial)
|
- [Total Validator](https://www.totalvalidator.com/) 15 (commercial)
|
||||||
- [j-lawyer](https://github.com/jlawyerorg/j-lawyer-org)
|
- [j-lawyer](https://github.com/jlawyerorg/j-lawyer-org)
|
||||||
@@ -98,8 +97,15 @@ Projects using FlatLaf
|
|||||||
[mendelson AS2](https://mendelson-e-c.com/as2/),
|
[mendelson AS2](https://mendelson-e-c.com/as2/),
|
||||||
[AS4](https://mendelson-e-c.com/as4/) and
|
[AS4](https://mendelson-e-c.com/as4/) and
|
||||||
[OFTP2](https://mendelson-e-c.com/oftp2) (commercial)
|
[OFTP2](https://mendelson-e-c.com/oftp2) (commercial)
|
||||||
- [MeteoInfo](https://github.com/meteoinfo/MeteoInfo) 2.1.6
|
- [MeteoInfo](https://github.com/meteoinfo/MeteoInfo) 2.2
|
||||||
- [lsfusion platform](https://github.com/lsfusion/platform)
|
- [lsfusion platform](https://github.com/lsfusion/platform)
|
||||||
|
- [Jes - Die Java-EÜR](https://www.jes-eur.de)
|
||||||
|
- [Mapton](https://mapton.org/) 2.0
|
||||||
|
([source code](https://github.com/trixon/mapton)) based on NetBeans platform
|
||||||
|
- [Pseudo Assembler IDE](https://github.com/tomasz-herman/PseudoAssemblerIDE)
|
||||||
|
- [Sound Analysis](https://github.com/tomasz-herman/SoundAnalysis)
|
||||||
|
- [RemoteLight](https://github.com/Drumber/RemoteLight) - Multifunctional LED
|
||||||
|
Control Software
|
||||||
- and more...
|
- and more...
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
val releaseVersion = "0.37"
|
val releaseVersion = "0.41"
|
||||||
val developmentVersion = "0.38-SNAPSHOT"
|
val developmentVersion = "0.42-SNAPSHOT"
|
||||||
|
|
||||||
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion
|
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion
|
||||||
|
|
||||||
|
|||||||
@@ -200,6 +200,14 @@ public interface FlatClientProperties
|
|||||||
*/
|
*/
|
||||||
String SCROLL_BAR_SHOW_BUTTONS = "JScrollBar.showButtons";
|
String SCROLL_BAR_SHOW_BUTTONS = "JScrollBar.showButtons";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies whether the scroll pane uses smooth scrolling.
|
||||||
|
* <p>
|
||||||
|
* <strong>Component</strong> {{@link javax.swing.JScrollPane}<br>
|
||||||
|
* <strong>Value type</strong> {@link java.lang.Boolean}
|
||||||
|
*/
|
||||||
|
String SCROLL_PANE_SMOOTH_SCROLLING = "JScrollPane.smoothScrolling";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies whether separators are shown between tabs.
|
* Specifies whether separators are shown between tabs.
|
||||||
* <p>
|
* <p>
|
||||||
@@ -306,6 +314,15 @@ public interface FlatClientProperties
|
|||||||
return (value instanceof Boolean) ? (boolean) value : defaultValue;
|
return (value instanceof Boolean) ? (boolean) value : defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether a client property of a component is a {@link Boolean} and returns its value.
|
||||||
|
* If the client property is not set, or not a {@link Boolean}, defaultValue is returned.
|
||||||
|
*/
|
||||||
|
static Boolean clientPropertyBooleanStrict( JComponent c, String key, Boolean defaultValue ) {
|
||||||
|
Object value = c.getClientProperty( key );
|
||||||
|
return (value instanceof Boolean) ? (Boolean) value : defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether a client property of a component is an integer and returns its value.
|
* Checks whether a client property of a component is an integer and returns its value.
|
||||||
* If the client property is not set, or not an integer, defaultValue is returned.
|
* If the client property is not set, or not an integer, defaultValue is returned.
|
||||||
|
|||||||
@@ -22,9 +22,11 @@ import javax.swing.KeyStroke;
|
|||||||
import javax.swing.LookAndFeel;
|
import javax.swing.LookAndFeel;
|
||||||
import javax.swing.UIDefaults;
|
import javax.swing.UIDefaults;
|
||||||
import javax.swing.UIDefaults.LazyValue;
|
import javax.swing.UIDefaults.LazyValue;
|
||||||
|
import javax.swing.UIManager;
|
||||||
import javax.swing.plaf.InputMapUIResource;
|
import javax.swing.plaf.InputMapUIResource;
|
||||||
import com.formdev.flatlaf.util.SystemInfo;
|
import com.formdev.flatlaf.util.SystemInfo;
|
||||||
import static javax.swing.text.DefaultEditorKit.*;
|
import static javax.swing.text.DefaultEditorKit.*;
|
||||||
|
import java.util.function.BooleanSupplier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
@@ -35,7 +37,7 @@ class FlatInputMaps
|
|||||||
initBasicInputMaps( defaults );
|
initBasicInputMaps( defaults );
|
||||||
initTextComponentInputMaps( defaults );
|
initTextComponentInputMaps( defaults );
|
||||||
|
|
||||||
if( SystemInfo.IS_MAC )
|
if( SystemInfo.isMacOS )
|
||||||
initMacInputMaps( defaults );
|
initMacInputMaps( defaults );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +61,7 @@ class FlatInputMaps
|
|||||||
mac( "alt KP_DOWN", null ), "togglePopup"
|
mac( "alt KP_DOWN", null ), "togglePopup"
|
||||||
);
|
);
|
||||||
|
|
||||||
if( !SystemInfo.IS_MAC ) {
|
if( !SystemInfo.isMacOS ) {
|
||||||
modifyInputMap( defaults, "FileChooser.ancestorInputMap",
|
modifyInputMap( defaults, "FileChooser.ancestorInputMap",
|
||||||
"F2", "editFileName",
|
"F2", "editFileName",
|
||||||
"BACK_SPACE", "Go Up"
|
"BACK_SPACE", "Go Up"
|
||||||
@@ -81,8 +83,11 @@ class FlatInputMaps
|
|||||||
"shift ctrl TAB", "navigatePrevious"
|
"shift ctrl TAB", "navigatePrevious"
|
||||||
);
|
);
|
||||||
|
|
||||||
modifyInputMap( defaults, "Table.ancestorInputMap",
|
// swap Home/End with Ctrl+Home/End to make it consistent with List and Tree
|
||||||
// swap to make it consistent with List and Tree
|
modifyInputMap( () -> {
|
||||||
|
return UIManager.getBoolean( "Table.consistentHomeEndKeyBehavior" );
|
||||||
|
},
|
||||||
|
defaults, "Table.ancestorInputMap",
|
||||||
"HOME", "selectFirstRow",
|
"HOME", "selectFirstRow",
|
||||||
"END", "selectLastRow",
|
"END", "selectLastRow",
|
||||||
"shift HOME", "selectFirstRowExtendSelection",
|
"shift HOME", "selectFirstRowExtendSelection",
|
||||||
@@ -93,7 +98,7 @@ class FlatInputMaps
|
|||||||
mac( "shift ctrl END", null ), "selectLastColumnExtendSelection"
|
mac( "shift ctrl END", null ), "selectLastColumnExtendSelection"
|
||||||
);
|
);
|
||||||
|
|
||||||
if( !SystemInfo.IS_MAC ) {
|
if( !SystemInfo.isMacOS ) {
|
||||||
modifyInputMap( defaults, "Tree.focusInputMap",
|
modifyInputMap( defaults, "Tree.focusInputMap",
|
||||||
"ADD", "expand",
|
"ADD", "expand",
|
||||||
"SUBTRACT", "collapse"
|
"SUBTRACT", "collapse"
|
||||||
@@ -164,7 +169,7 @@ class FlatInputMaps
|
|||||||
"control shift O", "toggle-componentOrientation", // DefaultEditorKit.toggleComponentOrientation
|
"control shift O", "toggle-componentOrientation", // DefaultEditorKit.toggleComponentOrientation
|
||||||
};
|
};
|
||||||
|
|
||||||
Object[] macCommonTextComponentBindings = SystemInfo.IS_MAC ? new Object[] {
|
Object[] macCommonTextComponentBindings = SystemInfo.isMacOS ? new Object[] {
|
||||||
// move caret one character (without selecting text)
|
// move caret one character (without selecting text)
|
||||||
"ctrl B", backwardAction,
|
"ctrl B", backwardAction,
|
||||||
"ctrl F", forwardAction,
|
"ctrl F", forwardAction,
|
||||||
@@ -211,7 +216,7 @@ class FlatInputMaps
|
|||||||
"ENTER", JTextField.notifyAction,
|
"ENTER", JTextField.notifyAction,
|
||||||
};
|
};
|
||||||
|
|
||||||
Object[] macSingleLineTextComponentBindings = SystemInfo.IS_MAC ? new Object[] {
|
Object[] macSingleLineTextComponentBindings = SystemInfo.isMacOS ? new Object[] {
|
||||||
// move caret to line begin/end (without selecting text)
|
// move caret to line begin/end (without selecting text)
|
||||||
"UP", beginLineAction,
|
"UP", beginLineAction,
|
||||||
"DOWN", endLineAction,
|
"DOWN", endLineAction,
|
||||||
@@ -289,7 +294,7 @@ class FlatInputMaps
|
|||||||
mac( "ctrl SPACE", "meta SPACE" ), "activate-link-action",
|
mac( "ctrl SPACE", "meta SPACE" ), "activate-link-action",
|
||||||
};
|
};
|
||||||
|
|
||||||
Object[] macMultiLineTextComponentBindings = SystemInfo.IS_MAC ? new Object[] {
|
Object[] macMultiLineTextComponentBindings = SystemInfo.isMacOS ? new Object[] {
|
||||||
// move caret one line (without selecting text)
|
// move caret one line (without selecting text)
|
||||||
"ctrl N", downAction,
|
"ctrl N", downAction,
|
||||||
"ctrl P", upAction,
|
"ctrl P", upAction,
|
||||||
@@ -574,12 +579,16 @@ class FlatInputMaps
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void modifyInputMap( UIDefaults defaults, String key, Object... bindings ) {
|
private static void modifyInputMap( UIDefaults defaults, String key, Object... bindings ) {
|
||||||
// Note: not using `defaults.get(key)` here because this would resolve the lazy value
|
modifyInputMap( null, defaults, key, bindings );
|
||||||
defaults.put( key, new LazyModifyInputMap( defaults.remove( key ), bindings ) );
|
}
|
||||||
|
|
||||||
|
private static void modifyInputMap( BooleanSupplier condition, UIDefaults defaults, String key, Object... bindings ) {
|
||||||
|
// Note: not using `defaults.get(key)` here because this would resolve a lazy value
|
||||||
|
defaults.put( key, new LazyModifyInputMap( condition, defaults.remove( key ), bindings ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
private static <T> T mac( T value, T macValue ) {
|
private static <T> T mac( T value, T macValue ) {
|
||||||
return SystemInfo.IS_MAC ? macValue : value;
|
return SystemInfo.isMacOS ? macValue : value;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---- class LazyInputMapEx -----------------------------------------------
|
//---- class LazyInputMapEx -----------------------------------------------
|
||||||
@@ -614,10 +623,12 @@ class FlatInputMaps
|
|||||||
private static class LazyModifyInputMap
|
private static class LazyModifyInputMap
|
||||||
implements LazyValue
|
implements LazyValue
|
||||||
{
|
{
|
||||||
|
private final BooleanSupplier condition;
|
||||||
private final Object baseInputMap;
|
private final Object baseInputMap;
|
||||||
private final Object[] bindings;
|
private final Object[] bindings;
|
||||||
|
|
||||||
LazyModifyInputMap( Object baseInputMap, Object[] bindings ) {
|
LazyModifyInputMap( BooleanSupplier condition, Object baseInputMap, Object[] bindings ) {
|
||||||
|
this.condition = condition;
|
||||||
this.baseInputMap = baseInputMap;
|
this.baseInputMap = baseInputMap;
|
||||||
this.bindings = bindings;
|
this.bindings = bindings;
|
||||||
}
|
}
|
||||||
@@ -629,6 +640,9 @@ class FlatInputMaps
|
|||||||
? (InputMap) ((LazyValue)baseInputMap).createValue( table )
|
? (InputMap) ((LazyValue)baseInputMap).createValue( table )
|
||||||
: (InputMap) baseInputMap;
|
: (InputMap) baseInputMap;
|
||||||
|
|
||||||
|
if( condition != null && !condition.getAsBoolean() )
|
||||||
|
return inputMap;
|
||||||
|
|
||||||
// modify input map (replace or remove)
|
// modify input map (replace or remove)
|
||||||
for( int i = 0; i < bindings.length; i += 2 ) {
|
for( int i = 0; i < bindings.length; i += 2 ) {
|
||||||
KeyStroke keyStroke = KeyStroke.getKeyStroke( (String) bindings[i] );
|
KeyStroke keyStroke = KeyStroke.getKeyStroke( (String) bindings[i] );
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import java.awt.image.ImageFilter;
|
|||||||
import java.awt.image.ImageProducer;
|
import java.awt.image.ImageProducer;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
|
import java.io.File;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -76,6 +77,8 @@ public abstract class FlatLaf
|
|||||||
static final Logger LOG = Logger.getLogger( FlatLaf.class.getName() );
|
static final Logger LOG = Logger.getLogger( FlatLaf.class.getName() );
|
||||||
private static final String DESKTOPFONTHINTS = "awt.font.desktophints";
|
private static final String DESKTOPFONTHINTS = "awt.font.desktophints";
|
||||||
|
|
||||||
|
private static List<Object> customDefaultsSources;
|
||||||
|
|
||||||
private String desktopPropertyName;
|
private String desktopPropertyName;
|
||||||
private String desktopPropertyName2;
|
private String desktopPropertyName2;
|
||||||
private PropertyChangeListener desktopPropertyListener;
|
private PropertyChangeListener desktopPropertyListener;
|
||||||
@@ -147,12 +150,12 @@ public abstract class FlatLaf
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean getSupportsWindowDecorations() {
|
public boolean getSupportsWindowDecorations() {
|
||||||
if( SystemInfo.IS_JETBRAINS_JVM_11_OR_LATER &&
|
if( SystemInfo.isJetBrainsJVM_11_orLater &&
|
||||||
SystemInfo.IS_WINDOWS_10_OR_LATER &&
|
SystemInfo.isWindows_10_orLater &&
|
||||||
JBRCustomDecorations.isSupported() )
|
JBRCustomDecorations.isSupported() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return SystemInfo.IS_WINDOWS_10_OR_LATER;
|
return SystemInfo.isWindows_10_orLater;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -187,7 +190,7 @@ public abstract class FlatLaf
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
if( SystemInfo.IS_MAC )
|
if( SystemInfo.isMacOS )
|
||||||
initializeAqua();
|
initializeAqua();
|
||||||
|
|
||||||
super.initialize();
|
super.initialize();
|
||||||
@@ -201,11 +204,11 @@ public abstract class FlatLaf
|
|||||||
mnemonicHandler.install();
|
mnemonicHandler.install();
|
||||||
|
|
||||||
// listen to desktop property changes to update UI if system font or scaling changes
|
// listen to desktop property changes to update UI if system font or scaling changes
|
||||||
if( SystemInfo.IS_WINDOWS ) {
|
if( SystemInfo.isWindows ) {
|
||||||
// Windows 10 allows increasing font size independent of scaling:
|
// Windows 10 allows increasing font size independent of scaling:
|
||||||
// Settings > Ease of Access > Display > Make text bigger (100% - 225%)
|
// Settings > Ease of Access > Display > Make text bigger (100% - 225%)
|
||||||
desktopPropertyName = "win.messagebox.font";
|
desktopPropertyName = "win.messagebox.font";
|
||||||
} else if( SystemInfo.IS_LINUX ) {
|
} else if( SystemInfo.isLinux ) {
|
||||||
// Linux/Gnome allows changing font in "Tweaks" app
|
// Linux/Gnome allows changing font in "Tweaks" app
|
||||||
desktopPropertyName = "gnome.Gtk/FontName";
|
desktopPropertyName = "gnome.Gtk/FontName";
|
||||||
|
|
||||||
@@ -315,7 +318,7 @@ public abstract class FlatLaf
|
|||||||
String aquaLafClassName = "com.apple.laf.AquaLookAndFeel";
|
String aquaLafClassName = "com.apple.laf.AquaLookAndFeel";
|
||||||
BasicLookAndFeel aquaLaf;
|
BasicLookAndFeel aquaLaf;
|
||||||
try {
|
try {
|
||||||
if( SystemInfo.IS_JAVA_9_OR_LATER ) {
|
if( SystemInfo.isJava_9_orLater ) {
|
||||||
Method m = UIManager.class.getMethod( "createLookAndFeel", String.class );
|
Method m = UIManager.class.getMethod( "createLookAndFeel", String.class );
|
||||||
aquaLaf = (BasicLookAndFeel) m.invoke( null, "Mac OS X" );
|
aquaLaf = (BasicLookAndFeel) m.invoke( null, "Mac OS X" );
|
||||||
} else
|
} else
|
||||||
@@ -391,7 +394,7 @@ public abstract class FlatLaf
|
|||||||
UIDefaultsLoader.loadDefaultsFromProperties( getClass(), addons, getAdditionalDefaults(), isDark(), defaults );
|
UIDefaultsLoader.loadDefaultsFromProperties( getClass(), addons, getAdditionalDefaults(), isDark(), defaults );
|
||||||
|
|
||||||
// use Aqua MenuBarUI if Mac screen menubar is enabled
|
// use Aqua MenuBarUI if Mac screen menubar is enabled
|
||||||
if( SystemInfo.IS_MAC && Boolean.getBoolean( "apple.laf.useScreenMenuBar" ) ) {
|
if( SystemInfo.isMacOS && Boolean.getBoolean( "apple.laf.useScreenMenuBar" ) ) {
|
||||||
defaults.put( "MenuBarUI", "com.apple.laf.AquaMenuBarUI" );
|
defaults.put( "MenuBarUI", "com.apple.laf.AquaMenuBarUI" );
|
||||||
|
|
||||||
// add defaults necessary for AquaMenuBarUI
|
// add defaults necessary for AquaMenuBarUI
|
||||||
@@ -435,17 +438,17 @@ public abstract class FlatLaf
|
|||||||
private void initFonts( UIDefaults defaults ) {
|
private void initFonts( UIDefaults defaults ) {
|
||||||
FontUIResource uiFont = null;
|
FontUIResource uiFont = null;
|
||||||
|
|
||||||
if( SystemInfo.IS_WINDOWS ) {
|
if( SystemInfo.isWindows ) {
|
||||||
Font winFont = (Font) Toolkit.getDefaultToolkit().getDesktopProperty( "win.messagebox.font" );
|
Font winFont = (Font) Toolkit.getDefaultToolkit().getDesktopProperty( "win.messagebox.font" );
|
||||||
if( winFont != null )
|
if( winFont != null )
|
||||||
uiFont = createCompositeFont( winFont.getFamily(), winFont.getStyle(), winFont.getSize() );
|
uiFont = createCompositeFont( winFont.getFamily(), winFont.getStyle(), winFont.getSize() );
|
||||||
|
|
||||||
} else if( SystemInfo.IS_MAC ) {
|
} else if( SystemInfo.isMacOS ) {
|
||||||
String fontName;
|
String fontName;
|
||||||
if( SystemInfo.IS_MAC_OS_10_15_CATALINA_OR_LATER ) {
|
if( SystemInfo.isMacOS_10_15_Catalina_orLater ) {
|
||||||
// use Helvetica Neue font
|
// use Helvetica Neue font
|
||||||
fontName = "Helvetica Neue";
|
fontName = "Helvetica Neue";
|
||||||
} else if( SystemInfo.IS_MAC_OS_10_11_EL_CAPITAN_OR_LATER ) {
|
} else if( SystemInfo.isMacOS_10_11_ElCapitan_orLater ) {
|
||||||
// use San Francisco Text font
|
// use San Francisco Text font
|
||||||
fontName = ".SF NS Text";
|
fontName = ".SF NS Text";
|
||||||
} else {
|
} else {
|
||||||
@@ -455,7 +458,7 @@ public abstract class FlatLaf
|
|||||||
|
|
||||||
uiFont = createCompositeFont( fontName, Font.PLAIN, 13 );
|
uiFont = createCompositeFont( fontName, Font.PLAIN, 13 );
|
||||||
|
|
||||||
} else if( SystemInfo.IS_LINUX ) {
|
} else if( SystemInfo.isLinux ) {
|
||||||
Font font = LinuxFontPolicy.getFont();
|
Font font = LinuxFontPolicy.getFont();
|
||||||
uiFont = (font instanceof FontUIResource) ? (FontUIResource) font : new FontUIResource( font );
|
uiFont = (font instanceof FontUIResource) ? (FontUIResource) font : new FontUIResource( font );
|
||||||
}
|
}
|
||||||
@@ -515,7 +518,7 @@ public abstract class FlatLaf
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void putAATextInfo( UIDefaults defaults ) {
|
private void putAATextInfo( UIDefaults defaults ) {
|
||||||
if( SystemInfo.IS_JAVA_9_OR_LATER ) {
|
if( SystemInfo.isJava_9_orLater ) {
|
||||||
Object desktopHints = Toolkit.getDefaultToolkit().getDesktopProperty( DESKTOPFONTHINTS );
|
Object desktopHints = Toolkit.getDefaultToolkit().getDesktopProperty( DESKTOPFONTHINTS );
|
||||||
if( desktopHints instanceof Map ) {
|
if( desktopHints instanceof Map ) {
|
||||||
@SuppressWarnings( "unchecked" )
|
@SuppressWarnings( "unchecked" )
|
||||||
@@ -552,6 +555,87 @@ public abstract class FlatLaf
|
|||||||
defaults.put( key, value );
|
defaults.put( key, value );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static List<Object> getCustomDefaultsSources() {
|
||||||
|
return customDefaultsSources;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers a package where FlatLaf searches for properties files with custom UI defaults.
|
||||||
|
* <p>
|
||||||
|
* This can be used to specify application specific UI defaults that override UI values
|
||||||
|
* of existing themes or to define own UI values used in custom controls.
|
||||||
|
* <p>
|
||||||
|
* There may be multiple properties files in that package for multiple themes.
|
||||||
|
* The properties file name must match the used theme class names.
|
||||||
|
* E.g. {@code FlatLightLaf.properties} for class {@link FlatLightLaf}
|
||||||
|
* or {@code FlatDarkLaf.properties} for class {@link FlatDarkLaf}.
|
||||||
|
* {@code FlatLaf.properties} is loaded first for all themes.
|
||||||
|
* <p>
|
||||||
|
* These properties files are loaded after theme and addon properties files
|
||||||
|
* and can therefore override all UI defaults.
|
||||||
|
* <p>
|
||||||
|
* Invoke this method before setting the look and feel.
|
||||||
|
*
|
||||||
|
* @param packageName a package name (e.g. "com.myapp.resources")
|
||||||
|
*/
|
||||||
|
public static void registerCustomDefaultsSource( String packageName ) {
|
||||||
|
registerCustomDefaultsSource( packageName, null );
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void unregisterCustomDefaultsSource( String packageName ) {
|
||||||
|
unregisterCustomDefaultsSource( packageName, null );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers a package where FlatLaf searches for properties files with custom UI defaults.
|
||||||
|
* <p>
|
||||||
|
* See {@link #registerCustomDefaultsSource(String)} for details.
|
||||||
|
*
|
||||||
|
* @param packageName a package name (e.g. "com.myapp.resources")
|
||||||
|
* @param classLoader a class loader used to find resources, or {@code null}
|
||||||
|
*/
|
||||||
|
public static void registerCustomDefaultsSource( String packageName, ClassLoader classLoader ) {
|
||||||
|
if( customDefaultsSources == null )
|
||||||
|
customDefaultsSources = new ArrayList<>();
|
||||||
|
customDefaultsSources.add( packageName );
|
||||||
|
customDefaultsSources.add( classLoader );
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void unregisterCustomDefaultsSource( String packageName, ClassLoader classLoader ) {
|
||||||
|
if( customDefaultsSources == null )
|
||||||
|
return;
|
||||||
|
|
||||||
|
int size = customDefaultsSources.size();
|
||||||
|
for( int i = 0; i < size - 1; i++ ) {
|
||||||
|
Object source = customDefaultsSources.get( i );
|
||||||
|
if( packageName.equals( source ) && customDefaultsSources.get( i + 1 ) == classLoader ) {
|
||||||
|
customDefaultsSources.remove( i + 1 );
|
||||||
|
customDefaultsSources.remove( i );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers a folder where FlatLaf searches for properties files with custom UI defaults.
|
||||||
|
* <p>
|
||||||
|
* See {@link #registerCustomDefaultsSource(String)} for details.
|
||||||
|
*
|
||||||
|
* @param folder a folder
|
||||||
|
*/
|
||||||
|
public static void registerCustomDefaultsSource( File folder ) {
|
||||||
|
if( customDefaultsSources == null )
|
||||||
|
customDefaultsSources = new ArrayList<>();
|
||||||
|
customDefaultsSources.add( folder );
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void unregisterCustomDefaultsSource( File folder ) {
|
||||||
|
if( customDefaultsSources == null )
|
||||||
|
return;
|
||||||
|
|
||||||
|
customDefaultsSources.remove( folder );
|
||||||
|
}
|
||||||
|
|
||||||
private static void reSetLookAndFeel() {
|
private static void reSetLookAndFeel() {
|
||||||
EventQueue.invokeLater( () -> {
|
EventQueue.invokeLater( () -> {
|
||||||
LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
|
LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
|
||||||
|
|||||||
@@ -39,6 +39,14 @@ public interface FlatSystemProperties
|
|||||||
*/
|
*/
|
||||||
String UI_SCALE = "flatlaf.uiScale";
|
String UI_SCALE = "flatlaf.uiScale";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies whether user scaling mode is enabled.
|
||||||
|
* <p>
|
||||||
|
* <strong>Allowed Values</strong> {@code false} and {@code true}<br>
|
||||||
|
* <strong>Default</strong> {@code true}
|
||||||
|
*/
|
||||||
|
String UI_SCALE_ENABLED = "flatlaf.uiScale.enabled";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies whether Ubuntu font should be used on Ubuntu Linux.
|
* Specifies whether Ubuntu font should be used on Ubuntu Linux.
|
||||||
* By default, if not running in a JetBrains Runtime, the Liberation Sans font
|
* By default, if not running in a JetBrains Runtime, the Liberation Sans font
|
||||||
|
|||||||
@@ -147,6 +147,10 @@ public class IntelliJTheme
|
|||||||
applyColorPalette( defaults );
|
applyColorPalette( defaults );
|
||||||
applyCheckBoxColors( defaults );
|
applyCheckBoxColors( defaults );
|
||||||
|
|
||||||
|
// copy values
|
||||||
|
for( Map.Entry<String, String> e : uiKeyCopying.entrySet() )
|
||||||
|
defaults.put( e.getKey(), defaults.get( e.getValue() ) );
|
||||||
|
|
||||||
// IDEA does not paint button background if disabled, but FlatLaf does
|
// IDEA does not paint button background if disabled, but FlatLaf does
|
||||||
Object panelBackground = defaults.get( "Panel.background" );
|
Object panelBackground = defaults.get( "Panel.background" );
|
||||||
defaults.put( "Button.disabledBackground", panelBackground );
|
defaults.put( "Button.disabledBackground", panelBackground );
|
||||||
@@ -259,6 +263,9 @@ public class IntelliJTheme
|
|||||||
for( Map.Entry<String, Object> e : ((Map<String, Object>)value).entrySet() )
|
for( Map.Entry<String, Object> e : ((Map<String, Object>)value).entrySet() )
|
||||||
apply( key + '.' + e.getKey(), e.getValue(), defaults, defaultsKeysCache, uiKeys );
|
apply( key + '.' + e.getKey(), e.getValue(), defaults, defaultsKeysCache, uiKeys );
|
||||||
} else {
|
} else {
|
||||||
|
if( "".equals( value ) )
|
||||||
|
return; // ignore empty value
|
||||||
|
|
||||||
uiKeys.add( key );
|
uiKeys.add( key );
|
||||||
|
|
||||||
// fix ComboBox size and Spinner border in all Material UI Lite themes
|
// fix ComboBox size and Spinner border in all Material UI Lite themes
|
||||||
@@ -412,6 +419,10 @@ public class IntelliJTheme
|
|||||||
|
|
||||||
String newKey = checkboxKeyMapping.get( key );
|
String newKey = checkboxKeyMapping.get( key );
|
||||||
if( newKey != null ) {
|
if( newKey != null ) {
|
||||||
|
String checkBoxIconPrefix = "CheckBox.icon.";
|
||||||
|
if( !dark && newKey.startsWith( checkBoxIconPrefix ) )
|
||||||
|
newKey = "CheckBox.icon[filled].".concat( newKey.substring( checkBoxIconPrefix.length() ) );
|
||||||
|
|
||||||
ColorUIResource color = toColor( (String) value );
|
ColorUIResource color = toColor( (String) value );
|
||||||
if( color != null ) {
|
if( color != null ) {
|
||||||
defaults.put( newKey, color );
|
defaults.put( newKey, color );
|
||||||
@@ -444,17 +455,24 @@ public class IntelliJTheme
|
|||||||
|
|
||||||
// remove hover and pressed colors
|
// remove hover and pressed colors
|
||||||
if( checkboxModified ) {
|
if( checkboxModified ) {
|
||||||
|
defaults.remove( "CheckBox.icon.focusWidth" );
|
||||||
defaults.remove( "CheckBox.icon.hoverBorderColor" );
|
defaults.remove( "CheckBox.icon.hoverBorderColor" );
|
||||||
defaults.remove( "CheckBox.icon.focusedBackground" );
|
defaults.remove( "CheckBox.icon.focusedBackground" );
|
||||||
defaults.remove( "CheckBox.icon.hoverBackground" );
|
defaults.remove( "CheckBox.icon.hoverBackground" );
|
||||||
defaults.remove( "CheckBox.icon.pressedBackground" );
|
defaults.remove( "CheckBox.icon.pressedBackground" );
|
||||||
|
defaults.remove( "CheckBox.icon.selectedFocusedBackground" );
|
||||||
defaults.remove( "CheckBox.icon.selectedHoverBackground" );
|
defaults.remove( "CheckBox.icon.selectedHoverBackground" );
|
||||||
defaults.remove( "CheckBox.icon.selectedPressedBackground" );
|
defaults.remove( "CheckBox.icon.selectedPressedBackground" );
|
||||||
}
|
|
||||||
|
|
||||||
// copy values
|
defaults.remove( "CheckBox.icon[filled].focusWidth" );
|
||||||
for( Map.Entry<String, String> e : uiKeyCopying.entrySet() )
|
defaults.remove( "CheckBox.icon[filled].hoverBorderColor" );
|
||||||
defaults.put( e.getKey(), defaults.get( e.getValue() ) );
|
defaults.remove( "CheckBox.icon[filled].focusedBackground" );
|
||||||
|
defaults.remove( "CheckBox.icon[filled].hoverBackground" );
|
||||||
|
defaults.remove( "CheckBox.icon[filled].pressedBackground" );
|
||||||
|
defaults.remove( "CheckBox.icon[filled].selectedFocusedBackground" );
|
||||||
|
defaults.remove( "CheckBox.icon[filled].selectedHoverBackground" );
|
||||||
|
defaults.remove( "CheckBox.icon[filled].selectedPressedBackground" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Map<String, String> uiKeyMapping = new HashMap<>();
|
private static Map<String, String> uiKeyMapping = new HashMap<>();
|
||||||
@@ -499,6 +517,8 @@ public class IntelliJTheme
|
|||||||
uiKeyMapping.put( "ProgressBar.foreground", "" ); // ignore
|
uiKeyMapping.put( "ProgressBar.foreground", "" ); // ignore
|
||||||
uiKeyMapping.put( "ProgressBar.trackColor", "ProgressBar.background" );
|
uiKeyMapping.put( "ProgressBar.trackColor", "ProgressBar.background" );
|
||||||
uiKeyMapping.put( "ProgressBar.progressColor", "ProgressBar.foreground" );
|
uiKeyMapping.put( "ProgressBar.progressColor", "ProgressBar.foreground" );
|
||||||
|
uiKeyCopying.put( "ProgressBar.selectionForeground", "ProgressBar.background" );
|
||||||
|
uiKeyCopying.put( "ProgressBar.selectionBackground", "ProgressBar.foreground" );
|
||||||
|
|
||||||
// ScrollBar
|
// ScrollBar
|
||||||
uiKeyMapping.put( "ScrollBar.trackColor", "ScrollBar.track" );
|
uiKeyMapping.put( "ScrollBar.trackColor", "ScrollBar.track" );
|
||||||
@@ -511,6 +531,7 @@ public class IntelliJTheme
|
|||||||
uiKeyMapping.put( "Slider.trackWidth", "" ); // ignore (used in Material Theme UI Lite)
|
uiKeyMapping.put( "Slider.trackWidth", "" ); // ignore (used in Material Theme UI Lite)
|
||||||
|
|
||||||
// TitlePane
|
// TitlePane
|
||||||
|
uiKeyCopying.put( "TitlePane.inactiveBackground", "TitlePane.background" );
|
||||||
uiKeyMapping.put( "TitlePane.infoForeground", "TitlePane.foreground" );
|
uiKeyMapping.put( "TitlePane.infoForeground", "TitlePane.foreground" );
|
||||||
uiKeyMapping.put( "TitlePane.inactiveInfoForeground", "TitlePane.inactiveForeground" );
|
uiKeyMapping.put( "TitlePane.inactiveInfoForeground", "TitlePane.inactiveForeground" );
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import com.formdev.flatlaf.util.UIScale;
|
|||||||
class LinuxFontPolicy
|
class LinuxFontPolicy
|
||||||
{
|
{
|
||||||
static Font getFont() {
|
static Font getFont() {
|
||||||
return SystemInfo.IS_KDE ? getKDEFont() : getGnomeFont();
|
return SystemInfo.isKDE ? getKDEFont() : getGnomeFont();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,7 +77,7 @@ class LinuxFontPolicy
|
|||||||
// Ubuntu font is rendered poorly (except if running in JetBrains VM)
|
// Ubuntu font is rendered poorly (except if running in JetBrains VM)
|
||||||
// --> use Liberation Sans font
|
// --> use Liberation Sans font
|
||||||
if( family.startsWith( "Ubuntu" ) &&
|
if( family.startsWith( "Ubuntu" ) &&
|
||||||
!SystemInfo.IS_JETBRAINS_JVM &&
|
!SystemInfo.isJetBrainsJVM &&
|
||||||
!FlatSystemProperties.getBoolean( FlatSystemProperties.USE_UBUNTU_FONT, false ) )
|
!FlatSystemProperties.getBoolean( FlatSystemProperties.USE_UBUNTU_FONT, false ) )
|
||||||
family = "Liberation Sans";
|
family = "Liberation Sans";
|
||||||
|
|
||||||
|
|||||||
@@ -71,13 +71,13 @@ class MnemonicHandler
|
|||||||
@Override
|
@Override
|
||||||
public boolean postProcessKeyEvent( KeyEvent e ) {
|
public boolean postProcessKeyEvent( KeyEvent e ) {
|
||||||
int keyCode = e.getKeyCode();
|
int keyCode = e.getKeyCode();
|
||||||
if( SystemInfo.IS_MAC ) {
|
if( SystemInfo.isMacOS ) {
|
||||||
// Ctrl+Alt keys must be pressed on Mac
|
// Ctrl+Alt keys must be pressed on Mac
|
||||||
if( keyCode == KeyEvent.VK_CONTROL || keyCode == KeyEvent.VK_ALT )
|
if( keyCode == KeyEvent.VK_CONTROL || keyCode == KeyEvent.VK_ALT )
|
||||||
showMnemonics( shouldShowMnemonics( e ) && e.isControlDown() && e.isAltDown(), e.getComponent() );
|
showMnemonics( shouldShowMnemonics( e ) && e.isControlDown() && e.isAltDown(), e.getComponent() );
|
||||||
} else {
|
} else {
|
||||||
// Alt key must be pressed on Windows and Linux
|
// Alt key must be pressed on Windows and Linux
|
||||||
if( SystemInfo.IS_WINDOWS )
|
if( SystemInfo.isWindows )
|
||||||
return processKeyEventOnWindows( e );
|
return processKeyEventOnWindows( e );
|
||||||
|
|
||||||
if( keyCode == KeyEvent.VK_ALT )
|
if( keyCode == KeyEvent.VK_ALT )
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ package com.formdev.flatlaf;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -107,6 +109,42 @@ class UIDefaultsLoader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// load custom properties files (usually provides by applications)
|
||||||
|
List<Object> customDefaultsSources = FlatLaf.getCustomDefaultsSources();
|
||||||
|
int size = (customDefaultsSources != null) ? customDefaultsSources.size() : 0;
|
||||||
|
for( int i = 0; i < size; i++ ) {
|
||||||
|
Object source = customDefaultsSources.get( i );
|
||||||
|
if( source instanceof String && i + 1 < size ) {
|
||||||
|
// load from package in classloader
|
||||||
|
String packageName = (String) source;
|
||||||
|
ClassLoader classLoader = (ClassLoader) customDefaultsSources.get( ++i );
|
||||||
|
|
||||||
|
packageName = packageName.replace( '.', '/' );
|
||||||
|
if( classLoader == null )
|
||||||
|
classLoader = FlatLaf.class.getClassLoader();
|
||||||
|
|
||||||
|
for( Class<?> lafClass : lafClasses ) {
|
||||||
|
String propertiesName = packageName + '/' + lafClass.getSimpleName() + ".properties";
|
||||||
|
try( InputStream in = classLoader.getResourceAsStream( propertiesName ) ) {
|
||||||
|
if( in != null )
|
||||||
|
properties.load( in );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if( source instanceof File ) {
|
||||||
|
// load from folder
|
||||||
|
File folder = (File) source;
|
||||||
|
for( Class<?> lafClass : lafClasses ) {
|
||||||
|
File propertiesFile = new File( folder, lafClass.getSimpleName() + ".properties" );
|
||||||
|
if( !propertiesFile.isFile() )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
try( InputStream in = new FileInputStream( propertiesFile ) ) {
|
||||||
|
properties.load( in );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// collect addon class loaders
|
// collect addon class loaders
|
||||||
List<ClassLoader> addonClassLoaders = new ArrayList<>();
|
List<ClassLoader> addonClassLoaders = new ArrayList<>();
|
||||||
for( FlatDefaultsAddon addon : addons ) {
|
for( FlatDefaultsAddon addon : addons ) {
|
||||||
@@ -144,9 +182,9 @@ class UIDefaultsLoader
|
|||||||
|
|
||||||
// handle platform specific properties
|
// handle platform specific properties
|
||||||
String platformPrefix =
|
String platformPrefix =
|
||||||
SystemInfo.IS_WINDOWS ? "[win]" :
|
SystemInfo.isWindows ? "[win]" :
|
||||||
SystemInfo.IS_MAC ? "[mac]" :
|
SystemInfo.isMacOS ? "[mac]" :
|
||||||
SystemInfo.IS_LINUX ? "[linux]" : "[unknown]";
|
SystemInfo.isLinux ? "[linux]" : "[unknown]";
|
||||||
for( String key : platformSpecificKeys ) {
|
for( String key : platformSpecificKeys ) {
|
||||||
Object value = properties.remove( key );
|
Object value = properties.remove( key );
|
||||||
if( key.startsWith( platformPrefix ) )
|
if( key.startsWith( platformPrefix ) )
|
||||||
@@ -154,8 +192,11 @@ class UIDefaultsLoader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Function<String, String> propertiesGetter = key -> {
|
||||||
|
return properties.getProperty( key );
|
||||||
|
};
|
||||||
Function<String, String> resolver = value -> {
|
Function<String, String> resolver = value -> {
|
||||||
return resolveValue( properties, value );
|
return resolveValue( value, propertiesGetter );
|
||||||
};
|
};
|
||||||
|
|
||||||
// get globals, which override all other defaults that end with same suffix
|
// get globals, which override all other defaults that end with same suffix
|
||||||
@@ -165,9 +206,10 @@ class UIDefaultsLoader
|
|||||||
if( !key.startsWith( GLOBAL_PREFIX ) )
|
if( !key.startsWith( GLOBAL_PREFIX ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
String value = resolveValue( properties, (String) e.getValue() );
|
String value = resolveValue( (String) e.getValue(), propertiesGetter );
|
||||||
try {
|
try {
|
||||||
globals.put( key.substring( GLOBAL_PREFIX.length() ), parseValue( key, value, resolver, addonClassLoaders ) );
|
globals.put( key.substring( GLOBAL_PREFIX.length() ),
|
||||||
|
parseValue( key, value, null, resolver, addonClassLoaders ) );
|
||||||
} catch( RuntimeException ex ) {
|
} catch( RuntimeException ex ) {
|
||||||
logParseError( Level.SEVERE, key, value, ex );
|
logParseError( Level.SEVERE, key, value, ex );
|
||||||
}
|
}
|
||||||
@@ -190,9 +232,9 @@ class UIDefaultsLoader
|
|||||||
if( key.startsWith( VARIABLE_PREFIX ) || key.startsWith( GLOBAL_PREFIX ) )
|
if( key.startsWith( VARIABLE_PREFIX ) || key.startsWith( GLOBAL_PREFIX ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
String value = resolveValue( properties, (String) e.getValue() );
|
String value = resolveValue( (String) e.getValue(), propertiesGetter );
|
||||||
try {
|
try {
|
||||||
defaults.put( key, parseValue( key, value, resolver, addonClassLoaders ) );
|
defaults.put( key, parseValue( key, value, null, resolver, addonClassLoaders ) );
|
||||||
} catch( RuntimeException ex ) {
|
} catch( RuntimeException ex ) {
|
||||||
logParseError( Level.SEVERE, key, value, ex );
|
logParseError( Level.SEVERE, key, value, ex );
|
||||||
}
|
}
|
||||||
@@ -206,7 +248,10 @@ class UIDefaultsLoader
|
|||||||
FlatLaf.LOG.log( level, "FlatLaf: Failed to parse: '" + key + '=' + value + '\'', ex );
|
FlatLaf.LOG.log( level, "FlatLaf: Failed to parse: '" + key + '=' + value + '\'', ex );
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String resolveValue( Properties properties, String value ) {
|
static String resolveValue( String value, Function<String, String> propertiesGetter ) {
|
||||||
|
value = value.trim();
|
||||||
|
String value0 = value;
|
||||||
|
|
||||||
if( value.startsWith( PROPERTY_PREFIX ) )
|
if( value.startsWith( PROPERTY_PREFIX ) )
|
||||||
value = value.substring( PROPERTY_PREFIX.length() );
|
value = value.substring( PROPERTY_PREFIX.length() );
|
||||||
else if( !value.startsWith( VARIABLE_PREFIX ) )
|
else if( !value.startsWith( VARIABLE_PREFIX ) )
|
||||||
@@ -218,7 +263,7 @@ class UIDefaultsLoader
|
|||||||
optional = true;
|
optional = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
String newValue = properties.getProperty( value );
|
String newValue = propertiesGetter.apply( value );
|
||||||
if( newValue == null ) {
|
if( newValue == null ) {
|
||||||
if( optional )
|
if( optional )
|
||||||
return "null";
|
return "null";
|
||||||
@@ -226,29 +271,40 @@ class UIDefaultsLoader
|
|||||||
throw new IllegalArgumentException( "variable or property '" + value + "' not found" );
|
throw new IllegalArgumentException( "variable or property '" + value + "' not found" );
|
||||||
}
|
}
|
||||||
|
|
||||||
return resolveValue( properties, newValue );
|
if( newValue.equals( value0 ) )
|
||||||
|
throw new IllegalArgumentException( "endless recursion in variable or property '" + value + "'" );
|
||||||
|
|
||||||
|
return resolveValue( newValue, propertiesGetter );
|
||||||
}
|
}
|
||||||
|
|
||||||
private enum ValueType { UNKNOWN, STRING, CHARACTER, INTEGER, FLOAT, BORDER, ICON, INSETS, DIMENSION, COLOR,
|
enum ValueType { UNKNOWN, STRING, BOOLEAN, CHARACTER, INTEGER, FLOAT, BORDER, ICON, INSETS, DIMENSION, COLOR,
|
||||||
SCALEDINTEGER, SCALEDFLOAT, SCALEDINSETS, SCALEDDIMENSION, INSTANCE, CLASS, GRAYFILTER }
|
SCALEDINTEGER, SCALEDFLOAT, SCALEDINSETS, SCALEDDIMENSION, INSTANCE, CLASS, GRAYFILTER, NULL, LAZY }
|
||||||
|
|
||||||
|
private static ValueType[] tempResultValueType = new ValueType[1];
|
||||||
|
|
||||||
static Object parseValue( String key, String value ) {
|
static Object parseValue( String key, String value ) {
|
||||||
return parseValue( key, value, v -> v, Collections.emptyList() );
|
return parseValue( key, value, null, v -> v, Collections.emptyList() );
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Object parseValue( String key, String value, Function<String, String> resolver, List<ClassLoader> addonClassLoaders ) {
|
static Object parseValue( String key, String value, ValueType[] resultValueType,
|
||||||
|
Function<String, String> resolver, List<ClassLoader> addonClassLoaders )
|
||||||
|
{
|
||||||
|
if( resultValueType == null )
|
||||||
|
resultValueType = tempResultValueType;
|
||||||
|
|
||||||
value = value.trim();
|
value = value.trim();
|
||||||
|
|
||||||
// null, false, true
|
// null, false, true
|
||||||
switch( value ) {
|
switch( value ) {
|
||||||
case "null": return null;
|
case "null": resultValueType[0] = ValueType.NULL; return null;
|
||||||
case "false": return false;
|
case "false": resultValueType[0] = ValueType.BOOLEAN; return false;
|
||||||
case "true": return true;
|
case "true": resultValueType[0] = ValueType.BOOLEAN; return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for function "lazy"
|
// check for function "lazy"
|
||||||
// Syntax: lazy(uiKey)
|
// Syntax: lazy(uiKey)
|
||||||
if( value.startsWith( "lazy(" ) && value.endsWith( ")" ) ) {
|
if( value.startsWith( "lazy(" ) && value.endsWith( ")" ) ) {
|
||||||
|
resultValueType[0] = ValueType.LAZY;
|
||||||
String uiKey = value.substring( 5, value.length() - 1 ).trim();
|
String uiKey = value.substring( 5, value.length() - 1 ).trim();
|
||||||
return (LazyValue) t -> {
|
return (LazyValue) t -> {
|
||||||
return lazyUIManagerGet( uiKey );
|
return lazyUIManagerGet( uiKey );
|
||||||
@@ -301,6 +357,8 @@ class UIDefaultsLoader
|
|||||||
valueType = ValueType.GRAYFILTER;
|
valueType = ValueType.GRAYFILTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resultValueType[0] = valueType;
|
||||||
|
|
||||||
// parse value
|
// parse value
|
||||||
switch( valueType ) {
|
switch( valueType ) {
|
||||||
case STRING: return value;
|
case STRING: return value;
|
||||||
@@ -323,20 +381,27 @@ class UIDefaultsLoader
|
|||||||
default:
|
default:
|
||||||
// colors
|
// colors
|
||||||
Object color = parseColorOrFunction( value, resolver, false );
|
Object color = parseColorOrFunction( value, resolver, false );
|
||||||
if( color != null )
|
if( color != null ) {
|
||||||
|
resultValueType[0] = ValueType.COLOR;
|
||||||
return color;
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
// integer
|
// integer
|
||||||
Integer integer = parseInteger( value, false );
|
Integer integer = parseInteger( value, false );
|
||||||
if( integer != null )
|
if( integer != null ) {
|
||||||
|
resultValueType[0] = ValueType.INTEGER;
|
||||||
return integer;
|
return integer;
|
||||||
|
}
|
||||||
|
|
||||||
// float
|
// float
|
||||||
Float f = parseFloat( value, false );
|
Float f = parseFloat( value, false );
|
||||||
if( f != null )
|
if( f != null ) {
|
||||||
|
resultValueType[0] = ValueType.FLOAT;
|
||||||
return f;
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
// string
|
// string
|
||||||
|
resultValueType[0] = ValueType.STRING;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -612,6 +677,8 @@ class UIDefaultsLoader
|
|||||||
// parse base color
|
// parse base color
|
||||||
String resolvedColorStr = resolver.apply( colorStr );
|
String resolvedColorStr = resolver.apply( colorStr );
|
||||||
ColorUIResource baseColor = (ColorUIResource) parseColorOrFunction( resolvedColorStr, resolver, reportError );
|
ColorUIResource baseColor = (ColorUIResource) parseColorOrFunction( resolvedColorStr, resolver, reportError );
|
||||||
|
if( baseColor == null )
|
||||||
|
return null;
|
||||||
|
|
||||||
// apply this function to base color
|
// apply this function to base color
|
||||||
Color newColor = ColorFunctions.applyFunctions( baseColor, function );
|
Color newColor = ColorFunctions.applyFunctions( baseColor, function );
|
||||||
|
|||||||
@@ -43,24 +43,24 @@ import com.formdev.flatlaf.util.DerivedColor;
|
|||||||
* Border for various components (e.g. {@link javax.swing.JTextField}).
|
* Border for various components (e.g. {@link javax.swing.JTextField}).
|
||||||
*
|
*
|
||||||
* There is empty space around the component border, if Component.focusWidth is greater than zero,
|
* There is empty space around the component border, if Component.focusWidth is greater than zero,
|
||||||
* which is used to paint focus border.
|
* which is used to paint outer focus border.
|
||||||
*
|
*
|
||||||
* Because there is empty space (if focus border is not painted),
|
* Because there is empty space (if outer focus border is not painted),
|
||||||
* UI delegates that use this border (or subclasses) must invoke
|
* UI delegates that use this border (or subclasses) must invoke
|
||||||
* {@link FlatUIUtils#paintParentBackground} to paint the empty space correctly.
|
* {@link FlatUIUtils#paintParentBackground} to paint the empty space correctly.
|
||||||
*
|
*
|
||||||
* @uiDefault Component.focusWidth int
|
* @uiDefault Component.focusWidth int
|
||||||
* @uiDefault Component.innerFocusWidth int or float
|
* @uiDefault Component.innerFocusWidth int or float
|
||||||
* @uiDefault Component.focusColor Color
|
* @uiDefault Component.focusColor Color
|
||||||
* @uiDefault Component.borderColor Color
|
* @uiDefault Component.borderColor Color
|
||||||
* @uiDefault Component.disabledBorderColor Color
|
* @uiDefault Component.disabledBorderColor Color
|
||||||
* @uiDefault Component.focusedBorderColor Color
|
* @uiDefault Component.focusedBorderColor Color
|
||||||
*
|
*
|
||||||
* @uiDefault Component.error.borderColor Color
|
* @uiDefault Component.error.borderColor Color
|
||||||
* @uiDefault Component.error.focusedBorderColor Color
|
* @uiDefault Component.error.focusedBorderColor Color
|
||||||
* @uiDefault Component.warning.borderColor Color
|
* @uiDefault Component.warning.borderColor Color
|
||||||
* @uiDefault Component.warning.focusedBorderColor Color
|
* @uiDefault Component.warning.focusedBorderColor Color
|
||||||
* @uiDefault Component.custom.borderColor Color
|
* @uiDefault Component.custom.borderColor Color
|
||||||
*
|
*
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
*/
|
*/
|
||||||
@@ -87,22 +87,23 @@ public class FlatBorder
|
|||||||
try {
|
try {
|
||||||
FlatUIUtils.setRenderingHints( g2 );
|
FlatUIUtils.setRenderingHints( g2 );
|
||||||
|
|
||||||
boolean isCellEditor = isTableCellEditor( c );
|
float focusWidth = scale( (float) getFocusWidth( c ) );
|
||||||
float focusWidth = isCellEditor ? 0 : scale( (float) getFocusWidth( c ) );
|
|
||||||
float borderWidth = scale( (float) getBorderWidth( c ) );
|
float borderWidth = scale( (float) getBorderWidth( c ) );
|
||||||
float arc = isCellEditor ? 0 : scale( (float) getArc( c ) );
|
float arc = scale( (float) getArc( c ) );
|
||||||
Color outlineColor = getOutlineColor( c );
|
Color outlineColor = getOutlineColor( c );
|
||||||
|
|
||||||
|
// paint outer border
|
||||||
if( outlineColor != null || isFocused( c ) ) {
|
if( outlineColor != null || isFocused( c ) ) {
|
||||||
float innerFocusWidth = !(c instanceof JScrollPane)
|
float innerWidth = !isCellEditor( c ) && !(c instanceof JScrollPane)
|
||||||
? (outlineColor != null ? innerOutlineWidth : this.innerFocusWidth)
|
? (outlineColor != null ? innerOutlineWidth : innerFocusWidth)
|
||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
g2.setColor( (outlineColor != null) ? outlineColor : getFocusColor( c ) );
|
g2.setColor( (outlineColor != null) ? outlineColor : getFocusColor( c ) );
|
||||||
FlatUIUtils.paintComponentOuterBorder( g2, x, y, width, height, focusWidth,
|
FlatUIUtils.paintComponentOuterBorder( g2, x, y, width, height,
|
||||||
scale( (float) getLineWidth( c ) ) + scale( innerFocusWidth ), arc );
|
focusWidth, borderWidth + scale( innerWidth ), arc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// paint border
|
||||||
g2.setPaint( (outlineColor != null) ? outlineColor : getBorderColor( c ) );
|
g2.setPaint( (outlineColor != null) ? outlineColor : getBorderColor( c ) );
|
||||||
FlatUIUtils.paintComponentBorder( g2, x, y, width, height, focusWidth, borderWidth, arc );
|
FlatUIUtils.paintComponentBorder( g2, x, y, width, height, focusWidth, borderWidth, arc );
|
||||||
} finally {
|
} finally {
|
||||||
@@ -110,6 +111,10 @@ public class FlatBorder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the outline color of the component border specified in client property
|
||||||
|
* {@link FlatClientProperties#OUTLINE}.
|
||||||
|
*/
|
||||||
protected Color getOutlineColor( Component c ) {
|
protected Color getOutlineColor( Component c ) {
|
||||||
if( !(c instanceof JComponent) )
|
if( !(c instanceof JComponent) )
|
||||||
return null;
|
return null;
|
||||||
@@ -192,14 +197,13 @@ public class FlatBorder
|
|||||||
return FlatUIUtils.isPermanentFocusOwner( c );
|
return FlatUIUtils.isPermanentFocusOwner( c );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isTableCellEditor( Component c ) {
|
protected boolean isCellEditor( Component c ) {
|
||||||
return FlatUIUtils.isTableCellEditor( c );
|
return FlatUIUtils.isCellEditor( c );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Insets getBorderInsets( Component c, Insets insets ) {
|
public Insets getBorderInsets( Component c, Insets insets ) {
|
||||||
boolean isCellEditor = isTableCellEditor( c );
|
float focusWidth = scale( (float) getFocusWidth( c ) );
|
||||||
float focusWidth = isCellEditor ? 0 : scale( (float) getFocusWidth( c ) );
|
|
||||||
float ow = focusWidth + scale( (float) getLineWidth( c ) );
|
float ow = focusWidth + scale( (float) getLineWidth( c ) );
|
||||||
|
|
||||||
insets = super.getBorderInsets( c, insets );
|
insets = super.getBorderInsets( c, insets );
|
||||||
@@ -207,6 +211,18 @@ public class FlatBorder
|
|||||||
insets.left = Math.round( scale( (float) insets.left ) + ow );
|
insets.left = Math.round( scale( (float) insets.left ) + ow );
|
||||||
insets.bottom = Math.round( scale( (float) insets.bottom ) + ow );
|
insets.bottom = Math.round( scale( (float) insets.bottom ) + ow );
|
||||||
insets.right = Math.round( scale( (float) insets.right ) + ow );
|
insets.right = Math.round( scale( (float) insets.right ) + ow );
|
||||||
|
|
||||||
|
if( isCellEditor( c ) ) {
|
||||||
|
// remove top and bottom insets if used as cell editor
|
||||||
|
insets.top = insets.bottom = 0;
|
||||||
|
|
||||||
|
// remove right/left insets to avoid that text is truncated (e.g. in file chooser)
|
||||||
|
if( c.getComponentOrientation().isLeftToRight() )
|
||||||
|
insets.right = 0;
|
||||||
|
else
|
||||||
|
insets.left = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return insets;
|
return insets;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,6 +230,9 @@ public class FlatBorder
|
|||||||
* Returns the (unscaled) thickness of the outer focus border.
|
* Returns the (unscaled) thickness of the outer focus border.
|
||||||
*/
|
*/
|
||||||
protected int getFocusWidth( Component c ) {
|
protected int getFocusWidth( Component c ) {
|
||||||
|
if( isCellEditor( c ) )
|
||||||
|
return 0;
|
||||||
|
|
||||||
return focusWidth;
|
return focusWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ import com.formdev.flatlaf.util.UIScale;
|
|||||||
* @uiDefault Button.default.hoverBorderColor Color optional
|
* @uiDefault Button.default.hoverBorderColor Color optional
|
||||||
* @uiDefault Button.default.focusedBorderColor Color
|
* @uiDefault Button.default.focusedBorderColor Color
|
||||||
* @uiDefault Button.default.focusColor Color
|
* @uiDefault Button.default.focusColor Color
|
||||||
|
* @uiDefault Button.borderWidth int
|
||||||
* @uiDefault Button.default.borderWidth int
|
* @uiDefault Button.default.borderWidth int
|
||||||
* @uiDefault Button.toolbar.margin Insets
|
* @uiDefault Button.toolbar.margin Insets
|
||||||
* @uiDefault Button.toolbar.spacingInsets Insets
|
* @uiDefault Button.toolbar.spacingInsets Insets
|
||||||
@@ -62,6 +63,7 @@ public class FlatButtonBorder
|
|||||||
protected final Color defaultHoverBorderColor = UIManager.getColor( "Button.default.hoverBorderColor" );
|
protected final Color defaultHoverBorderColor = UIManager.getColor( "Button.default.hoverBorderColor" );
|
||||||
protected final Color defaultFocusedBorderColor = UIManager.getColor( "Button.default.focusedBorderColor" );
|
protected final Color defaultFocusedBorderColor = UIManager.getColor( "Button.default.focusedBorderColor" );
|
||||||
protected final Color defaultFocusColor = UIManager.getColor( "Button.default.focusColor" );
|
protected final Color defaultFocusColor = UIManager.getColor( "Button.default.focusColor" );
|
||||||
|
protected final int borderWidth = UIManager.getInt( "Button.borderWidth" );
|
||||||
protected final int defaultBorderWidth = UIManager.getInt( "Button.default.borderWidth" );
|
protected final int defaultBorderWidth = UIManager.getInt( "Button.default.borderWidth" );
|
||||||
protected final Insets toolbarMargin = UIManager.getInsets( "Button.toolbar.margin" );
|
protected final Insets toolbarMargin = UIManager.getInsets( "Button.toolbar.margin" );
|
||||||
protected final Insets toolbarSpacingInsets = UIManager.getInsets( "Button.toolbar.spacingInsets" );
|
protected final Insets toolbarSpacingInsets = UIManager.getInsets( "Button.toolbar.spacingInsets" );
|
||||||
@@ -134,11 +136,14 @@ public class FlatButtonBorder
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getBorderWidth( Component c ) {
|
protected int getBorderWidth( Component c ) {
|
||||||
return FlatButtonUI.isDefaultButton( c ) ? defaultBorderWidth : super.getBorderWidth( c );
|
return FlatButtonUI.isDefaultButton( c ) ? defaultBorderWidth : borderWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getArc( Component c ) {
|
protected int getArc( Component c ) {
|
||||||
|
if( isCellEditor( c ) )
|
||||||
|
return 0;
|
||||||
|
|
||||||
switch( FlatButtonUI.getButtonType( c ) ) {
|
switch( FlatButtonUI.getButtonType( c ) ) {
|
||||||
case FlatButtonUI.TYPE_SQUARE: return 0;
|
case FlatButtonUI.TYPE_SQUARE: return 0;
|
||||||
case FlatButtonUI.TYPE_ROUND_RECT: return Short.MAX_VALUE;
|
case FlatButtonUI.TYPE_ROUND_RECT: return Short.MAX_VALUE;
|
||||||
|
|||||||
@@ -67,8 +67,11 @@ import com.formdev.flatlaf.util.UIScale;
|
|||||||
* @uiDefault Button.focusedBackground Color optional
|
* @uiDefault Button.focusedBackground Color optional
|
||||||
* @uiDefault Button.hoverBackground Color optional
|
* @uiDefault Button.hoverBackground Color optional
|
||||||
* @uiDefault Button.pressedBackground Color optional
|
* @uiDefault Button.pressedBackground Color optional
|
||||||
|
* @uiDefault Button.selectedBackground Color
|
||||||
|
* @uiDefault Button.selectedForeground Color
|
||||||
* @uiDefault Button.disabledBackground Color optional
|
* @uiDefault Button.disabledBackground Color optional
|
||||||
* @uiDefault Button.disabledText Color
|
* @uiDefault Button.disabledText Color
|
||||||
|
* @uiDefault Button.disabledSelectedBackground Color
|
||||||
* @uiDefault Button.default.background Color
|
* @uiDefault Button.default.background Color
|
||||||
* @uiDefault Button.default.startBackground Color optional; if set, a gradient paint is used and Button.default.background is ignored
|
* @uiDefault Button.default.startBackground Color optional; if set, a gradient paint is used and Button.default.background is ignored
|
||||||
* @uiDefault Button.default.endBackground Color optional; if set, a gradient paint is used
|
* @uiDefault Button.default.endBackground Color optional; if set, a gradient paint is used
|
||||||
@@ -84,6 +87,7 @@ import com.formdev.flatlaf.util.UIScale;
|
|||||||
* @uiDefault Button.toolbar.spacingInsets Insets
|
* @uiDefault Button.toolbar.spacingInsets Insets
|
||||||
* @uiDefault Button.toolbar.hoverBackground Color
|
* @uiDefault Button.toolbar.hoverBackground Color
|
||||||
* @uiDefault Button.toolbar.pressedBackground Color
|
* @uiDefault Button.toolbar.pressedBackground Color
|
||||||
|
* @uiDefault Button.toolbar.selectedBackground Color
|
||||||
*
|
*
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
*/
|
*/
|
||||||
@@ -101,8 +105,11 @@ public class FlatButtonUI
|
|||||||
protected Color focusedBackground;
|
protected Color focusedBackground;
|
||||||
protected Color hoverBackground;
|
protected Color hoverBackground;
|
||||||
protected Color pressedBackground;
|
protected Color pressedBackground;
|
||||||
|
protected Color selectedBackground;
|
||||||
|
protected Color selectedForeground;
|
||||||
protected Color disabledBackground;
|
protected Color disabledBackground;
|
||||||
protected Color disabledText;
|
protected Color disabledText;
|
||||||
|
protected Color disabledSelectedBackground;
|
||||||
|
|
||||||
protected Color defaultBackground;
|
protected Color defaultBackground;
|
||||||
protected Color defaultEndBackground;
|
protected Color defaultEndBackground;
|
||||||
@@ -119,6 +126,7 @@ public class FlatButtonUI
|
|||||||
protected Insets toolbarSpacingInsets;
|
protected Insets toolbarSpacingInsets;
|
||||||
protected Color toolbarHoverBackground;
|
protected Color toolbarHoverBackground;
|
||||||
protected Color toolbarPressedBackground;
|
protected Color toolbarPressedBackground;
|
||||||
|
protected Color toolbarSelectedBackground;
|
||||||
|
|
||||||
private Icon helpButtonIcon;
|
private Icon helpButtonIcon;
|
||||||
|
|
||||||
@@ -150,8 +158,11 @@ public class FlatButtonUI
|
|||||||
focusedBackground = UIManager.getColor( prefix + "focusedBackground" );
|
focusedBackground = UIManager.getColor( prefix + "focusedBackground" );
|
||||||
hoverBackground = UIManager.getColor( prefix + "hoverBackground" );
|
hoverBackground = UIManager.getColor( prefix + "hoverBackground" );
|
||||||
pressedBackground = UIManager.getColor( prefix + "pressedBackground" );
|
pressedBackground = UIManager.getColor( prefix + "pressedBackground" );
|
||||||
|
selectedBackground = UIManager.getColor( prefix + "selectedBackground" );
|
||||||
|
selectedForeground = UIManager.getColor( prefix + "selectedForeground" );
|
||||||
disabledBackground = UIManager.getColor( prefix + "disabledBackground" );
|
disabledBackground = UIManager.getColor( prefix + "disabledBackground" );
|
||||||
disabledText = UIManager.getColor( prefix + "disabledText" );
|
disabledText = UIManager.getColor( prefix + "disabledText" );
|
||||||
|
disabledSelectedBackground = UIManager.getColor( prefix + "disabledSelectedBackground" );
|
||||||
|
|
||||||
if( UIManager.getBoolean( "Button.paintShadow" ) ) {
|
if( UIManager.getBoolean( "Button.paintShadow" ) ) {
|
||||||
shadowWidth = FlatUIUtils.getUIInt( "Button.shadowWidth", 2 );
|
shadowWidth = FlatUIUtils.getUIInt( "Button.shadowWidth", 2 );
|
||||||
@@ -174,6 +185,7 @@ public class FlatButtonUI
|
|||||||
toolbarSpacingInsets = UIManager.getInsets( "Button.toolbar.spacingInsets" );
|
toolbarSpacingInsets = UIManager.getInsets( "Button.toolbar.spacingInsets" );
|
||||||
toolbarHoverBackground = UIManager.getColor( prefix + "toolbar.hoverBackground" );
|
toolbarHoverBackground = UIManager.getColor( prefix + "toolbar.hoverBackground" );
|
||||||
toolbarPressedBackground = UIManager.getColor( prefix + "toolbar.pressedBackground" );
|
toolbarPressedBackground = UIManager.getColor( prefix + "toolbar.pressedBackground" );
|
||||||
|
toolbarSelectedBackground = UIManager.getColor( prefix + "toolbar.selectedBackground" );
|
||||||
|
|
||||||
helpButtonIcon = UIManager.getIcon( "HelpButton.icon" );
|
helpButtonIcon = UIManager.getIcon( "HelpButton.icon" );
|
||||||
|
|
||||||
@@ -202,13 +214,7 @@ public class FlatButtonUI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BasicButtonListener createButtonListener( AbstractButton b ) {
|
protected BasicButtonListener createButtonListener( AbstractButton b ) {
|
||||||
return new BasicButtonListener( b ) {
|
return new FlatButtonListener( b );
|
||||||
@Override
|
|
||||||
public void propertyChange( PropertyChangeEvent e ) {
|
|
||||||
super.propertyChange( e );
|
|
||||||
FlatButtonUI.this.propertyChange( b, e );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void propertyChange( AbstractButton b, PropertyChangeEvent e ) {
|
protected void propertyChange( AbstractButton b, PropertyChangeEvent e ) {
|
||||||
@@ -375,6 +381,17 @@ public class FlatButtonUI
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected Color getBackground( JComponent c ) {
|
protected Color getBackground( JComponent c ) {
|
||||||
|
if( ((AbstractButton)c).isSelected() ) {
|
||||||
|
// in toolbar use same colors for disabled and enabled because
|
||||||
|
// we assume that toolbar icon is shown disabled
|
||||||
|
boolean toolBarButton = isToolBarButton( c );
|
||||||
|
return buttonStateColor( c,
|
||||||
|
toolBarButton ? toolbarSelectedBackground : selectedBackground,
|
||||||
|
toolBarButton ? toolbarSelectedBackground : disabledSelectedBackground,
|
||||||
|
null, null,
|
||||||
|
toolBarButton ? toolbarPressedBackground : pressedBackground );
|
||||||
|
}
|
||||||
|
|
||||||
if( !c.isEnabled() )
|
if( !c.isEnabled() )
|
||||||
return disabledBackground;
|
return disabledBackground;
|
||||||
|
|
||||||
@@ -436,6 +453,9 @@ public class FlatButtonUI
|
|||||||
if( !c.isEnabled() )
|
if( !c.isEnabled() )
|
||||||
return disabledText;
|
return disabledText;
|
||||||
|
|
||||||
|
if( ((AbstractButton)c).isSelected() && !isToolBarButton( c ) )
|
||||||
|
return selectedForeground;
|
||||||
|
|
||||||
// use component foreground if explicitly set
|
// use component foreground if explicitly set
|
||||||
Color fg = c.getForeground();
|
Color fg = c.getForeground();
|
||||||
if( isCustomForeground( fg ) )
|
if( isCustomForeground( fg ) )
|
||||||
@@ -475,4 +495,23 @@ public class FlatButtonUI
|
|||||||
|
|
||||||
return prefSize;
|
return prefSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---- class FlatButtonListener -------------------------------------------
|
||||||
|
|
||||||
|
protected class FlatButtonListener
|
||||||
|
extends BasicButtonListener
|
||||||
|
{
|
||||||
|
private final AbstractButton b;
|
||||||
|
|
||||||
|
protected FlatButtonListener( AbstractButton b ) {
|
||||||
|
super( b );
|
||||||
|
this.b = b;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void propertyChange( PropertyChangeEvent e ) {
|
||||||
|
super.propertyChange( e );
|
||||||
|
FlatButtonUI.this.propertyChange( b, e );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ import javax.swing.JComboBox;
|
|||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
import javax.swing.JList;
|
import javax.swing.JList;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JScrollBar;
|
||||||
import javax.swing.JTextField;
|
import javax.swing.JTextField;
|
||||||
import javax.swing.KeyStroke;
|
import javax.swing.KeyStroke;
|
||||||
import javax.swing.ListCellRenderer;
|
import javax.swing.ListCellRenderer;
|
||||||
@@ -119,7 +120,7 @@ public class FlatComboBoxUI
|
|||||||
protected Color buttonHoverArrowColor;
|
protected Color buttonHoverArrowColor;
|
||||||
|
|
||||||
private MouseListener hoverListener;
|
private MouseListener hoverListener;
|
||||||
private boolean hover;
|
protected boolean hover;
|
||||||
|
|
||||||
private WeakReference<Component> lastRendererComponent;
|
private WeakReference<Component> lastRendererComponent;
|
||||||
|
|
||||||
@@ -306,7 +307,7 @@ public class FlatComboBoxUI
|
|||||||
updateEditorColors();
|
updateEditorColors();
|
||||||
|
|
||||||
// macOS
|
// macOS
|
||||||
if( SystemInfo.IS_MAC && editor instanceof JTextComponent ) {
|
if( SystemInfo.isMacOS && editor instanceof JTextComponent ) {
|
||||||
// delegate actions from editor text field to combobox, which is necessary
|
// delegate actions from editor text field to combobox, which is necessary
|
||||||
// because text field on macOS already handle those keys
|
// because text field on macOS already handle those keys
|
||||||
InputMap inputMap = ((JTextComponent)editor).getInputMap();
|
InputMap inputMap = ((JTextComponent)editor).getInputMap();
|
||||||
@@ -332,14 +333,7 @@ public class FlatComboBoxUI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected JButton createArrowButton() {
|
protected JButton createArrowButton() {
|
||||||
return new FlatArrowButton( SwingConstants.SOUTH, arrowType, buttonArrowColor,
|
return new FlatComboBoxButton();
|
||||||
buttonDisabledArrowColor, buttonHoverArrowColor, null )
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
protected boolean isHover() {
|
|
||||||
return super.isHover() || (!comboBox.isEditable() ? hover : false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -507,6 +501,27 @@ public class FlatComboBoxUI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---- class FlatComboBoxButton -------------------------------------------
|
||||||
|
|
||||||
|
protected class FlatComboBoxButton
|
||||||
|
extends FlatArrowButton
|
||||||
|
{
|
||||||
|
protected FlatComboBoxButton() {
|
||||||
|
this( SwingConstants.SOUTH, arrowType, buttonArrowColor, buttonDisabledArrowColor, buttonHoverArrowColor, null, null );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected FlatComboBoxButton( int direction, String type, Color foreground, Color disabledForeground,
|
||||||
|
Color hoverForeground, Color hoverBackground, Color pressedBackground )
|
||||||
|
{
|
||||||
|
super( direction, type, foreground, disabledForeground, hoverForeground, hoverBackground, pressedBackground );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean isHover() {
|
||||||
|
return super.isHover() || (!comboBox.isEditable() ? hover : false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---- class FlatComboPopup -----------------------------------------------
|
//---- class FlatComboPopup -----------------------------------------------
|
||||||
|
|
||||||
@SuppressWarnings( { "rawtypes", "unchecked" } )
|
@SuppressWarnings( { "rawtypes", "unchecked" } )
|
||||||
@@ -530,13 +545,26 @@ public class FlatComboBoxUI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Rectangle computePopupBounds( int px, int py, int pw, int ph ) {
|
protected Rectangle computePopupBounds( int px, int py, int pw, int ph ) {
|
||||||
// get maximum display size of all items
|
// get maximum display width of all items
|
||||||
Dimension displaySize = getDisplaySize();
|
int displayWidth = getDisplaySize().width;
|
||||||
|
|
||||||
|
// add border insets
|
||||||
|
for( Border border : new Border[] { scroller.getViewportBorder(), scroller.getBorder() } ) {
|
||||||
|
if( border != null ) {
|
||||||
|
Insets borderInsets = border.getBorderInsets( null );
|
||||||
|
displayWidth += borderInsets.left + borderInsets.right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add width of vertical scroll bar
|
||||||
|
JScrollBar verticalScrollBar = scroller.getVerticalScrollBar();
|
||||||
|
if( verticalScrollBar != null )
|
||||||
|
displayWidth += verticalScrollBar.getPreferredSize().width;
|
||||||
|
|
||||||
// make popup wider if necessary
|
// make popup wider if necessary
|
||||||
if( displaySize.width > pw ) {
|
if( displayWidth > pw ) {
|
||||||
int diff = displaySize.width - pw;
|
int diff = displayWidth - pw;
|
||||||
pw = displaySize.width;
|
pw = displayWidth;
|
||||||
|
|
||||||
if( !comboBox.getComponentOrientation().isLeftToRight() )
|
if( !comboBox.getComponentOrientation().isLeftToRight() )
|
||||||
px -= diff;
|
px -= diff;
|
||||||
|
|||||||
@@ -26,13 +26,14 @@ import java.beans.PropertyChangeListener;
|
|||||||
import javax.swing.BorderFactory;
|
import javax.swing.BorderFactory;
|
||||||
import javax.swing.BoxLayout;
|
import javax.swing.BoxLayout;
|
||||||
import javax.swing.Icon;
|
import javax.swing.Icon;
|
||||||
|
import javax.swing.ImageIcon;
|
||||||
import javax.swing.JInternalFrame;
|
import javax.swing.JInternalFrame;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.LookAndFeel;
|
import javax.swing.LookAndFeel;
|
||||||
import javax.swing.UIManager;
|
|
||||||
import javax.swing.border.Border;
|
import javax.swing.border.Border;
|
||||||
import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
|
import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
|
||||||
|
import com.formdev.flatlaf.util.ScaledImageIcon;
|
||||||
import com.formdev.flatlaf.util.UIScale;
|
import com.formdev.flatlaf.util.UIScale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -91,7 +92,21 @@ public class FlatInternalFrameTitlePane
|
|||||||
updateFrameIcon();
|
updateFrameIcon();
|
||||||
updateColors();
|
updateColors();
|
||||||
|
|
||||||
buttonPanel = new JPanel();
|
buttonPanel = new JPanel() {
|
||||||
|
@Override
|
||||||
|
public Dimension getPreferredSize() {
|
||||||
|
Dimension size = super.getPreferredSize();
|
||||||
|
int height = size.height;
|
||||||
|
// use height of invisible buttons to always have same title pane height
|
||||||
|
if( !iconButton.isVisible() )
|
||||||
|
height = Math.max( height, iconButton.getPreferredSize().height );
|
||||||
|
if( !maxButton.isVisible() )
|
||||||
|
height = Math.max( height, maxButton.getPreferredSize().height );
|
||||||
|
if( !closeButton.isVisible() )
|
||||||
|
height = Math.max( height, closeButton.getPreferredSize().height );
|
||||||
|
return new Dimension( size.width, height );
|
||||||
|
}
|
||||||
|
};
|
||||||
buttonPanel.setLayout( new BoxLayout( buttonPanel, BoxLayout.LINE_AXIS ) );
|
buttonPanel.setLayout( new BoxLayout( buttonPanel, BoxLayout.LINE_AXIS ) );
|
||||||
buttonPanel.setOpaque( false );
|
buttonPanel.setOpaque( false );
|
||||||
|
|
||||||
@@ -103,14 +118,16 @@ public class FlatInternalFrameTitlePane
|
|||||||
add( buttonPanel, BorderLayout.LINE_END );
|
add( buttonPanel, BorderLayout.LINE_END );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateFrameIcon() {
|
protected void updateFrameIcon() {
|
||||||
Icon frameIcon = frame.getFrameIcon();
|
Icon frameIcon = frame.getFrameIcon();
|
||||||
if( frameIcon == UIManager.getIcon( "InternalFrame.icon" ) )
|
if( frameIcon != null && (frameIcon.getIconWidth() == 0 || frameIcon.getIconHeight() == 0) )
|
||||||
frameIcon = null;
|
frameIcon = null;
|
||||||
|
else if( frameIcon instanceof ImageIcon )
|
||||||
|
frameIcon = new ScaledImageIcon( (ImageIcon) frameIcon );
|
||||||
titleLabel.setIcon( frameIcon );
|
titleLabel.setIcon( frameIcon );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateColors() {
|
protected void updateColors() {
|
||||||
Color background = FlatUIUtils.nonUIResource( frame.isSelected() ? selectedTitleColor : notSelectedTitleColor );
|
Color background = FlatUIUtils.nonUIResource( frame.isSelected() ? selectedTitleColor : notSelectedTitleColor );
|
||||||
Color foreground = FlatUIUtils.nonUIResource( frame.isSelected() ? selectedTextColor : notSelectedTextColor );
|
Color foreground = FlatUIUtils.nonUIResource( frame.isSelected() ? selectedTextColor : notSelectedTextColor );
|
||||||
|
|
||||||
@@ -123,7 +140,7 @@ public class FlatInternalFrameTitlePane
|
|||||||
closeButton.setForeground( foreground );
|
closeButton.setForeground( foreground );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateButtonsVisibility() {
|
protected void updateButtonsVisibility() {
|
||||||
iconButton.setVisible( frame.isIconifiable() );
|
iconButton.setVisible( frame.isIconifiable() );
|
||||||
maxButton.setVisible( frame.isMaximizable() );
|
maxButton.setVisible( frame.isMaximizable() );
|
||||||
closeButton.setVisible( frame.isClosable() );
|
closeButton.setVisible( frame.isClosable() );
|
||||||
@@ -150,7 +167,7 @@ public class FlatInternalFrameTitlePane
|
|||||||
|
|
||||||
//---- class FlatPropertyChangeHandler ------------------------------------
|
//---- class FlatPropertyChangeHandler ------------------------------------
|
||||||
|
|
||||||
private class FlatPropertyChangeHandler
|
protected class FlatPropertyChangeHandler
|
||||||
extends PropertyChangeHandler
|
extends PropertyChangeHandler
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
package com.formdev.flatlaf.ui;
|
package com.formdev.flatlaf.ui;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
import java.awt.EventQueue;
|
||||||
import java.awt.event.FocusEvent;
|
import java.awt.event.FocusEvent;
|
||||||
import java.awt.event.FocusListener;
|
import java.awt.event.FocusListener;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
@@ -106,7 +107,11 @@ public class FlatListUI
|
|||||||
@Override
|
@Override
|
||||||
public void focusLost( FocusEvent e ) {
|
public void focusLost( FocusEvent e ) {
|
||||||
super.focusLost( e );
|
super.focusLost( e );
|
||||||
toggleSelectionColors();
|
|
||||||
|
// use invokeLater for the case that the window is deactivated
|
||||||
|
EventQueue.invokeLater( () -> {
|
||||||
|
toggleSelectionColors();
|
||||||
|
} );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -121,6 +126,9 @@ public class FlatListUI
|
|||||||
* or the application has to be changed to extend a FlatLaf renderer.
|
* or the application has to be changed to extend a FlatLaf renderer.
|
||||||
*/
|
*/
|
||||||
private void toggleSelectionColors() {
|
private void toggleSelectionColors() {
|
||||||
|
if( list == null )
|
||||||
|
return;
|
||||||
|
|
||||||
if( FlatUIUtils.isPermanentFocusOwner( list ) ) {
|
if( FlatUIUtils.isPermanentFocusOwner( list ) ) {
|
||||||
if( list.getSelectionBackground() == selectionInactiveBackground )
|
if( list.getSelectionBackground() == selectionInactiveBackground )
|
||||||
list.setSelectionBackground( selectionBackground );
|
list.setSelectionBackground( selectionBackground );
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class FlatMenuBarUI
|
|||||||
JMenuBar menuBar = (JMenuBar) e.getSource();
|
JMenuBar menuBar = (JMenuBar) e.getSource();
|
||||||
JMenu menu = menuBar.getMenu( 0 );
|
JMenu menu = menuBar.getMenu( 0 );
|
||||||
if( menu != null ) {
|
if( menu != null ) {
|
||||||
MenuSelectionManager.defaultManager().setSelectedPath( SystemInfo.IS_WINDOWS
|
MenuSelectionManager.defaultManager().setSelectedPath( SystemInfo.isWindows
|
||||||
? new MenuElement[] { menuBar, menu }
|
? new MenuElement[] { menuBar, menu }
|
||||||
: new MenuElement[] { menuBar, menu, menu.getPopupMenu() } );
|
: new MenuElement[] { menuBar, menu, menu.getPopupMenu() } );
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import javax.swing.text.View;
|
|||||||
import com.formdev.flatlaf.FlatLaf;
|
import com.formdev.flatlaf.FlatLaf;
|
||||||
import com.formdev.flatlaf.util.Graphics2DProxy;
|
import com.formdev.flatlaf.util.Graphics2DProxy;
|
||||||
import com.formdev.flatlaf.util.HiDPIUtils;
|
import com.formdev.flatlaf.util.HiDPIUtils;
|
||||||
|
import com.formdev.flatlaf.util.SystemInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renderer for menu items.
|
* Renderer for menu items.
|
||||||
@@ -418,36 +419,78 @@ debug*/
|
|||||||
|
|
||||||
private KeyStroke cachedAccelerator;
|
private KeyStroke cachedAccelerator;
|
||||||
private String cachedAcceleratorText;
|
private String cachedAcceleratorText;
|
||||||
|
private boolean cachedAcceleratorLeftToRight;
|
||||||
|
|
||||||
private String getAcceleratorText() {
|
private String getAcceleratorText() {
|
||||||
KeyStroke accelerator = menuItem.getAccelerator();
|
KeyStroke accelerator = menuItem.getAccelerator();
|
||||||
if( accelerator == null )
|
if( accelerator == null )
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if( accelerator == cachedAccelerator )
|
boolean leftToRight = menuItem.getComponentOrientation().isLeftToRight();
|
||||||
|
|
||||||
|
if( accelerator == cachedAccelerator && leftToRight == cachedAcceleratorLeftToRight )
|
||||||
return cachedAcceleratorText;
|
return cachedAcceleratorText;
|
||||||
|
|
||||||
cachedAccelerator = accelerator;
|
cachedAccelerator = accelerator;
|
||||||
cachedAcceleratorText = getTextForAccelerator( accelerator );
|
cachedAcceleratorText = getTextForAccelerator( accelerator );
|
||||||
|
cachedAcceleratorLeftToRight = leftToRight;
|
||||||
|
|
||||||
return cachedAcceleratorText;
|
return cachedAcceleratorText;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getTextForAccelerator( KeyStroke accelerator ) {
|
protected String getTextForAccelerator( KeyStroke accelerator ) {
|
||||||
StringBuilder buf = new StringBuilder();
|
StringBuilder buf = new StringBuilder();
|
||||||
int modifiers = accelerator.getModifiers();
|
boolean leftToRight = menuItem.getComponentOrientation().isLeftToRight();
|
||||||
if( modifiers != 0 )
|
|
||||||
buf.append( InputEvent.getModifiersExText( modifiers ) ).append( acceleratorDelimiter );
|
|
||||||
|
|
||||||
|
// modifiers
|
||||||
|
int modifiers = accelerator.getModifiers();
|
||||||
|
if( modifiers != 0 ) {
|
||||||
|
if( SystemInfo.isMacOS ) {
|
||||||
|
if( leftToRight )
|
||||||
|
buf.append( getMacOSModifiersExText( modifiers, leftToRight ) );
|
||||||
|
} else
|
||||||
|
buf.append( InputEvent.getModifiersExText( modifiers ) ).append( acceleratorDelimiter );
|
||||||
|
}
|
||||||
|
|
||||||
|
// key
|
||||||
int keyCode = accelerator.getKeyCode();
|
int keyCode = accelerator.getKeyCode();
|
||||||
if( keyCode != 0 )
|
if( keyCode != 0 )
|
||||||
buf.append( KeyEvent.getKeyText( keyCode ) );
|
buf.append( KeyEvent.getKeyText( keyCode ) );
|
||||||
else
|
else
|
||||||
buf.append( accelerator.getKeyChar() );
|
buf.append( accelerator.getKeyChar() );
|
||||||
|
|
||||||
|
// modifiers if right-to-left on macOS
|
||||||
|
if( modifiers != 0 && !leftToRight && SystemInfo.isMacOS )
|
||||||
|
buf.append( getMacOSModifiersExText( modifiers, leftToRight ) );
|
||||||
|
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected String getMacOSModifiersExText( int modifiers, boolean leftToRight ) {
|
||||||
|
StringBuilder buf = new StringBuilder();
|
||||||
|
|
||||||
|
if( (modifiers & InputEvent.CTRL_DOWN_MASK) != 0 )
|
||||||
|
buf.append( controlGlyph );
|
||||||
|
if( (modifiers & (InputEvent.ALT_DOWN_MASK | InputEvent.ALT_GRAPH_DOWN_MASK)) != 0 )
|
||||||
|
buf.append( optionGlyph );
|
||||||
|
if( (modifiers & InputEvent.SHIFT_DOWN_MASK) != 0 )
|
||||||
|
buf.append( shiftGlyph );
|
||||||
|
if( (modifiers & InputEvent.META_DOWN_MASK) != 0 )
|
||||||
|
buf.append( commandGlyph );
|
||||||
|
|
||||||
|
// reverse order for right-to-left
|
||||||
|
if( !leftToRight )
|
||||||
|
buf.reverse();
|
||||||
|
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final char
|
||||||
|
controlGlyph = 0x2303,
|
||||||
|
optionGlyph = 0x2325,
|
||||||
|
shiftGlyph = 0x21E7,
|
||||||
|
commandGlyph = 0x2318;
|
||||||
|
|
||||||
//---- class MinSizeIcon --------------------------------------------------
|
//---- class MinSizeIcon --------------------------------------------------
|
||||||
|
|
||||||
private class MinSizeIcon
|
private class MinSizeIcon
|
||||||
|
|||||||
@@ -123,6 +123,14 @@ public class FlatMenuUI
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dimension getMinimumSize( JComponent c ) {
|
||||||
|
// avoid that top-level menus (in menu bar) are made smaller if horizontal space is rare
|
||||||
|
// same code is in BasicMenuUI since Java 10
|
||||||
|
// see https://bugs.openjdk.java.net/browse/JDK-8178430
|
||||||
|
return ((JMenu)menuItem).isTopLevelMenu() ? c.getPreferredSize() : null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Dimension getPreferredMenuItemSize( JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap ) {
|
protected Dimension getPreferredMenuItemSize( JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap ) {
|
||||||
return renderer.getPreferredMenuItemSize();
|
return renderer.getPreferredMenuItemSize();
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import java.lang.reflect.Method;
|
|||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
import javax.swing.JLayeredPane;
|
import javax.swing.JLayeredPane;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JToolTip;
|
||||||
import javax.swing.Popup;
|
import javax.swing.Popup;
|
||||||
import javax.swing.PopupFactory;
|
import javax.swing.PopupFactory;
|
||||||
import javax.swing.RootPaneContainer;
|
import javax.swing.RootPaneContainer;
|
||||||
@@ -62,7 +63,7 @@ public class FlatPopupFactory
|
|||||||
return new NonFlashingPopup( super.getPopup( owner, contents, x, y ), contents );
|
return new NonFlashingPopup( super.getPopup( owner, contents, x, y ), contents );
|
||||||
|
|
||||||
// macOS and Linux adds drop shadow to heavy weight popups
|
// macOS and Linux adds drop shadow to heavy weight popups
|
||||||
if( SystemInfo.IS_MAC || SystemInfo.IS_LINUX ) {
|
if( SystemInfo.isMacOS || SystemInfo.isLinux ) {
|
||||||
Popup popup = getHeavyWeightPopup( owner, contents, x, y );
|
Popup popup = getHeavyWeightPopup( owner, contents, x, y );
|
||||||
if( popup == null )
|
if( popup == null )
|
||||||
popup = super.getPopup( owner, contents, x, y );
|
popup = super.getPopup( owner, contents, x, y );
|
||||||
@@ -105,7 +106,7 @@ public class FlatPopupFactory
|
|||||||
throws IllegalArgumentException
|
throws IllegalArgumentException
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if( SystemInfo.IS_JAVA_9_OR_LATER ) {
|
if( SystemInfo.isJava_9_orLater ) {
|
||||||
if( java9getPopupMethod == null ) {
|
if( java9getPopupMethod == null ) {
|
||||||
java9getPopupMethod = PopupFactory.class.getDeclaredMethod(
|
java9getPopupMethod = PopupFactory.class.getDeclaredMethod(
|
||||||
"getPopup", Component.class, Component.class, int.class, int.class, boolean.class );
|
"getPopup", Component.class, Component.class, int.class, int.class, boolean.class );
|
||||||
@@ -132,6 +133,7 @@ public class FlatPopupFactory
|
|||||||
extends Popup
|
extends Popup
|
||||||
{
|
{
|
||||||
private Popup delegate;
|
private Popup delegate;
|
||||||
|
private Component contents;
|
||||||
|
|
||||||
// heavy weight
|
// heavy weight
|
||||||
protected Window popupWindow;
|
protected Window popupWindow;
|
||||||
@@ -139,6 +141,7 @@ public class FlatPopupFactory
|
|||||||
|
|
||||||
NonFlashingPopup( Popup delegate, Component contents ) {
|
NonFlashingPopup( Popup delegate, Component contents ) {
|
||||||
this.delegate = delegate;
|
this.delegate = delegate;
|
||||||
|
this.contents = contents;
|
||||||
|
|
||||||
popupWindow = SwingUtilities.windowForComponent( contents );
|
popupWindow = SwingUtilities.windowForComponent( contents );
|
||||||
if( popupWindow != null ) {
|
if( popupWindow != null ) {
|
||||||
@@ -153,8 +156,25 @@ public class FlatPopupFactory
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void show() {
|
public void show() {
|
||||||
if( delegate != null )
|
if( delegate != null ) {
|
||||||
delegate.show();
|
delegate.show();
|
||||||
|
|
||||||
|
// increase tooltip size if necessary because it may be too small on HiDPI screens
|
||||||
|
// https://bugs.openjdk.java.net/browse/JDK-8213535
|
||||||
|
if( contents instanceof JToolTip ) {
|
||||||
|
Container parent = contents.getParent();
|
||||||
|
if( parent instanceof JPanel ) {
|
||||||
|
Dimension prefSize = parent.getPreferredSize();
|
||||||
|
if( !prefSize.equals( parent.getSize() ) ) {
|
||||||
|
Container panel = SwingUtilities.getAncestorOfClass( Panel.class, parent );
|
||||||
|
if( panel != null )
|
||||||
|
panel.setSize( prefSize ); // for medium weight popup
|
||||||
|
else
|
||||||
|
parent.setSize( prefSize ); // for light weight popup
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -162,6 +182,7 @@ public class FlatPopupFactory
|
|||||||
if( delegate != null ) {
|
if( delegate != null ) {
|
||||||
delegate.hide();
|
delegate.hide();
|
||||||
delegate = null;
|
delegate = null;
|
||||||
|
contents = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( popupWindow != null ) {
|
if( popupWindow != null ) {
|
||||||
|
|||||||
@@ -20,12 +20,13 @@ import java.awt.Color;
|
|||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Container;
|
import java.awt.Container;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Frame;
|
||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
import java.awt.LayoutManager;
|
import java.awt.LayoutManager;
|
||||||
import java.awt.LayoutManager2;
|
import java.awt.LayoutManager2;
|
||||||
import java.awt.Toolkit;
|
import java.awt.Window;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
@@ -51,12 +52,15 @@ import com.formdev.flatlaf.util.SystemInfo;
|
|||||||
* <!-- FlatRootPaneUI -->
|
* <!-- FlatRootPaneUI -->
|
||||||
*
|
*
|
||||||
* @uiDefault RootPane.border Border
|
* @uiDefault RootPane.border Border
|
||||||
|
* @uiDefault RootPane.activeBorderColor Color
|
||||||
|
* @uiDefault RootPane.inactiveBorderColor Color
|
||||||
*
|
*
|
||||||
* <!-- FlatWindowResizer -->
|
* <!-- FlatWindowResizer -->
|
||||||
*
|
*
|
||||||
* @uiDefault RootPane.borderDragThickness int
|
* @uiDefault RootPane.borderDragThickness int
|
||||||
* @uiDefault RootPane.cornerDragWidth int
|
* @uiDefault RootPane.cornerDragWidth int
|
||||||
* @uiDefault RootPane.honorMinimumSizeOnResize boolean
|
* @uiDefault RootPane.honorFrameMinimumSizeOnResize boolean
|
||||||
|
* @uiDefault RootPane.honorDialogMinimumSizeOnResize boolean
|
||||||
*
|
*
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
*/
|
*/
|
||||||
@@ -65,12 +69,13 @@ public class FlatRootPaneUI
|
|||||||
{
|
{
|
||||||
// check this field before using class JBRCustomDecorations to avoid unnecessary loading of that class
|
// check this field before using class JBRCustomDecorations to avoid unnecessary loading of that class
|
||||||
static final boolean canUseJBRCustomDecorations
|
static final boolean canUseJBRCustomDecorations
|
||||||
= SystemInfo.IS_JETBRAINS_JVM_11_OR_LATER && SystemInfo.IS_WINDOWS_10_OR_LATER;
|
= SystemInfo.isJetBrainsJVM_11_orLater && SystemInfo.isWindows_10_orLater;
|
||||||
|
|
||||||
|
protected JRootPane rootPane;
|
||||||
|
protected FlatTitlePane titlePane;
|
||||||
|
protected FlatWindowResizer windowResizer;
|
||||||
|
|
||||||
private JRootPane rootPane;
|
|
||||||
private FlatTitlePane titlePane;
|
|
||||||
private LayoutManager oldLayout;
|
private LayoutManager oldLayout;
|
||||||
private FlatWindowResizer windowResizer;
|
|
||||||
|
|
||||||
public static ComponentUI createUI( JComponent c ) {
|
public static ComponentUI createUI( JComponent c ) {
|
||||||
return new FlatRootPaneUI();
|
return new FlatRootPaneUI();
|
||||||
@@ -114,7 +119,7 @@ public class FlatRootPaneUI
|
|||||||
}
|
}
|
||||||
|
|
||||||
// enable dark window appearance on macOS when running in JetBrains Runtime
|
// enable dark window appearance on macOS when running in JetBrains Runtime
|
||||||
if( SystemInfo.IS_JETBRAINS_JVM && SystemInfo.IS_MAC_OS_10_14_MOJAVE ) {
|
if( SystemInfo.isJetBrainsJVM && SystemInfo.isMacOS_10_14_Mojave_orLater ) {
|
||||||
LookAndFeel laf = UIManager.getLookAndFeel();
|
LookAndFeel laf = UIManager.getLookAndFeel();
|
||||||
boolean isDark = laf instanceof FlatLaf && ((FlatLaf)laf).isDark();
|
boolean isDark = laf instanceof FlatLaf && ((FlatLaf)laf).isDark();
|
||||||
c.putClientProperty( "jetbrains.awt.windowDarkAppearance", isDark );
|
c.putClientProperty( "jetbrains.awt.windowDarkAppearance", isDark );
|
||||||
@@ -299,6 +304,9 @@ public class FlatRootPaneUI
|
|||||||
Container contentPane = rootPane.getContentPane();
|
Container contentPane = rootPane.getContentPane();
|
||||||
if( contentPane != null )
|
if( contentPane != null )
|
||||||
contentPane.setBounds( 0, nextY, width, Math.max( height - nextY, 0 ) );
|
contentPane.setBounds( 0, nextY, width, Math.max( height - nextY, 0 ) );
|
||||||
|
|
||||||
|
if( titlePane != null )
|
||||||
|
titlePane.menuBarLayouted();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -323,24 +331,45 @@ public class FlatRootPaneUI
|
|||||||
public static class FlatWindowBorder
|
public static class FlatWindowBorder
|
||||||
extends BorderUIResource.EmptyBorderUIResource
|
extends BorderUIResource.EmptyBorderUIResource
|
||||||
{
|
{
|
||||||
|
protected final Color activeBorderColor = UIManager.getColor( "RootPane.activeBorderColor" );
|
||||||
|
protected final Color inactiveBorderColor = UIManager.getColor( "RootPane.inactiveBorderColor" );
|
||||||
|
protected final Color baseBorderColor = UIManager.getColor( "Panel.background" );
|
||||||
|
|
||||||
public FlatWindowBorder() {
|
public FlatWindowBorder() {
|
||||||
super( 1, 1, 1, 1 );
|
super( 1, 1, 1, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) {
|
public Insets getBorderInsets( Component c, Insets insets ) {
|
||||||
Object borderColorObj = Toolkit.getDefaultToolkit().getDesktopProperty(
|
if( isWindowMaximized( c ) ) {
|
||||||
"win.frame.activeBorderColor" );
|
// hide border if window is maximized
|
||||||
Color borderColor = (borderColorObj instanceof Color)
|
insets.top = insets.left = insets.bottom = insets.right = 0;
|
||||||
? (Color) borderColorObj
|
return insets;
|
||||||
: UIManager.getColor( "windowBorder" );
|
} else
|
||||||
|
return super.getBorderInsets( c, insets );
|
||||||
|
}
|
||||||
|
|
||||||
g.setColor( borderColor );
|
@Override
|
||||||
|
public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) {
|
||||||
|
if( isWindowMaximized( c ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
Container parent = c.getParent();
|
||||||
|
boolean active = parent instanceof Window ? ((Window)parent).isActive() : false;
|
||||||
|
|
||||||
|
g.setColor( FlatUIUtils.deriveColor( active ? activeBorderColor : inactiveBorderColor, baseBorderColor ) );
|
||||||
HiDPIUtils.paintAtScale1x( (Graphics2D) g, x, y, width, height, this::paintImpl );
|
HiDPIUtils.paintAtScale1x( (Graphics2D) g, x, y, width, height, this::paintImpl );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void paintImpl( Graphics2D g, int x, int y, int width, int height, double scaleFactor ) {
|
private void paintImpl( Graphics2D g, int x, int y, int width, int height, double scaleFactor ) {
|
||||||
g.drawRect( x, y, width - 1, height - 1 );
|
g.drawRect( x, y, width - 1, height - 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean isWindowMaximized( Component c ) {
|
||||||
|
Container parent = c.getParent();
|
||||||
|
return parent instanceof Frame
|
||||||
|
? (((Frame)parent).getExtendedState() & Frame.MAXIMIZED_BOTH) != 0
|
||||||
|
: false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ public class FlatRoundBorder
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getArc( Component c ) {
|
protected int getArc( Component c ) {
|
||||||
return FlatUIUtils.isRoundRect( c ) ? Short.MAX_VALUE : arc;
|
if( isCellEditor( c ) )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
Boolean roundRect = FlatUIUtils.isRoundRect( c );
|
||||||
|
return roundRect != null ? (roundRect ? Short.MAX_VALUE : 0) : arc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,46 +198,12 @@ public class FlatScrollBarUI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected JButton createDecreaseButton( int orientation ) {
|
protected JButton createDecreaseButton( int orientation ) {
|
||||||
return createArrowButton( orientation );
|
return new FlatScrollBarButton( orientation );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected JButton createIncreaseButton( int orientation ) {
|
protected JButton createIncreaseButton( int orientation ) {
|
||||||
return createArrowButton( orientation );
|
return new FlatScrollBarButton( orientation );
|
||||||
}
|
|
||||||
|
|
||||||
private JButton createArrowButton( int orientation ) {
|
|
||||||
FlatArrowButton button = new FlatArrowButton( orientation, arrowType, buttonArrowColor,
|
|
||||||
buttonDisabledArrowColor, null, hoverButtonBackground, pressedButtonBackground )
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
protected Color deriveBackground( Color background ) {
|
|
||||||
return FlatUIUtils.deriveColor( background, scrollbar.getBackground() );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Dimension getPreferredSize() {
|
|
||||||
if( isShowButtons() ) {
|
|
||||||
int w = UIScale.scale( scrollBarWidth );
|
|
||||||
return new Dimension( w, w );
|
|
||||||
} else
|
|
||||||
return new Dimension();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Dimension getMinimumSize() {
|
|
||||||
return isShowButtons() ? super.getMinimumSize() : new Dimension();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Dimension getMaximumSize() {
|
|
||||||
return isShowButtons() ? super.getMaximumSize() : new Dimension();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
button.setArrowWidth( FlatArrowButton.DEFAULT_ARROW_WIDTH - 2 );
|
|
||||||
button.setFocusable( false );
|
|
||||||
button.setRequestFocusEnabled( false );
|
|
||||||
return button;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isShowButtons() {
|
protected boolean isShowButtons() {
|
||||||
@@ -318,12 +284,12 @@ public class FlatScrollBarUI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Dimension getMinimumThumbSize() {
|
protected Dimension getMinimumThumbSize() {
|
||||||
return UIScale.scale( super.getMinimumThumbSize() );
|
return UIScale.scale( FlatUIUtils.addInsets( super.getMinimumThumbSize(), thumbInsets ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Dimension getMaximumThumbSize() {
|
protected Dimension getMaximumThumbSize() {
|
||||||
return UIScale.scale( super.getMaximumThumbSize() );
|
return UIScale.scale( FlatUIUtils.addInsets( super.getMaximumThumbSize(), thumbInsets ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//---- class ScrollBarHoverListener ---------------------------------------
|
//---- class ScrollBarHoverListener ---------------------------------------
|
||||||
@@ -377,4 +343,49 @@ public class FlatScrollBarUI
|
|||||||
scrollbar.repaint();
|
scrollbar.repaint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---- class FlatScrollBarButton ------------------------------------------
|
||||||
|
|
||||||
|
protected class FlatScrollBarButton
|
||||||
|
extends FlatArrowButton
|
||||||
|
{
|
||||||
|
protected FlatScrollBarButton( int direction ) {
|
||||||
|
this( direction, arrowType, buttonArrowColor, buttonDisabledArrowColor,
|
||||||
|
null, hoverButtonBackground, pressedButtonBackground );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected FlatScrollBarButton( int direction, String type, Color foreground, Color disabledForeground,
|
||||||
|
Color hoverForeground, Color hoverBackground, Color pressedBackground )
|
||||||
|
{
|
||||||
|
super( direction, type, foreground, disabledForeground, hoverForeground, hoverBackground, pressedBackground );
|
||||||
|
|
||||||
|
setArrowWidth( FlatArrowButton.DEFAULT_ARROW_WIDTH - 2 );
|
||||||
|
setFocusable( false );
|
||||||
|
setRequestFocusEnabled( false );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Color deriveBackground( Color background ) {
|
||||||
|
return FlatUIUtils.deriveColor( background, scrollbar.getBackground() );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dimension getPreferredSize() {
|
||||||
|
if( isShowButtons() ) {
|
||||||
|
int w = UIScale.scale( scrollBarWidth );
|
||||||
|
return new Dimension( w, w );
|
||||||
|
} else
|
||||||
|
return new Dimension();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dimension getMinimumSize() {
|
||||||
|
return isShowButtons() ? super.getMinimumSize() : new Dimension();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dimension getMaximumSize() {
|
||||||
|
return isShowButtons() ? super.getMaximumSize() : new Dimension();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,10 +114,7 @@ public class FlatScrollPaneUI
|
|||||||
return new BasicScrollPaneUI.MouseWheelHandler() {
|
return new BasicScrollPaneUI.MouseWheelHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void mouseWheelMoved( MouseWheelEvent e ) {
|
public void mouseWheelMoved( MouseWheelEvent e ) {
|
||||||
// Note: Getting UI value "ScrollPane.smoothScrolling" here to allow
|
if( isSmoothScrollingEnabled() &&
|
||||||
// applications to turn smooth scrolling on or off at any time
|
|
||||||
// (e.g. in application options dialog).
|
|
||||||
if( UIManager.getBoolean( "ScrollPane.smoothScrolling" ) &&
|
|
||||||
scrollpane.isWheelScrollingEnabled() &&
|
scrollpane.isWheelScrollingEnabled() &&
|
||||||
e.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL &&
|
e.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL &&
|
||||||
e.getPreciseWheelRotation() != 0 &&
|
e.getPreciseWheelRotation() != 0 &&
|
||||||
@@ -130,6 +127,17 @@ public class FlatScrollPaneUI
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean isSmoothScrollingEnabled() {
|
||||||
|
Object smoothScrolling = scrollpane.getClientProperty( FlatClientProperties.SCROLL_PANE_SMOOTH_SCROLLING );
|
||||||
|
if( smoothScrolling instanceof Boolean )
|
||||||
|
return (Boolean) smoothScrolling;
|
||||||
|
|
||||||
|
// Note: Getting UI value "ScrollPane.smoothScrolling" here to allow
|
||||||
|
// applications to turn smooth scrolling on or off at any time
|
||||||
|
// (e.g. in application options dialog).
|
||||||
|
return UIManager.getBoolean( "ScrollPane.smoothScrolling" );
|
||||||
|
}
|
||||||
|
|
||||||
private static final double EPSILON = 1e-5d;
|
private static final double EPSILON = 1e-5d;
|
||||||
|
|
||||||
private void mouseWheelMovedSmooth( MouseWheelEvent e ) {
|
private void mouseWheelMovedSmooth( MouseWheelEvent e ) {
|
||||||
|
|||||||
@@ -87,10 +87,10 @@ public class FlatSplitPaneUI
|
|||||||
|
|
||||||
//---- class FlatSplitPaneDivider -----------------------------------------
|
//---- class FlatSplitPaneDivider -----------------------------------------
|
||||||
|
|
||||||
private class FlatSplitPaneDivider
|
protected class FlatSplitPaneDivider
|
||||||
extends BasicSplitPaneDivider
|
extends BasicSplitPaneDivider
|
||||||
{
|
{
|
||||||
public FlatSplitPaneDivider( BasicSplitPaneUI ui ) {
|
protected FlatSplitPaneDivider( BasicSplitPaneUI ui ) {
|
||||||
super( ui );
|
super( ui );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ public class FlatTableHeaderUI
|
|||||||
g2.setColor( separatorColor );
|
g2.setColor( separatorColor );
|
||||||
|
|
||||||
int sepCount = columnCount;
|
int sepCount = columnCount;
|
||||||
if( header.getTable().getAutoResizeMode() != JTable.AUTO_RESIZE_OFF && !isVerticalScrollBarVisible() )
|
if( header.getTable() != null && header.getTable().getAutoResizeMode() != JTable.AUTO_RESIZE_OFF && !isVerticalScrollBarVisible() )
|
||||||
sepCount--;
|
sepCount--;
|
||||||
|
|
||||||
if( header.getComponentOrientation().isLeftToRight() ) {
|
if( header.getComponentOrientation().isLeftToRight() ) {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ package com.formdev.flatlaf.ui;
|
|||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
|
import java.awt.EventQueue;
|
||||||
import java.awt.event.FocusEvent;
|
import java.awt.event.FocusEvent;
|
||||||
import java.awt.event.FocusListener;
|
import java.awt.event.FocusListener;
|
||||||
import javax.swing.JCheckBox;
|
import javax.swing.JCheckBox;
|
||||||
@@ -70,6 +71,10 @@ import com.formdev.flatlaf.util.UIScale;
|
|||||||
* @uiDefault Table.cellFocusColor Color
|
* @uiDefault Table.cellFocusColor Color
|
||||||
* @uiDefault Table.showCellFocusIndicator boolean
|
* @uiDefault Table.showCellFocusIndicator boolean
|
||||||
*
|
*
|
||||||
|
* <!-- FlatInputMaps -->
|
||||||
|
*
|
||||||
|
* @uiDefault Table.consistentHomeEndKeyBehavior boolean
|
||||||
|
*
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
*/
|
*/
|
||||||
public class FlatTableUI
|
public class FlatTableUI
|
||||||
@@ -92,16 +97,6 @@ public class FlatTableUI
|
|||||||
return new FlatTableUI();
|
return new FlatTableUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void installUI( JComponent c ) {
|
|
||||||
super.installUI( c );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void uninstallUI( JComponent c ) {
|
|
||||||
super.uninstallUI( c );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void installDefaults() {
|
protected void installDefaults() {
|
||||||
super.installDefaults();
|
super.installDefaults();
|
||||||
@@ -174,7 +169,11 @@ public class FlatTableUI
|
|||||||
@Override
|
@Override
|
||||||
public void focusLost( FocusEvent e ) {
|
public void focusLost( FocusEvent e ) {
|
||||||
super.focusLost( e );
|
super.focusLost( e );
|
||||||
toggleSelectionColors();
|
|
||||||
|
// use invokeLater for the case that the window is deactivated
|
||||||
|
EventQueue.invokeLater( () -> {
|
||||||
|
toggleSelectionColors();
|
||||||
|
} );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -189,6 +188,9 @@ public class FlatTableUI
|
|||||||
* or the application has to be changed to extend a FlatLaf renderer.
|
* or the application has to be changed to extend a FlatLaf renderer.
|
||||||
*/
|
*/
|
||||||
private void toggleSelectionColors() {
|
private void toggleSelectionColors() {
|
||||||
|
if( table == null )
|
||||||
|
return;
|
||||||
|
|
||||||
if( FlatUIUtils.isPermanentFocusOwner( table ) ) {
|
if( FlatUIUtils.isPermanentFocusOwner( table ) ) {
|
||||||
if( table.getSelectionBackground() == selectionInactiveBackground )
|
if( table.getSelectionBackground() == selectionInactiveBackground )
|
||||||
table.setSelectionBackground( selectionBackground );
|
table.setSelectionBackground( selectionBackground );
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ public class FlatTextAreaUI
|
|||||||
{
|
{
|
||||||
protected int minimumWidth;
|
protected int minimumWidth;
|
||||||
protected boolean isIntelliJTheme;
|
protected boolean isIntelliJTheme;
|
||||||
|
protected Color background;
|
||||||
protected Color disabledBackground;
|
protected Color disabledBackground;
|
||||||
protected Color inactiveBackground;
|
protected Color inactiveBackground;
|
||||||
|
|
||||||
@@ -67,12 +68,20 @@ public class FlatTextAreaUI
|
|||||||
return new FlatTextAreaUI();
|
return new FlatTextAreaUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void installUI( JComponent c ) {
|
||||||
|
super.installUI( c );
|
||||||
|
|
||||||
|
updateBackground();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void installDefaults() {
|
protected void installDefaults() {
|
||||||
super.installDefaults();
|
super.installDefaults();
|
||||||
|
|
||||||
minimumWidth = UIManager.getInt( "Component.minimumWidth" );
|
minimumWidth = UIManager.getInt( "Component.minimumWidth" );
|
||||||
isIntelliJTheme = UIManager.getBoolean( "Component.isIntelliJTheme" );
|
isIntelliJTheme = UIManager.getBoolean( "Component.isIntelliJTheme" );
|
||||||
|
background = UIManager.getColor( "TextArea.background" );
|
||||||
disabledBackground = UIManager.getColor( "TextArea.disabledBackground" );
|
disabledBackground = UIManager.getColor( "TextArea.disabledBackground" );
|
||||||
inactiveBackground = UIManager.getColor( "TextArea.inactiveBackground" );
|
inactiveBackground = UIManager.getColor( "TextArea.inactiveBackground" );
|
||||||
}
|
}
|
||||||
@@ -81,6 +90,7 @@ public class FlatTextAreaUI
|
|||||||
protected void uninstallDefaults() {
|
protected void uninstallDefaults() {
|
||||||
super.uninstallDefaults();
|
super.uninstallDefaults();
|
||||||
|
|
||||||
|
background = null;
|
||||||
disabledBackground = null;
|
disabledBackground = null;
|
||||||
inactiveBackground = null;
|
inactiveBackground = null;
|
||||||
}
|
}
|
||||||
@@ -89,26 +99,36 @@ public class FlatTextAreaUI
|
|||||||
protected void propertyChange( PropertyChangeEvent e ) {
|
protected void propertyChange( PropertyChangeEvent e ) {
|
||||||
super.propertyChange( e );
|
super.propertyChange( e );
|
||||||
FlatEditorPaneUI.propertyChange( getComponent(), e );
|
FlatEditorPaneUI.propertyChange( getComponent(), e );
|
||||||
|
|
||||||
|
switch( e.getPropertyName() ) {
|
||||||
|
case "editable":
|
||||||
|
case "enabled":
|
||||||
|
updateBackground();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private void updateBackground() {
|
||||||
protected void paintSafely( Graphics g ) {
|
|
||||||
super.paintSafely( HiDPIUtils.createGraphicsTextYCorrection( (Graphics2D) g ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void paintBackground( Graphics g ) {
|
|
||||||
JTextComponent c = getComponent();
|
JTextComponent c = getComponent();
|
||||||
|
|
||||||
Color background = c.getBackground();
|
Color background = c.getBackground();
|
||||||
g.setColor( !(background instanceof UIResource)
|
if( !(background instanceof UIResource) )
|
||||||
? background
|
return;
|
||||||
: (isIntelliJTheme && (!c.isEnabled() || !c.isEditable())
|
|
||||||
? FlatUIUtils.getParentBackground( c )
|
// do not update background if it currently has a unknown color (assigned from outside)
|
||||||
: (!c.isEnabled()
|
if( background != this.background &&
|
||||||
? disabledBackground
|
background != disabledBackground &&
|
||||||
: (!c.isEditable() ? inactiveBackground : background))) );
|
background != inactiveBackground )
|
||||||
g.fillRect( 0, 0, c.getWidth(), c.getHeight() );
|
return;
|
||||||
|
|
||||||
|
Color newBackground = !c.isEnabled()
|
||||||
|
? disabledBackground
|
||||||
|
: (!c.isEditable()
|
||||||
|
? inactiveBackground
|
||||||
|
: this.background);
|
||||||
|
|
||||||
|
if( newBackground != background )
|
||||||
|
c.setBackground( newBackground );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -128,4 +148,22 @@ public class FlatTextAreaUI
|
|||||||
|
|
||||||
return FlatEditorPaneUI.applyMinimumWidth( c, size, minimumWidth );
|
return FlatEditorPaneUI.applyMinimumWidth( c, size, minimumWidth );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void paintSafely( Graphics g ) {
|
||||||
|
super.paintSafely( HiDPIUtils.createGraphicsTextYCorrection( (Graphics2D) g ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void paintBackground( Graphics g ) {
|
||||||
|
JTextComponent c = getComponent();
|
||||||
|
|
||||||
|
// for compatibility with IntelliJ themes
|
||||||
|
if( isIntelliJTheme && (!c.isEnabled() || !c.isEditable()) && (c.getBackground() instanceof UIResource) ) {
|
||||||
|
FlatUIUtils.paintParentBackground( g, c );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
super.paintBackground( g );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ public class FlatTextBorder
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getArc( Component c ) {
|
protected int getArc( Component c ) {
|
||||||
return FlatUIUtils.isRoundRect( c ) ? Short.MAX_VALUE : arc;
|
if( isCellEditor( c ) )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
Boolean roundRect = FlatUIUtils.isRoundRect( c );
|
||||||
|
return roundRect != null ? (roundRect ? Short.MAX_VALUE : 0) : arc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ package com.formdev.flatlaf.ui;
|
|||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
|
import java.awt.Container;
|
||||||
import java.awt.Dialog;
|
import java.awt.Dialog;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.EventQueue;
|
import java.awt.EventQueue;
|
||||||
@@ -55,6 +56,7 @@ import javax.swing.JLabel;
|
|||||||
import javax.swing.JMenuBar;
|
import javax.swing.JMenuBar;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JRootPane;
|
import javax.swing.JRootPane;
|
||||||
|
import javax.swing.SwingConstants;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
import javax.swing.border.AbstractBorder;
|
import javax.swing.border.AbstractBorder;
|
||||||
@@ -90,30 +92,31 @@ import com.formdev.flatlaf.util.UIScale;
|
|||||||
public class FlatTitlePane
|
public class FlatTitlePane
|
||||||
extends JComponent
|
extends JComponent
|
||||||
{
|
{
|
||||||
private final Color activeBackground = UIManager.getColor( "TitlePane.background" );
|
protected final Color activeBackground = UIManager.getColor( "TitlePane.background" );
|
||||||
private final Color inactiveBackground = UIManager.getColor( "TitlePane.inactiveBackground" );
|
protected final Color inactiveBackground = UIManager.getColor( "TitlePane.inactiveBackground" );
|
||||||
private final Color activeForeground = UIManager.getColor( "TitlePane.foreground" );
|
protected final Color activeForeground = UIManager.getColor( "TitlePane.foreground" );
|
||||||
private final Color inactiveForeground = UIManager.getColor( "TitlePane.inactiveForeground" );
|
protected final Color inactiveForeground = UIManager.getColor( "TitlePane.inactiveForeground" );
|
||||||
private final Color embeddedForeground = UIManager.getColor( "TitlePane.embeddedForeground" );
|
protected final Color embeddedForeground = UIManager.getColor( "TitlePane.embeddedForeground" );
|
||||||
|
|
||||||
private final Insets menuBarMargins = UIManager.getInsets( "TitlePane.menuBarMargins" );
|
protected final Insets menuBarMargins = UIManager.getInsets( "TitlePane.menuBarMargins" );
|
||||||
private final Dimension iconSize = UIManager.getDimension( "TitlePane.iconSize" );
|
protected final Dimension iconSize = UIManager.getDimension( "TitlePane.iconSize" );
|
||||||
private final int buttonMaximizedHeight = UIManager.getInt( "TitlePane.buttonMaximizedHeight" );
|
protected final int buttonMaximizedHeight = UIManager.getInt( "TitlePane.buttonMaximizedHeight" );
|
||||||
|
|
||||||
private final JRootPane rootPane;
|
protected final JRootPane rootPane;
|
||||||
|
|
||||||
private JPanel leftPanel;
|
protected JPanel leftPanel;
|
||||||
private JLabel iconLabel;
|
protected JLabel iconLabel;
|
||||||
private JComponent menuBarPlaceholder;
|
protected JComponent menuBarPlaceholder;
|
||||||
private JLabel titleLabel;
|
protected JLabel titleLabel;
|
||||||
private JPanel buttonPanel;
|
protected JPanel buttonPanel;
|
||||||
private JButton iconifyButton;
|
protected JButton iconifyButton;
|
||||||
private JButton maximizeButton;
|
protected JButton maximizeButton;
|
||||||
private JButton restoreButton;
|
protected JButton restoreButton;
|
||||||
private JButton closeButton;
|
protected JButton closeButton;
|
||||||
|
|
||||||
|
protected Window window;
|
||||||
|
|
||||||
private final Handler handler;
|
private final Handler handler;
|
||||||
private Window window;
|
|
||||||
|
|
||||||
public FlatTitlePane( JRootPane rootPane ) {
|
public FlatTitlePane( JRootPane rootPane ) {
|
||||||
this.rootPane = rootPane;
|
this.rootPane = rootPane;
|
||||||
@@ -163,7 +166,25 @@ public class FlatTitlePane
|
|||||||
|
|
||||||
createButtons();
|
createButtons();
|
||||||
|
|
||||||
setLayout( new BorderLayout() );
|
setLayout( new BorderLayout() {
|
||||||
|
@Override
|
||||||
|
public void layoutContainer( Container target ) {
|
||||||
|
super.layoutContainer( target );
|
||||||
|
|
||||||
|
// make left panel (with embedded menu bar) smaller if horizontal space is rare
|
||||||
|
// to avoid that embedded menu bar overlaps button bar
|
||||||
|
Insets insets = target.getInsets();
|
||||||
|
int width = target.getWidth() - insets.left - insets.right;
|
||||||
|
if( leftPanel.getWidth() + buttonPanel.getWidth() > width ) {
|
||||||
|
int oldWidth = leftPanel.getWidth();
|
||||||
|
int newWidth = Math.max( width - buttonPanel.getWidth(), 0 );
|
||||||
|
leftPanel.setSize( newWidth, leftPanel.getHeight() );
|
||||||
|
if( !getComponentOrientation().isLeftToRight() )
|
||||||
|
leftPanel.setLocation( leftPanel.getX() + (oldWidth - newWidth), leftPanel.getY() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
add( leftPanel, BorderLayout.LINE_START );
|
add( leftPanel, BorderLayout.LINE_START );
|
||||||
add( titleLabel, BorderLayout.CENTER );
|
add( titleLabel, BorderLayout.CENTER );
|
||||||
add( buttonPanel, BorderLayout.LINE_END );
|
add( buttonPanel, BorderLayout.LINE_END );
|
||||||
@@ -217,13 +238,19 @@ public class FlatTitlePane
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void activeChanged( boolean active ) {
|
protected void activeChanged( boolean active ) {
|
||||||
|
boolean hasEmbeddedMenuBar = rootPane.getJMenuBar() != null && isMenuBarEmbedded();
|
||||||
Color background = FlatUIUtils.nonUIResource( active ? activeBackground : inactiveBackground );
|
Color background = FlatUIUtils.nonUIResource( active ? activeBackground : inactiveBackground );
|
||||||
Color foreground = FlatUIUtils.nonUIResource( active
|
Color foreground = FlatUIUtils.nonUIResource( active ? activeForeground : inactiveForeground );
|
||||||
? (rootPane.getJMenuBar() != null && isMenuBarEmbedded() ? embeddedForeground : activeForeground)
|
Color titleForeground = (hasEmbeddedMenuBar && active) ? FlatUIUtils.nonUIResource( embeddedForeground ) : foreground;
|
||||||
: inactiveForeground );
|
|
||||||
|
|
||||||
setBackground( background );
|
setBackground( background );
|
||||||
titleLabel.setForeground( foreground );
|
titleLabel.setForeground( titleForeground );
|
||||||
|
iconifyButton.setForeground( foreground );
|
||||||
|
maximizeButton.setForeground( foreground );
|
||||||
|
restoreButton.setForeground( foreground );
|
||||||
|
closeButton.setForeground( foreground );
|
||||||
|
|
||||||
|
titleLabel.setHorizontalAlignment( hasEmbeddedMenuBar ? SwingConstants.CENTER : SwingConstants.LEADING );
|
||||||
|
|
||||||
// this is necessary because hover/pressed colors are derived from background color
|
// this is necessary because hover/pressed colors are derived from background color
|
||||||
iconifyButton.setBackground( background );
|
iconifyButton.setBackground( background );
|
||||||
@@ -244,6 +271,26 @@ public class FlatTitlePane
|
|||||||
iconifyButton.setVisible( true );
|
iconifyButton.setVisible( true );
|
||||||
maximizeButton.setVisible( resizable && !maximized );
|
maximizeButton.setVisible( resizable && !maximized );
|
||||||
restoreButton.setVisible( resizable && maximized );
|
restoreButton.setVisible( resizable && maximized );
|
||||||
|
|
||||||
|
if( maximized &&
|
||||||
|
rootPane.getClientProperty( "_flatlaf.maximizedBoundsUpToDate" ) == null )
|
||||||
|
{
|
||||||
|
rootPane.putClientProperty( "_flatlaf.maximizedBoundsUpToDate", null );
|
||||||
|
|
||||||
|
// In case that frame was maximized from custom code (e.g. when restoring
|
||||||
|
// window state on application startup), then maximized bounds is not set
|
||||||
|
// and the window would overlap Windows task bar.
|
||||||
|
// To avoid this, update maximized bounds here and if it has changed
|
||||||
|
// re-maximize windows so that maximized bounds are used.
|
||||||
|
Rectangle oldMaximizedBounds = frame.getMaximizedBounds();
|
||||||
|
updateMaximizedBounds();
|
||||||
|
Rectangle newMaximizedBounds = frame.getMaximizedBounds();
|
||||||
|
if( newMaximizedBounds != null && !newMaximizedBounds.equals( oldMaximizedBounds ) ) {
|
||||||
|
int oldExtendedState = frame.getExtendedState();
|
||||||
|
frame.setExtendedState( oldExtendedState & ~Frame.MAXIMIZED_BOTH );
|
||||||
|
frame.setExtendedState( oldExtendedState );
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// hide buttons because they are only supported in frames
|
// hide buttons because they are only supported in frames
|
||||||
iconifyButton.setVisible( false );
|
iconifyButton.setVisible( false );
|
||||||
@@ -275,6 +322,8 @@ public class FlatTitlePane
|
|||||||
else {
|
else {
|
||||||
// no icon set on window --> use default icon
|
// no icon set on window --> use default icon
|
||||||
Icon defaultIcon = UIManager.getIcon( "InternalFrame.icon" );
|
Icon defaultIcon = UIManager.getIcon( "InternalFrame.icon" );
|
||||||
|
if( defaultIcon != null && (defaultIcon.getIconWidth() == 0 || defaultIcon.getIconHeight() == 0) )
|
||||||
|
defaultIcon = null;
|
||||||
if( defaultIcon != null ) {
|
if( defaultIcon != null ) {
|
||||||
if( defaultIcon instanceof ImageIcon )
|
if( defaultIcon instanceof ImageIcon )
|
||||||
defaultIcon = new ScaledImageIcon( (ImageIcon) defaultIcon, iconSize.width, iconSize.height );
|
defaultIcon = new ScaledImageIcon( (ImageIcon) defaultIcon, iconSize.width, iconSize.height );
|
||||||
@@ -364,6 +413,12 @@ public class FlatTitlePane
|
|||||||
return FlatUIUtils.subtractInsets( bounds, UIScale.scale( getMenuBarMargins() ) );
|
return FlatUIUtils.subtractInsets( bounds, UIScale.scale( getMenuBarMargins() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected Insets getMenuBarMargins() {
|
||||||
|
return getComponentOrientation().isLeftToRight()
|
||||||
|
? menuBarMargins
|
||||||
|
: new Insets( menuBarMargins.top, menuBarMargins.right, menuBarMargins.bottom, menuBarMargins.left );
|
||||||
|
}
|
||||||
|
|
||||||
protected void menuBarChanged() {
|
protected void menuBarChanged() {
|
||||||
menuBarPlaceholder.invalidate();
|
menuBarPlaceholder.invalidate();
|
||||||
|
|
||||||
@@ -373,18 +428,43 @@ public class FlatTitlePane
|
|||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Insets getMenuBarMargins() {
|
protected void menuBarLayouted() {
|
||||||
return getComponentOrientation().isLeftToRight()
|
updateJBRHitTestSpotsAndTitleBarHeightLater();
|
||||||
? menuBarMargins
|
|
||||||
: new Insets( menuBarMargins.top, menuBarMargins.right, menuBarMargins.bottom, menuBarMargins.left );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*debug
|
||||||
|
@Override
|
||||||
|
public void paint( Graphics g ) {
|
||||||
|
super.paint( g );
|
||||||
|
|
||||||
|
if( debugTitleBarHeight > 0 ) {
|
||||||
|
g.setColor( Color.green );
|
||||||
|
g.drawLine( 0, debugTitleBarHeight, getWidth(), debugTitleBarHeight );
|
||||||
|
}
|
||||||
|
if( debugHitTestSpots != null ) {
|
||||||
|
g.setColor( Color.blue );
|
||||||
|
for( Rectangle r : debugHitTestSpots )
|
||||||
|
g.drawRect( r.x, r.y, r.width, r.height );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
debug*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void paintComponent( Graphics g ) {
|
protected void paintComponent( Graphics g ) {
|
||||||
g.setColor( getBackground() );
|
g.setColor( getBackground() );
|
||||||
g.fillRect( 0, 0, getWidth(), getHeight() );
|
g.fillRect( 0, 0, getWidth(), getHeight() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void repaintWindowBorder() {
|
||||||
|
int width = rootPane.getWidth();
|
||||||
|
int height = rootPane.getHeight();
|
||||||
|
Insets insets = rootPane.getInsets();
|
||||||
|
rootPane.repaint( 0, 0, width, insets.top ); // top
|
||||||
|
rootPane.repaint( 0, 0, insets.left, height ); // left
|
||||||
|
rootPane.repaint( 0, height - insets.bottom, width, insets.bottom ); // bottom
|
||||||
|
rootPane.repaint( width - insets.right, 0, insets.right, height ); // right
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Iconifies the window.
|
* Iconifies the window.
|
||||||
*/
|
*/
|
||||||
@@ -404,11 +484,24 @@ public class FlatTitlePane
|
|||||||
|
|
||||||
Frame frame = (Frame) window;
|
Frame frame = (Frame) window;
|
||||||
|
|
||||||
|
updateMaximizedBounds();
|
||||||
|
|
||||||
|
// let our WindowStateListener know that the maximized bounds are up-to-date
|
||||||
|
rootPane.putClientProperty( "_flatlaf.maximizedBoundsUpToDate", true );
|
||||||
|
|
||||||
|
// maximize window
|
||||||
|
frame.setExtendedState( frame.getExtendedState() | Frame.MAXIMIZED_BOTH );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void updateMaximizedBounds() {
|
||||||
|
Frame frame = (Frame) window;
|
||||||
|
|
||||||
// set maximized bounds to avoid that maximized window overlaps Windows task bar
|
// set maximized bounds to avoid that maximized window overlaps Windows task bar
|
||||||
// (if not running in JBR and if not modified from the application)
|
// (if not running in JBR and if not modified from the application)
|
||||||
|
Rectangle oldMaximizedBounds = frame.getMaximizedBounds();
|
||||||
if( !hasJBRCustomDecoration() &&
|
if( !hasJBRCustomDecoration() &&
|
||||||
(frame.getMaximizedBounds() == null ||
|
(oldMaximizedBounds == null ||
|
||||||
Objects.equals( frame.getMaximizedBounds(), rootPane.getClientProperty( "_flatlaf.maximizedBounds" ) )) )
|
Objects.equals( oldMaximizedBounds, rootPane.getClientProperty( "_flatlaf.maximizedBounds" ) )) )
|
||||||
{
|
{
|
||||||
GraphicsConfiguration gc = window.getGraphicsConfiguration();
|
GraphicsConfiguration gc = window.getGraphicsConfiguration();
|
||||||
|
|
||||||
@@ -429,7 +522,7 @@ public class FlatTitlePane
|
|||||||
int maximizedWidth = screenBounds.width;
|
int maximizedWidth = screenBounds.width;
|
||||||
int maximizedHeight = screenBounds.height;
|
int maximizedHeight = screenBounds.height;
|
||||||
|
|
||||||
if( !SystemInfo.IS_JAVA_15_OR_LATER ) {
|
if( !isMaximizedBoundsFixed() ) {
|
||||||
// on Java 8 to 14, maximized x,y are 0,0 based on all screens in a multi-screen environment
|
// on Java 8 to 14, maximized x,y are 0,0 based on all screens in a multi-screen environment
|
||||||
maximizedX = 0;
|
maximizedX = 0;
|
||||||
maximizedY = 0;
|
maximizedY = 0;
|
||||||
@@ -449,22 +542,36 @@ public class FlatTitlePane
|
|||||||
// (see https://bugs.openjdk.java.net/browse/JDK-8231564 and
|
// (see https://bugs.openjdk.java.net/browse/JDK-8231564 and
|
||||||
// https://bugs.openjdk.java.net/browse/JDK-8176359)
|
// https://bugs.openjdk.java.net/browse/JDK-8176359)
|
||||||
// and except for Java 8 on secondary screens where primary screen is scaled
|
// and except for Java 8 on secondary screens where primary screen is scaled
|
||||||
Rectangle maximizedBounds = new Rectangle(
|
Rectangle newMaximizedBounds = new Rectangle(
|
||||||
maximizedX + screenInsets.left,
|
maximizedX + screenInsets.left,
|
||||||
maximizedY + screenInsets.top,
|
maximizedY + screenInsets.top,
|
||||||
maximizedWidth - screenInsets.left - screenInsets.right,
|
maximizedWidth - screenInsets.left - screenInsets.right,
|
||||||
maximizedHeight - screenInsets.top - screenInsets.bottom );
|
maximizedHeight - screenInsets.top - screenInsets.bottom );
|
||||||
|
|
||||||
// change maximized bounds
|
if( !Objects.equals( oldMaximizedBounds, newMaximizedBounds ) ) {
|
||||||
frame.setMaximizedBounds( maximizedBounds );
|
// change maximized bounds
|
||||||
|
frame.setMaximizedBounds( newMaximizedBounds );
|
||||||
|
|
||||||
// remember maximized bounds in client property to be able to detect
|
// remember maximized bounds in client property to be able to detect
|
||||||
// whether maximized bounds are modified from the application
|
// whether maximized bounds are modified from the application
|
||||||
rootPane.putClientProperty( "_flatlaf.maximizedBounds", maximizedBounds );
|
rootPane.putClientProperty( "_flatlaf.maximizedBounds", newMaximizedBounds );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// maximize window
|
/**
|
||||||
frame.setExtendedState( frame.getExtendedState() | Frame.MAXIMIZED_BOTH );
|
* Frame.setMaximizedBounds() behaves different on some Java versions after issues
|
||||||
|
* https://bugs.openjdk.java.net/browse/JDK-8231564 and
|
||||||
|
* https://bugs.openjdk.java.net/browse/JDK-8176359
|
||||||
|
* (see also https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8176359)
|
||||||
|
* were fixed in Java 15 and backported to 11.0.8 and 13.0.4.
|
||||||
|
*/
|
||||||
|
private boolean isMaximizedBoundsFixed() {
|
||||||
|
return SystemInfo.isJava_15_orLater ||
|
||||||
|
(SystemInfo.javaVersion >= SystemInfo.toVersion( 11, 0, 8, 0 ) &&
|
||||||
|
SystemInfo.javaVersion < SystemInfo.toVersion( 12, 0, 0, 0 )) ||
|
||||||
|
(SystemInfo.javaVersion >= SystemInfo.toVersion( 13, 0, 4, 0 ) &&
|
||||||
|
SystemInfo.javaVersion < SystemInfo.toVersion( 14, 0, 0, 0 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -519,6 +626,12 @@ public class FlatTitlePane
|
|||||||
titleBarHeight--;
|
titleBarHeight--;
|
||||||
|
|
||||||
JBRCustomDecorations.setHitTestSpotsAndTitleBarHeight( window, hitTestSpots, titleBarHeight );
|
JBRCustomDecorations.setHitTestSpotsAndTitleBarHeight( window, hitTestSpots, titleBarHeight );
|
||||||
|
|
||||||
|
/*debug
|
||||||
|
debugHitTestSpots = hitTestSpots;
|
||||||
|
debugTitleBarHeight = titleBarHeight;
|
||||||
|
repaint();
|
||||||
|
debug*/
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addJBRHitTestSpot( JComponent c, boolean subtractMenuBarMargins, List<Rectangle> hitTestSpots ) {
|
protected void addJBRHitTestSpot( JComponent c, boolean subtractMenuBarMargins, List<Rectangle> hitTestSpots ) {
|
||||||
@@ -535,6 +648,11 @@ public class FlatTitlePane
|
|||||||
hitTestSpots.add( r );
|
hitTestSpots.add( r );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*debug
|
||||||
|
private List<Rectangle> debugHitTestSpots;
|
||||||
|
private int debugTitleBarHeight;
|
||||||
|
debug*/
|
||||||
|
|
||||||
//---- class TitlePaneBorder ----------------------------------------------
|
//---- class TitlePaneBorder ----------------------------------------------
|
||||||
|
|
||||||
protected class FlatTitlePaneBorder
|
protected class FlatTitlePaneBorder
|
||||||
@@ -613,6 +731,8 @@ public class FlatTitlePane
|
|||||||
|
|
||||||
if( hasJBRCustomDecoration() )
|
if( hasJBRCustomDecoration() )
|
||||||
JBRWindowTopBorder.getInstance().repaintBorder( FlatTitlePane.this );
|
JBRWindowTopBorder.getInstance().repaintBorder( FlatTitlePane.this );
|
||||||
|
|
||||||
|
repaintWindowBorder();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -622,6 +742,8 @@ public class FlatTitlePane
|
|||||||
|
|
||||||
if( hasJBRCustomDecoration() )
|
if( hasJBRCustomDecoration() )
|
||||||
JBRWindowTopBorder.getInstance().repaintBorder( FlatTitlePane.this );
|
JBRWindowTopBorder.getInstance().repaintBorder( FlatTitlePane.this );
|
||||||
|
|
||||||
|
repaintWindowBorder();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -720,8 +842,13 @@ public class FlatTitlePane
|
|||||||
updateJBRHitTestSpotsAndTitleBarHeightLater();
|
updateJBRHitTestSpotsAndTitleBarHeightLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void componentShown( ComponentEvent e ) {
|
||||||
|
// necessary for the case that the frame is maximized before it is shown
|
||||||
|
frameStateChanged();
|
||||||
|
}
|
||||||
|
|
||||||
@Override public void componentMoved( ComponentEvent e ) {}
|
@Override public void componentMoved( ComponentEvent e ) {}
|
||||||
@Override public void componentShown( ComponentEvent e ) {}
|
|
||||||
@Override public void componentHidden( ComponentEvent e ) {}
|
@Override public void componentHidden( ComponentEvent e ) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import java.awt.Component;
|
|||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import javax.swing.AbstractButton;
|
import javax.swing.AbstractButton;
|
||||||
import javax.swing.ButtonModel;
|
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
import javax.swing.JToggleButton;
|
import javax.swing.JToggleButton;
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
@@ -50,18 +49,17 @@ import com.formdev.flatlaf.util.UIScale;
|
|||||||
* @uiDefault ToggleButton.startBackground Color optional; if set, a gradient paint is used and ToggleButton.background is ignored
|
* @uiDefault ToggleButton.startBackground Color optional; if set, a gradient paint is used and ToggleButton.background is ignored
|
||||||
* @uiDefault ToggleButton.endBackground Color optional; if set, a gradient paint is used
|
* @uiDefault ToggleButton.endBackground Color optional; if set, a gradient paint is used
|
||||||
* @uiDefault ToggleButton.pressedBackground Color
|
* @uiDefault ToggleButton.pressedBackground Color
|
||||||
* @uiDefault ToggleButton.disabledBackground Color optional
|
|
||||||
* @uiDefault ToggleButton.disabledText Color
|
|
||||||
* @uiDefault ToggleButton.toolbar.hoverBackground Color
|
|
||||||
* @uiDefault ToggleButton.toolbar.pressedBackground Color
|
|
||||||
*
|
|
||||||
* <!-- FlatToggleButtonUI -->
|
|
||||||
*
|
|
||||||
* @uiDefault ToggleButton.selectedBackground Color
|
* @uiDefault ToggleButton.selectedBackground Color
|
||||||
* @uiDefault ToggleButton.selectedForeground Color
|
* @uiDefault ToggleButton.selectedForeground Color
|
||||||
|
* @uiDefault ToggleButton.disabledBackground Color optional
|
||||||
|
* @uiDefault ToggleButton.disabledText Color
|
||||||
* @uiDefault ToggleButton.disabledSelectedBackground Color
|
* @uiDefault ToggleButton.disabledSelectedBackground Color
|
||||||
|
* @uiDefault ToggleButton.toolbar.hoverBackground Color
|
||||||
|
* @uiDefault ToggleButton.toolbar.pressedBackground Color
|
||||||
* @uiDefault ToggleButton.toolbar.selectedBackground Color
|
* @uiDefault ToggleButton.toolbar.selectedBackground Color
|
||||||
*
|
*
|
||||||
|
* <!-- FlatToggleButtonUI -->
|
||||||
|
*
|
||||||
* @uiDefault ToggleButton.tab.underlineHeight int
|
* @uiDefault ToggleButton.tab.underlineHeight int
|
||||||
* @uiDefault ToggleButton.tab.underlineColor Color
|
* @uiDefault ToggleButton.tab.underlineColor Color
|
||||||
* @uiDefault ToggleButton.tab.disabledUnderlineColor Color
|
* @uiDefault ToggleButton.tab.disabledUnderlineColor Color
|
||||||
@@ -75,12 +73,6 @@ import com.formdev.flatlaf.util.UIScale;
|
|||||||
public class FlatToggleButtonUI
|
public class FlatToggleButtonUI
|
||||||
extends FlatButtonUI
|
extends FlatButtonUI
|
||||||
{
|
{
|
||||||
protected Color selectedBackground;
|
|
||||||
protected Color selectedForeground;
|
|
||||||
protected Color disabledSelectedBackground;
|
|
||||||
|
|
||||||
protected Color toolbarSelectedBackground;
|
|
||||||
|
|
||||||
protected int tabUnderlineHeight;
|
protected int tabUnderlineHeight;
|
||||||
protected Color tabUnderlineColor;
|
protected Color tabUnderlineColor;
|
||||||
protected Color tabDisabledUnderlineColor;
|
protected Color tabDisabledUnderlineColor;
|
||||||
@@ -108,12 +100,6 @@ public class FlatToggleButtonUI
|
|||||||
super.installDefaults( b );
|
super.installDefaults( b );
|
||||||
|
|
||||||
if( !defaults_initialized ) {
|
if( !defaults_initialized ) {
|
||||||
selectedBackground = UIManager.getColor( "ToggleButton.selectedBackground" );
|
|
||||||
selectedForeground = UIManager.getColor( "ToggleButton.selectedForeground" );
|
|
||||||
disabledSelectedBackground = UIManager.getColor( "ToggleButton.disabledSelectedBackground" );
|
|
||||||
|
|
||||||
toolbarSelectedBackground = UIManager.getColor( "ToggleButton.toolbar.selectedBackground" );
|
|
||||||
|
|
||||||
tabUnderlineHeight = UIManager.getInt( "ToggleButton.tab.underlineHeight" );
|
tabUnderlineHeight = UIManager.getInt( "ToggleButton.tab.underlineHeight" );
|
||||||
tabUnderlineColor = UIManager.getColor( "ToggleButton.tab.underlineColor" );
|
tabUnderlineColor = UIManager.getColor( "ToggleButton.tab.underlineColor" );
|
||||||
tabDisabledUnderlineColor = UIManager.getColor( "ToggleButton.tab.disabledUnderlineColor" );
|
tabDisabledUnderlineColor = UIManager.getColor( "ToggleButton.tab.disabledUnderlineColor" );
|
||||||
@@ -185,30 +171,4 @@ public class FlatToggleButtonUI
|
|||||||
} else
|
} else
|
||||||
super.paintBackground( g, c );
|
super.paintBackground( g, c );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Color getBackground( JComponent c ) {
|
|
||||||
ButtonModel model = ((AbstractButton)c).getModel();
|
|
||||||
|
|
||||||
if( model.isSelected() ) {
|
|
||||||
// in toolbar use same colors for disabled and enabled because
|
|
||||||
// we assume that toolbar icon is shown disabled
|
|
||||||
boolean toolBarButton = isToolBarButton( c );
|
|
||||||
return buttonStateColor( c,
|
|
||||||
toolBarButton ? toolbarSelectedBackground : selectedBackground,
|
|
||||||
toolBarButton ? toolbarSelectedBackground : disabledSelectedBackground,
|
|
||||||
null, null,
|
|
||||||
toolBarButton ? toolbarPressedBackground : pressedBackground );
|
|
||||||
}
|
|
||||||
|
|
||||||
return super.getBackground( c );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Color getForeground( JComponent c ) {
|
|
||||||
if( c.isEnabled() && ((AbstractButton)c).isSelected() && !isToolBarButton( c ) )
|
|
||||||
return selectedForeground;
|
|
||||||
|
|
||||||
return super.getForeground( c );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,6 +94,11 @@ public class FlatToolTipUI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dimension getPreferredSize( JComponent c ) {
|
public Dimension getPreferredSize( JComponent c ) {
|
||||||
|
// do not show tool tip if text is empty
|
||||||
|
String text = ((JToolTip)c).getTipText();
|
||||||
|
if( text == null || text.isEmpty() )
|
||||||
|
return new Dimension();
|
||||||
|
|
||||||
if( isMultiLine( c ) ) {
|
if( isMultiLine( c ) ) {
|
||||||
FontMetrics fm = c.getFontMetrics( c.getFont() );
|
FontMetrics fm = c.getFontMetrics( c.getFont() );
|
||||||
Insets insets = c.getInsets();
|
Insets insets = c.getInsets();
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import java.awt.event.MouseEvent;
|
|||||||
import java.awt.event.MouseListener;
|
import java.awt.event.MouseListener;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
|
import javax.swing.CellRendererPane;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
import javax.swing.JTree;
|
import javax.swing.JTree;
|
||||||
import javax.swing.LookAndFeel;
|
import javax.swing.LookAndFeel;
|
||||||
@@ -75,6 +76,11 @@ import com.formdev.flatlaf.util.UIScale;
|
|||||||
* @uiDefault Tree.dropCellBackground Color
|
* @uiDefault Tree.dropCellBackground Color
|
||||||
* @uiDefault Tree.dropCellForeground Color
|
* @uiDefault Tree.dropCellForeground Color
|
||||||
*
|
*
|
||||||
|
* <!-- DefaultTreeCellEditor -->
|
||||||
|
*
|
||||||
|
* @uiDefault Tree.editorBorder Border
|
||||||
|
* @uiDefault Tree.editorBorderSelectionColor Color
|
||||||
|
*
|
||||||
* <!-- FlatTreeUI -->
|
* <!-- FlatTreeUI -->
|
||||||
*
|
*
|
||||||
* @uiDefault Tree.border Border
|
* @uiDefault Tree.border Border
|
||||||
@@ -226,6 +232,11 @@ public class FlatTreeUI
|
|||||||
boolean isSelected = tree.isRowSelected( row );
|
boolean isSelected = tree.isRowSelected( row );
|
||||||
boolean isDropRow = isDropRow( row );
|
boolean isDropRow = isDropRow( row );
|
||||||
|
|
||||||
|
// if tree is used as cell renderer in another component (e.g. in Rhino JavaScript debugger),
|
||||||
|
// check whether that component is focused to get correct selection colors
|
||||||
|
if( !hasFocus && isSelected && tree.getParent() instanceof CellRendererPane )
|
||||||
|
hasFocus = FlatUIUtils.isPermanentFocusOwner( tree.getParent().getParent() );
|
||||||
|
|
||||||
// wide selection background
|
// wide selection background
|
||||||
if( wideSelection && (isSelected || isDropRow) ) {
|
if( wideSelection && (isSelected || isDropRow) ) {
|
||||||
// fill background
|
// fill background
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ import java.awt.geom.Rectangle2D;
|
|||||||
import java.awt.geom.RoundRectangle2D;
|
import java.awt.geom.RoundRectangle2D;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
|
import javax.swing.JTable;
|
||||||
import javax.swing.LookAndFeel;
|
import javax.swing.LookAndFeel;
|
||||||
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
import javax.swing.border.Border;
|
import javax.swing.border.Border;
|
||||||
import javax.swing.border.CompoundBorder;
|
import javax.swing.border.CompoundBorder;
|
||||||
@@ -135,17 +137,44 @@ public class FlatUIUtils
|
|||||||
return FlatClientProperties.clientPropertyInt( c, FlatClientProperties.MINIMUM_HEIGHT, minimumHeight );
|
return FlatClientProperties.clientPropertyInt( c, FlatClientProperties.MINIMUM_HEIGHT, minimumHeight );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isTableCellEditor( Component c ) {
|
public static boolean isCellEditor( Component c ) {
|
||||||
|
// check whether used in cell editor (check 3 levels up)
|
||||||
|
Component c2 = c;
|
||||||
|
for( int i = 0; i <= 2 && c2 != null; i++ ) {
|
||||||
|
Container parent = c2.getParent();
|
||||||
|
if( parent instanceof JTable && ((JTable)parent).getEditorComponent() == c2 )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
c2 = parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
// check whether used as cell editor
|
||||||
|
// Table.editor is set in JTable.GenericEditor constructor
|
||||||
|
// Tree.cellEditor is set in sun.swing.FilePane.editFileName()
|
||||||
|
String name = c.getName();
|
||||||
|
if( "Table.editor".equals( name ) || "Tree.cellEditor".equals( name ) )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// for using combo box as cell editor in table
|
||||||
|
// JComboBox.isTableCellEditor is set in javax.swing.DefaultCellEditor(JComboBox) constructor
|
||||||
return c instanceof JComponent && Boolean.TRUE.equals( ((JComponent)c).getClientProperty( "JComboBox.isTableCellEditor" ) );
|
return c instanceof JComponent && Boolean.TRUE.equals( ((JComponent)c).getClientProperty( "JComboBox.isTableCellEditor" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether the given component is the permanent focus owner and
|
||||||
|
* is in the active window. Used to paint focus indicators.
|
||||||
|
*/
|
||||||
public static boolean isPermanentFocusOwner( Component c ) {
|
public static boolean isPermanentFocusOwner( Component c ) {
|
||||||
return (KeyboardFocusManager.getCurrentKeyboardFocusManager().getPermanentFocusOwner() == c);
|
KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
|
||||||
|
return keyboardFocusManager.getPermanentFocusOwner() == c &&
|
||||||
|
keyboardFocusManager.getActiveWindow() == SwingUtilities.windowForComponent( c );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isRoundRect( Component c ) {
|
public static Boolean isRoundRect( Component c ) {
|
||||||
return c instanceof JComponent && FlatClientProperties.clientPropertyBoolean(
|
return (c instanceof JComponent)
|
||||||
(JComponent) c, FlatClientProperties.COMPONENT_ROUND_RECT, false );
|
? FlatClientProperties.clientPropertyBooleanStrict(
|
||||||
|
(JComponent) c, FlatClientProperties.COMPONENT_ROUND_RECT, null )
|
||||||
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -203,7 +232,7 @@ public class FlatUIUtils
|
|||||||
* Paints an outer border, which is usually a focus border.
|
* Paints an outer border, which is usually a focus border.
|
||||||
* <p>
|
* <p>
|
||||||
* The outside bounds of the painted border are {@code x,y,width,height}.
|
* The outside bounds of the painted border are {@code x,y,width,height}.
|
||||||
* The line width of the painted border is {@code focusWidth + lineWidth}.
|
* The line thickness of the painted border is {@code focusWidth + lineWidth}.
|
||||||
* The given arc diameter refers to the inner rectangle ({@code x,y,width,height} minus {@code focusWidth}).
|
* The given arc diameter refers to the inner rectangle ({@code x,y,width,height} minus {@code focusWidth}).
|
||||||
*
|
*
|
||||||
* @see #paintComponentBorder
|
* @see #paintComponentBorder
|
||||||
@@ -212,6 +241,9 @@ public class FlatUIUtils
|
|||||||
public static void paintComponentOuterBorder( Graphics2D g, int x, int y, int width, int height,
|
public static void paintComponentOuterBorder( Graphics2D g, int x, int y, int width, int height,
|
||||||
float focusWidth, float lineWidth, float arc )
|
float focusWidth, float lineWidth, float arc )
|
||||||
{
|
{
|
||||||
|
if( focusWidth + lineWidth == 0 )
|
||||||
|
return; // nothing to paint
|
||||||
|
|
||||||
double systemScaleFactor = UIScale.getSystemScaleFactor( g );
|
double systemScaleFactor = UIScale.getSystemScaleFactor( g );
|
||||||
if( systemScaleFactor != 1 && systemScaleFactor != 2 ) {
|
if( systemScaleFactor != 1 && systemScaleFactor != 2 ) {
|
||||||
// paint at scale 1x to avoid clipping on right and bottom edges at 125%, 150% or 175%
|
// paint at scale 1x to avoid clipping on right and bottom edges at 125%, 150% or 175%
|
||||||
@@ -248,6 +280,7 @@ public class FlatUIUtils
|
|||||||
* <p>
|
* <p>
|
||||||
* The outside bounds of the painted border are
|
* The outside bounds of the painted border are
|
||||||
* {@code x + focusWidth, y + focusWidth, width - (focusWidth * 2), height - (focusWidth * 2)}.
|
* {@code x + focusWidth, y + focusWidth, width - (focusWidth * 2), height - (focusWidth * 2)}.
|
||||||
|
* The line thickness of the painted border is {@code lineWidth}.
|
||||||
* The given arc diameter refers to the painted rectangle (and not to {@code x,y,width,height}).
|
* The given arc diameter refers to the painted rectangle (and not to {@code x,y,width,height}).
|
||||||
*
|
*
|
||||||
* @see #paintComponentOuterBorder
|
* @see #paintComponentOuterBorder
|
||||||
@@ -256,6 +289,9 @@ public class FlatUIUtils
|
|||||||
public static void paintComponentBorder( Graphics2D g, int x, int y, int width, int height,
|
public static void paintComponentBorder( Graphics2D g, int x, int y, int width, int height,
|
||||||
float focusWidth, float lineWidth, float arc )
|
float focusWidth, float lineWidth, float arc )
|
||||||
{
|
{
|
||||||
|
if( lineWidth == 0 )
|
||||||
|
return; // nothing to paint
|
||||||
|
|
||||||
double systemScaleFactor = UIScale.getSystemScaleFactor( g );
|
double systemScaleFactor = UIScale.getSystemScaleFactor( g );
|
||||||
if( systemScaleFactor != 1 && systemScaleFactor != 2 ) {
|
if( systemScaleFactor != 1 && systemScaleFactor != 2 ) {
|
||||||
// paint at scale 1x to avoid clipping on right and bottom edges at 125%, 150% or 175%
|
// paint at scale 1x to avoid clipping on right and bottom edges at 125%, 150% or 175%
|
||||||
|
|||||||
@@ -17,8 +17,6 @@
|
|||||||
package com.formdev.flatlaf.ui;
|
package com.formdev.flatlaf.ui;
|
||||||
|
|
||||||
import static java.awt.Cursor.*;
|
import static java.awt.Cursor.*;
|
||||||
import java.awt.BorderLayout;
|
|
||||||
import java.awt.Component;
|
|
||||||
import java.awt.Container;
|
import java.awt.Container;
|
||||||
import java.awt.Dialog;
|
import java.awt.Dialog;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
@@ -48,33 +46,43 @@ import com.formdev.flatlaf.util.UIScale;
|
|||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
*/
|
*/
|
||||||
public class FlatWindowResizer
|
public class FlatWindowResizer
|
||||||
extends JComponent
|
|
||||||
implements PropertyChangeListener, WindowStateListener, ComponentListener
|
implements PropertyChangeListener, WindowStateListener, ComponentListener
|
||||||
{
|
{
|
||||||
private final static Integer WINDOW_RESIZER_LAYER = JLayeredPane.DRAG_LAYER + 1;
|
protected final static Integer WINDOW_RESIZER_LAYER = JLayeredPane.DRAG_LAYER + 1;
|
||||||
|
|
||||||
private final JRootPane rootPane;
|
protected final JRootPane rootPane;
|
||||||
|
|
||||||
private final int borderDragThickness = FlatUIUtils.getUIInt( "RootPane.borderDragThickness", 5 );
|
protected final int borderDragThickness = FlatUIUtils.getUIInt( "RootPane.borderDragThickness", 5 );
|
||||||
private final int cornerDragWidth = FlatUIUtils.getUIInt( "RootPane.cornerDragWidth", 16 );
|
protected final int cornerDragWidth = FlatUIUtils.getUIInt( "RootPane.cornerDragWidth", 16 );
|
||||||
private final boolean honorMinimumSizeOnResize = UIManager.getBoolean( "RootPane.honorMinimumSizeOnResize" );
|
protected final boolean honorFrameMinimumSizeOnResize = UIManager.getBoolean( "RootPane.honorFrameMinimumSizeOnResize" );
|
||||||
|
protected final boolean honorDialogMinimumSizeOnResize = UIManager.getBoolean( "RootPane.honorDialogMinimumSizeOnResize" );
|
||||||
|
|
||||||
private Window window;
|
protected final JComponent north;
|
||||||
|
protected final JComponent south;
|
||||||
|
protected final JComponent west;
|
||||||
|
protected final JComponent east;
|
||||||
|
|
||||||
|
protected Window window;
|
||||||
|
|
||||||
public FlatWindowResizer( JRootPane rootPane ) {
|
public FlatWindowResizer( JRootPane rootPane ) {
|
||||||
this.rootPane = rootPane;
|
this.rootPane = rootPane;
|
||||||
|
|
||||||
setLayout( new BorderLayout() );
|
north = createDragBorderComponent( NW_RESIZE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR );
|
||||||
add( createDragBorderComponent( NW_RESIZE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR ), BorderLayout.NORTH );
|
south = createDragBorderComponent( SW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR );
|
||||||
add( createDragBorderComponent( SW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR ), BorderLayout.SOUTH );
|
west = createDragBorderComponent( NW_RESIZE_CURSOR, W_RESIZE_CURSOR, SW_RESIZE_CURSOR );
|
||||||
add( createDragBorderComponent( NW_RESIZE_CURSOR, W_RESIZE_CURSOR, SW_RESIZE_CURSOR ), BorderLayout.WEST );
|
east = createDragBorderComponent( NE_RESIZE_CURSOR, E_RESIZE_CURSOR, SE_RESIZE_CURSOR );
|
||||||
add( createDragBorderComponent( NE_RESIZE_CURSOR, E_RESIZE_CURSOR, SE_RESIZE_CURSOR ), BorderLayout.EAST );
|
|
||||||
|
JLayeredPane layeredPane = rootPane.getLayeredPane();
|
||||||
|
layeredPane.add( north, WINDOW_RESIZER_LAYER );
|
||||||
|
layeredPane.add( south, WINDOW_RESIZER_LAYER );
|
||||||
|
layeredPane.add( west, WINDOW_RESIZER_LAYER );
|
||||||
|
layeredPane.add( east, WINDOW_RESIZER_LAYER );
|
||||||
|
|
||||||
rootPane.addComponentListener( this );
|
rootPane.addComponentListener( this );
|
||||||
rootPane.getLayeredPane().add( this, WINDOW_RESIZER_LAYER );
|
rootPane.addPropertyChangeListener( "ancestor", this );
|
||||||
|
|
||||||
if( rootPane.isDisplayable() )
|
if( rootPane.isDisplayable() )
|
||||||
setBounds( 0, 0, rootPane.getWidth(), rootPane.getHeight() );
|
addNotify();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected DragBorderComponent createDragBorderComponent( int leadingResizeDir, int centerResizeDir, int trailingResizeDir ) {
|
protected DragBorderComponent createDragBorderComponent( int leadingResizeDir, int centerResizeDir, int trailingResizeDir ) {
|
||||||
@@ -82,14 +90,40 @@ public class FlatWindowResizer
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void uninstall() {
|
public void uninstall() {
|
||||||
|
removeNotify();
|
||||||
|
|
||||||
rootPane.removeComponentListener( this );
|
rootPane.removeComponentListener( this );
|
||||||
rootPane.getLayeredPane().remove( this );
|
rootPane.removePropertyChangeListener( "ancestor", this );
|
||||||
|
|
||||||
|
JLayeredPane layeredPane = rootPane.getLayeredPane();
|
||||||
|
layeredPane.remove( north );
|
||||||
|
layeredPane.remove( south );
|
||||||
|
layeredPane.remove( west );
|
||||||
|
layeredPane.remove( east );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void doLayout() {
|
||||||
public void addNotify() {
|
if( !north.isVisible() )
|
||||||
super.addNotify();
|
return;
|
||||||
|
|
||||||
|
int x = 0;
|
||||||
|
int y = 0;
|
||||||
|
int width = rootPane.getWidth();
|
||||||
|
int height = rootPane.getHeight();
|
||||||
|
if( width == 0 || height == 0 )
|
||||||
|
return;
|
||||||
|
|
||||||
|
int thickness = UIScale.scale( borderDragThickness );
|
||||||
|
int y2 = y + thickness;
|
||||||
|
int height2 = height - (thickness * 2);
|
||||||
|
|
||||||
|
north.setBounds( x, y, width, thickness );
|
||||||
|
south.setBounds( x, y + height - thickness, width, thickness );
|
||||||
|
west.setBounds( x, y2, thickness, height2 );
|
||||||
|
east.setBounds( x + width - thickness, y2, thickness, height2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addNotify() {
|
||||||
Container parent = rootPane.getParent();
|
Container parent = rootPane.getParent();
|
||||||
window = (parent instanceof Window) ? (Window) parent : null;
|
window = (parent instanceof Window) ? (Window) parent : null;
|
||||||
if( window instanceof Frame ) {
|
if( window instanceof Frame ) {
|
||||||
@@ -100,10 +134,7 @@ public class FlatWindowResizer
|
|||||||
updateVisibility();
|
updateVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
protected void removeNotify() {
|
||||||
public void removeNotify() {
|
|
||||||
super.removeNotify();
|
|
||||||
|
|
||||||
if( window instanceof Frame ) {
|
if( window instanceof Frame ) {
|
||||||
window.removePropertyChangeListener( "resizable", this );
|
window.removePropertyChangeListener( "resizable", this );
|
||||||
window.removeWindowStateListener( this );
|
window.removeWindowStateListener( this );
|
||||||
@@ -113,25 +144,26 @@ public class FlatWindowResizer
|
|||||||
updateVisibility();
|
updateVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
protected void updateVisibility() {
|
||||||
protected void paintChildren( Graphics g ) {
|
|
||||||
super.paintChildren( g );
|
|
||||||
|
|
||||||
// this is necessary because Dialog.setResizable() does not fire events
|
|
||||||
if( window instanceof Dialog )
|
|
||||||
updateVisibility();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateVisibility() {
|
|
||||||
boolean visible = isWindowResizable();
|
boolean visible = isWindowResizable();
|
||||||
if( visible == getComponent( 0 ).isVisible() )
|
if( visible == north.isVisible() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for( Component c : getComponents() )
|
north.setVisible( visible );
|
||||||
c.setVisible( visible );
|
south.setVisible( visible );
|
||||||
|
west.setVisible( visible );
|
||||||
|
|
||||||
|
// The east component is not hidden, instead its bounds are set to 0,0,1,1 and
|
||||||
|
// it is disabled. This is necessary so that DragBorderComponent.paintComponent() is invoked.
|
||||||
|
east.setEnabled( visible );
|
||||||
|
if( visible ) {
|
||||||
|
east.setVisible( true ); // necessary because it is initially invisible
|
||||||
|
doLayout();
|
||||||
|
} else
|
||||||
|
east.setBounds( 0, 0, 1, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isWindowResizable() {
|
protected boolean isWindowResizable() {
|
||||||
if( window instanceof Frame )
|
if( window instanceof Frame )
|
||||||
return ((Frame)window).isResizable() && (((Frame)window).getExtendedState() & Frame.MAXIMIZED_BOTH) == 0;
|
return ((Frame)window).isResizable() && (((Frame)window).getExtendedState() & Frame.MAXIMIZED_BOTH) == 0;
|
||||||
if( window instanceof Dialog )
|
if( window instanceof Dialog )
|
||||||
@@ -141,7 +173,18 @@ public class FlatWindowResizer
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void propertyChange( PropertyChangeEvent e ) {
|
public void propertyChange( PropertyChangeEvent e ) {
|
||||||
updateVisibility();
|
switch( e.getPropertyName() ) {
|
||||||
|
case "ancestor":
|
||||||
|
if( e.getNewValue() != null )
|
||||||
|
addNotify();
|
||||||
|
else
|
||||||
|
removeNotify();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "resizable":
|
||||||
|
updateVisibility();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -151,8 +194,7 @@ public class FlatWindowResizer
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void componentResized( ComponentEvent e ) {
|
public void componentResized( ComponentEvent e ) {
|
||||||
setBounds( 0, 0, rootPane.getWidth(), rootPane.getHeight() );
|
doLayout();
|
||||||
validate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void componentMoved( ComponentEvent e ) {}
|
@Override public void componentMoved( ComponentEvent e ) {}
|
||||||
@@ -200,13 +242,19 @@ public class FlatWindowResizer
|
|||||||
return new Dimension( thickness, thickness );
|
return new Dimension( thickness, thickness );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*debug
|
|
||||||
@Override
|
@Override
|
||||||
protected void paintComponent( Graphics g ) {
|
protected void paintComponent( Graphics g ) {
|
||||||
|
super.paintChildren( g );
|
||||||
|
|
||||||
|
// this is necessary because Dialog.setResizable() does not fire events
|
||||||
|
if( window instanceof Dialog )
|
||||||
|
updateVisibility();
|
||||||
|
|
||||||
|
/*debug
|
||||||
g.setColor( java.awt.Color.red );
|
g.setColor( java.awt.Color.red );
|
||||||
g.drawRect( 0, 0, getWidth() - 1, getHeight() - 1 );
|
g.drawRect( 0, 0, getWidth() - 1, getHeight() - 1 );
|
||||||
}
|
|
||||||
debug*/
|
debug*/
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked( MouseEvent e ) {
|
public void mouseClicked( MouseEvent e ) {
|
||||||
@@ -293,6 +341,9 @@ debug*/
|
|||||||
newBounds.height += deltaHeight;
|
newBounds.height += deltaHeight;
|
||||||
|
|
||||||
// apply minimum window size
|
// apply minimum window size
|
||||||
|
boolean honorMinimumSizeOnResize =
|
||||||
|
(honorFrameMinimumSizeOnResize && window instanceof Frame) ||
|
||||||
|
(honorDialogMinimumSizeOnResize && window instanceof Dialog);
|
||||||
Dimension minimumSize = honorMinimumSizeOnResize ? window.getMinimumSize() : null;
|
Dimension minimumSize = honorMinimumSizeOnResize ? window.getMinimumSize() : null;
|
||||||
if( minimumSize == null )
|
if( minimumSize == null )
|
||||||
minimumSize = UIScale.scale( new Dimension( 150, 50 ) );
|
minimumSize = UIScale.scale( new Dimension( 150, 50 ) );
|
||||||
@@ -312,8 +363,7 @@ debug*/
|
|||||||
window.setBounds( newBounds );
|
window.setBounds( newBounds );
|
||||||
|
|
||||||
// immediately layout drag border components
|
// immediately layout drag border components
|
||||||
FlatWindowResizer.this.setBounds( 0, 0, newBounds.width, newBounds.height );
|
FlatWindowResizer.this.doLayout();
|
||||||
FlatWindowResizer.this.validate();
|
|
||||||
|
|
||||||
if( Toolkit.getDefaultToolkit().isDynamicLayoutActive() ) {
|
if( Toolkit.getDefaultToolkit().isDynamicLayoutActive() ) {
|
||||||
window.validate();
|
window.validate();
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ public class JBRCustomDecorations
|
|||||||
initialized = true;
|
initialized = true;
|
||||||
|
|
||||||
// requires JetBrains Runtime 11 and Windows 10
|
// requires JetBrains Runtime 11 and Windows 10
|
||||||
if( !SystemInfo.IS_JETBRAINS_JVM_11_OR_LATER || !SystemInfo.IS_WINDOWS_10_OR_LATER )
|
if( !SystemInfo.isJetBrainsJVM_11_orLater || !SystemInfo.isWindows_10_orLater )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( !FlatSystemProperties.getBoolean( FlatSystemProperties.USE_JETBRAINS_CUSTOM_DECORATIONS, true ) )
|
if( !FlatSystemProperties.getBoolean( FlatSystemProperties.USE_JETBRAINS_CUSTOM_DECORATIONS, true ) )
|
||||||
|
|||||||
@@ -0,0 +1,317 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 FormDev Software GmbH
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.formdev.flatlaf.util;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import javax.swing.Timer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple animator based on ideas and concepts from "Filthy Rich Clients" book
|
||||||
|
* and "Timing Framework" library.
|
||||||
|
*
|
||||||
|
* @author Karl Tauber
|
||||||
|
*/
|
||||||
|
public class Animator
|
||||||
|
{
|
||||||
|
private int duration;
|
||||||
|
private int resolution = 10;
|
||||||
|
private Interpolator interpolator;
|
||||||
|
private final ArrayList<TimingTarget> targets = new ArrayList<>();
|
||||||
|
private final Runnable endRunnable;
|
||||||
|
|
||||||
|
private boolean running;
|
||||||
|
private boolean hasBegun;
|
||||||
|
private boolean timeToStop;
|
||||||
|
private long startTime;
|
||||||
|
private Timer timer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an animation that runs duration milliseconds.
|
||||||
|
* Use {@link #addTarget(TimingTarget)} to receive timing events
|
||||||
|
* and {@link #start()} to start the animation.
|
||||||
|
*
|
||||||
|
* @param duration the duration of the animation in milliseconds
|
||||||
|
*/
|
||||||
|
public Animator( int duration ) {
|
||||||
|
this( duration, null, null );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an animation that runs duration milliseconds.
|
||||||
|
* Use {@link #start()} to start the animation.
|
||||||
|
*
|
||||||
|
* @param duration the duration of the animation in milliseconds
|
||||||
|
* @param target the target that receives timing events
|
||||||
|
*/
|
||||||
|
public Animator( int duration, TimingTarget target ) {
|
||||||
|
this( duration, target, null );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an animation that runs duration milliseconds.
|
||||||
|
* Use {@link #start()} to start the animation.
|
||||||
|
*
|
||||||
|
* @param duration the duration of the animation in milliseconds
|
||||||
|
* @param target the target that receives timing events
|
||||||
|
* @param endRunnable a runnable invoked when the animation ends; or {@code null}
|
||||||
|
*/
|
||||||
|
public Animator( int duration, TimingTarget target, Runnable endRunnable ) {
|
||||||
|
setDuration( duration );
|
||||||
|
addTarget( target );
|
||||||
|
this.endRunnable = endRunnable;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the duration of the animation in milliseconds.
|
||||||
|
*/
|
||||||
|
public int getDuration() {
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the duration of the animation in milliseconds.
|
||||||
|
*
|
||||||
|
* @throws IllegalStateException if animation is running
|
||||||
|
* @throws IllegalArgumentException if duration is <= zero
|
||||||
|
*/
|
||||||
|
public void setDuration( int duration ) {
|
||||||
|
throwExceptionIfRunning();
|
||||||
|
if( duration <= 0 )
|
||||||
|
throw new IllegalArgumentException();
|
||||||
|
this.duration = duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the resolution of the animation in milliseconds (default is 10).
|
||||||
|
* Resolution is the amount of time between timing events.
|
||||||
|
*/
|
||||||
|
public int getResolution() {
|
||||||
|
return resolution;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the resolution of the animation in milliseconds.
|
||||||
|
*
|
||||||
|
* @param resolution the resolution of the animation in milliseconds
|
||||||
|
* @throws IllegalStateException if animation is running
|
||||||
|
* @throws IllegalArgumentException if resolution is <= zero
|
||||||
|
*/
|
||||||
|
public void setResolution( int resolution ) {
|
||||||
|
throwExceptionIfRunning();
|
||||||
|
if( resolution <= 0 )
|
||||||
|
throw new IllegalArgumentException();
|
||||||
|
this.resolution = resolution;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the interpolator for the animation.
|
||||||
|
* Default is {@code null}, which means linear.
|
||||||
|
*/
|
||||||
|
public Interpolator getInterpolator() {
|
||||||
|
return interpolator;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the interpolator for the animation.
|
||||||
|
*
|
||||||
|
* @throws IllegalStateException if animation is running
|
||||||
|
*/
|
||||||
|
public void setInterpolator( Interpolator interpolator ) {
|
||||||
|
throwExceptionIfRunning();
|
||||||
|
this.interpolator = interpolator;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a target to the animation that receives timing events.
|
||||||
|
*
|
||||||
|
* @param target the target that receives timing events
|
||||||
|
*/
|
||||||
|
public void addTarget( TimingTarget target ) {
|
||||||
|
if( target == null )
|
||||||
|
return;
|
||||||
|
|
||||||
|
synchronized( targets ) {
|
||||||
|
if( !targets.contains( target ) )
|
||||||
|
targets.add( target );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes a target from the animation.
|
||||||
|
*
|
||||||
|
* @param target the target that should be removed
|
||||||
|
*/
|
||||||
|
public void removeTarget( TimingTarget target ) {
|
||||||
|
synchronized( targets ) {
|
||||||
|
targets.remove( target );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starts the animation.
|
||||||
|
*
|
||||||
|
* @throws IllegalStateException if animation is running
|
||||||
|
*/
|
||||||
|
public void start() {
|
||||||
|
throwExceptionIfRunning();
|
||||||
|
|
||||||
|
running = true;
|
||||||
|
hasBegun = false;
|
||||||
|
timeToStop = false;
|
||||||
|
startTime = System.nanoTime() / 1000000;
|
||||||
|
|
||||||
|
timer = new Timer( resolution, e -> {
|
||||||
|
if( !hasBegun ) {
|
||||||
|
begin();
|
||||||
|
hasBegun = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
timingEvent( getTimingFraction() );
|
||||||
|
} );
|
||||||
|
timer.setInitialDelay( 0 );
|
||||||
|
timer.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stops the animation before it normally ends.
|
||||||
|
* Invokes {@link TimingTarget#end()} on timing targets.
|
||||||
|
*/
|
||||||
|
public void stop() {
|
||||||
|
stop( false );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cancels the animation before it normally ends.
|
||||||
|
* Does not invoke {@link TimingTarget#end()} on timing targets.
|
||||||
|
*/
|
||||||
|
public void cancel() {
|
||||||
|
stop( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void stop( boolean cancel ) {
|
||||||
|
if( timer != null ) {
|
||||||
|
timer.stop();
|
||||||
|
timer = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !cancel )
|
||||||
|
end();
|
||||||
|
|
||||||
|
running = false;
|
||||||
|
timeToStop = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether this animation is running.
|
||||||
|
*/
|
||||||
|
public boolean isRunning() {
|
||||||
|
return running;
|
||||||
|
}
|
||||||
|
|
||||||
|
private float getTimingFraction() {
|
||||||
|
long currentTime = System.nanoTime() / 1000000;
|
||||||
|
long elapsedTime = currentTime - startTime;
|
||||||
|
timeToStop = (elapsedTime >= duration);
|
||||||
|
|
||||||
|
float fraction = clampFraction( (float) elapsedTime / duration );
|
||||||
|
if( interpolator != null )
|
||||||
|
fraction = clampFraction( interpolator.interpolate( fraction ) );
|
||||||
|
return fraction;
|
||||||
|
}
|
||||||
|
|
||||||
|
private float clampFraction( float fraction ) {
|
||||||
|
if( fraction < 0 )
|
||||||
|
return 0;
|
||||||
|
if( fraction > 1 )
|
||||||
|
return 1;
|
||||||
|
return fraction;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void timingEvent( float fraction ) {
|
||||||
|
synchronized( targets ) {
|
||||||
|
for( TimingTarget target : targets )
|
||||||
|
target.timingEvent( fraction );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( timeToStop )
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void begin() {
|
||||||
|
synchronized( targets ) {
|
||||||
|
for( TimingTarget target : targets )
|
||||||
|
target.begin();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void end() {
|
||||||
|
synchronized( targets ) {
|
||||||
|
for( TimingTarget target : targets )
|
||||||
|
target.end();
|
||||||
|
}
|
||||||
|
|
||||||
|
if( endRunnable != null )
|
||||||
|
endRunnable.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void throwExceptionIfRunning() {
|
||||||
|
if( isRunning() )
|
||||||
|
throw new IllegalStateException();
|
||||||
|
}
|
||||||
|
|
||||||
|
//---- interface TimingTarget ---------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Animation callbacks.
|
||||||
|
*/
|
||||||
|
@FunctionalInterface
|
||||||
|
public interface TimingTarget {
|
||||||
|
/**
|
||||||
|
* Invoked multiple times while animation is running.
|
||||||
|
*
|
||||||
|
* @param fraction the percent (0 to 1) elapsed of the current animation cycle
|
||||||
|
*/
|
||||||
|
void timingEvent( float fraction );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked when the animation begins.
|
||||||
|
*/
|
||||||
|
default void begin() {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked when the animation ends.
|
||||||
|
*/
|
||||||
|
default void end() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
//---- interface Interpolator ---------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interpolator used by animation to change timing fraction. E.g. for easing.
|
||||||
|
*/
|
||||||
|
@FunctionalInterface
|
||||||
|
public interface Interpolator {
|
||||||
|
/**
|
||||||
|
* Interpolate the given fraction and returns a new fraction.
|
||||||
|
* Both fractions are in range [0, 1].
|
||||||
|
*
|
||||||
|
* @param fraction the percent (0 to 1) elapsed of the current animation cycle
|
||||||
|
* @return new fraction in range [0, 1]
|
||||||
|
*/
|
||||||
|
float interpolate( float fraction );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 FormDev Software GmbH
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.formdev.flatlaf.util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An interpolator for {@link Animator} that uses a cubic bezier curve.
|
||||||
|
*
|
||||||
|
* @author Karl Tauber
|
||||||
|
*/
|
||||||
|
public class CubicBezierEasing
|
||||||
|
implements Animator.Interpolator
|
||||||
|
{
|
||||||
|
// common cubic-bezier easing functions (same as in CSS)
|
||||||
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function
|
||||||
|
public static final CubicBezierEasing EASE = new CubicBezierEasing( 0.25f, 0.1f, 0.25f, 1f );
|
||||||
|
public static final CubicBezierEasing EASE_IN = new CubicBezierEasing( 0.42f, 0f, 1f, 1f );
|
||||||
|
public static final CubicBezierEasing EASE_IN_OUT = new CubicBezierEasing( 0.42f, 0f, 0.58f, 1f );
|
||||||
|
public static final CubicBezierEasing EASE_OUT = new CubicBezierEasing( 0f, 0f, 0.58f, 1f );
|
||||||
|
|
||||||
|
private final float x1;
|
||||||
|
private final float y1;
|
||||||
|
private final float x2;
|
||||||
|
private final float y2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a cubic bezier easing interpolator with the given control points.
|
||||||
|
* The start point of the cubic bezier curve is always 0,0 and the end point 1,1.
|
||||||
|
*
|
||||||
|
* @param x1 the x coordinate of the first control point in range [0, 1]
|
||||||
|
* @param y1 the y coordinate of the first control point in range [0, 1]
|
||||||
|
* @param x2 the x coordinate of the second control point in range [0, 1]
|
||||||
|
* @param y2 the y coordinate of the second control point in range [0, 1]
|
||||||
|
*/
|
||||||
|
public CubicBezierEasing( float x1, float y1, float x2, float y2 ) {
|
||||||
|
if( x1 < 0 || x1 > 1 || y1 < 0 || y1 > 1 ||
|
||||||
|
x2 < 0 || x2 > 1 || y2 < 0 || y2 > 1 )
|
||||||
|
throw new IllegalArgumentException( "control points must be in range [0, 1]");
|
||||||
|
|
||||||
|
this.x1 = x1;
|
||||||
|
this.y1 = y1;
|
||||||
|
this.x2 = x2;
|
||||||
|
this.y2 = y2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float interpolate( float fraction ) {
|
||||||
|
if( fraction <= 0 || fraction >= 1 )
|
||||||
|
return fraction;
|
||||||
|
|
||||||
|
// use binary search
|
||||||
|
float low = 0;
|
||||||
|
float high = 1;
|
||||||
|
while( true ) {
|
||||||
|
float mid = (low + high) / 2;
|
||||||
|
float estimate = cubicBezier( mid, x1, x2 );
|
||||||
|
if( Math.abs( fraction - estimate ) < 0.0005f )
|
||||||
|
return cubicBezier( mid, y1, y2 );
|
||||||
|
if( estimate < fraction )
|
||||||
|
low = mid;
|
||||||
|
else
|
||||||
|
high = mid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes the x or y point on a cubic bezier curve for a given t value.
|
||||||
|
*
|
||||||
|
* https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Cubic_B%C3%A9zier_curves
|
||||||
|
*
|
||||||
|
* The general cubic bezier formula is:
|
||||||
|
* x = b0*x0 + b1*x1 + b2*x2 + b3*x3
|
||||||
|
* y = b0*y0 + b1*y1 + b2*y2 + b3*y3
|
||||||
|
*
|
||||||
|
* where:
|
||||||
|
* b0 = (1-t)^3
|
||||||
|
* b1 = 3 * t * (1-t)^2
|
||||||
|
* b2 = 3 * t^2 * (1-t)
|
||||||
|
* b3 = t^3
|
||||||
|
*
|
||||||
|
* x0,y0 is always 0,0 and x3,y3 is 1,1, so we can simplify to:
|
||||||
|
* x = b1*x1 + b2*x2 + b3
|
||||||
|
* y = b1*x1 + b2*x2 + b3
|
||||||
|
*/
|
||||||
|
private static float cubicBezier( float t, float xy1, float xy2 ) {
|
||||||
|
float invT = (1 - t);
|
||||||
|
float b1 = 3 * t * (invT * invT);
|
||||||
|
float b2 = 3 * (t * t) * invT;
|
||||||
|
float b3 = t * t * t;
|
||||||
|
return (b1 * xy1) + (b2 * xy2) + b3;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -117,10 +117,10 @@ public class HiDPIUtils
|
|||||||
* This methods computes a correction value for the Y position.
|
* This methods computes a correction value for the Y position.
|
||||||
*/
|
*/
|
||||||
public static float computeTextYCorrection( Graphics2D g ) {
|
public static float computeTextYCorrection( Graphics2D g ) {
|
||||||
if( !useTextYCorrection() || !SystemInfo.IS_WINDOWS )
|
if( !useTextYCorrection() || !SystemInfo.isWindows )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if( !SystemInfo.IS_JAVA_9_OR_LATER )
|
if( !SystemInfo.isJava_9_orLater )
|
||||||
return UIScale.getUserScaleFactor() > 1 ? -UIScale.scale( 0.625f ) : 0;
|
return UIScale.getUserScaleFactor() > 1 ? -UIScale.scale( 0.625f ) : 0;
|
||||||
|
|
||||||
AffineTransform t = g.getTransform();
|
AffineTransform t = g.getTransform();
|
||||||
|
|||||||
@@ -48,10 +48,10 @@ public class JavaCompatibility
|
|||||||
synchronized( JavaCompatibility.class ) {
|
synchronized( JavaCompatibility.class ) {
|
||||||
if( drawStringUnderlineCharAtMethod == null ) {
|
if( drawStringUnderlineCharAtMethod == null ) {
|
||||||
try {
|
try {
|
||||||
Class<?> cls = Class.forName( SystemInfo.IS_JAVA_9_OR_LATER
|
Class<?> cls = Class.forName( SystemInfo.isJava_9_orLater
|
||||||
? "javax.swing.plaf.basic.BasicGraphicsUtils"
|
? "javax.swing.plaf.basic.BasicGraphicsUtils"
|
||||||
: "sun.swing.SwingUtilities2" );
|
: "sun.swing.SwingUtilities2" );
|
||||||
drawStringUnderlineCharAtMethod = cls.getMethod( "drawStringUnderlineCharAt", SystemInfo.IS_JAVA_9_OR_LATER
|
drawStringUnderlineCharAtMethod = cls.getMethod( "drawStringUnderlineCharAt", SystemInfo.isJava_9_orLater
|
||||||
? new Class[] { JComponent.class, Graphics2D.class, String.class, int.class, float.class, float.class }
|
? new Class[] { JComponent.class, Graphics2D.class, String.class, int.class, float.class, float.class }
|
||||||
: new Class[] { JComponent.class, Graphics.class, String.class, int.class, int.class, int.class } );
|
: new Class[] { JComponent.class, Graphics.class, String.class, int.class, int.class, int.class } );
|
||||||
} catch( Exception ex ) {
|
} catch( Exception ex ) {
|
||||||
@@ -62,7 +62,7 @@ public class JavaCompatibility
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if( SystemInfo.IS_JAVA_9_OR_LATER )
|
if( SystemInfo.isJava_9_orLater )
|
||||||
drawStringUnderlineCharAtMethod.invoke( null, c, g, text, underlinedIndex, (float) x, (float) y );
|
drawStringUnderlineCharAtMethod.invoke( null, c, g, text, underlinedIndex, (float) x, (float) y );
|
||||||
else
|
else
|
||||||
drawStringUnderlineCharAtMethod.invoke( null, c, g, text, underlinedIndex, x, y );
|
drawStringUnderlineCharAtMethod.invoke( null, c, g, text, underlinedIndex, x, y );
|
||||||
|
|||||||
@@ -27,55 +27,57 @@ import java.util.StringTokenizer;
|
|||||||
public class SystemInfo
|
public class SystemInfo
|
||||||
{
|
{
|
||||||
// platforms
|
// platforms
|
||||||
public static final boolean IS_WINDOWS;
|
public static final boolean isWindows;
|
||||||
public static final boolean IS_MAC;
|
public static final boolean isMacOS;
|
||||||
public static final boolean IS_LINUX;
|
public static final boolean isLinux;
|
||||||
|
|
||||||
// OS versions
|
// OS versions
|
||||||
public static final boolean IS_WINDOWS_10_OR_LATER;
|
public static final long osVersion;
|
||||||
public static final boolean IS_MAC_OS_10_11_EL_CAPITAN_OR_LATER;
|
public static final boolean isWindows_10_orLater;
|
||||||
public static final boolean IS_MAC_OS_10_14_MOJAVE;
|
public static final boolean isMacOS_10_11_ElCapitan_orLater;
|
||||||
public static final boolean IS_MAC_OS_10_15_CATALINA_OR_LATER;
|
public static final boolean isMacOS_10_14_Mojave_orLater;
|
||||||
|
public static final boolean isMacOS_10_15_Catalina_orLater;
|
||||||
|
|
||||||
// Java versions
|
// Java versions
|
||||||
public static final boolean IS_JAVA_9_OR_LATER;
|
public static final long javaVersion;
|
||||||
public static final boolean IS_JAVA_11_OR_LATER;
|
public static final boolean isJava_9_orLater;
|
||||||
public static final boolean IS_JAVA_15_OR_LATER;
|
public static final boolean isJava_11_orLater;
|
||||||
|
public static final boolean isJava_15_orLater;
|
||||||
|
|
||||||
// Java VMs
|
// Java VMs
|
||||||
public static final boolean IS_JETBRAINS_JVM;
|
public static final boolean isJetBrainsJVM;
|
||||||
public static final boolean IS_JETBRAINS_JVM_11_OR_LATER;
|
public static final boolean isJetBrainsJVM_11_orLater;
|
||||||
|
|
||||||
// UI toolkits
|
// UI toolkits
|
||||||
public static final boolean IS_KDE;
|
public static final boolean isKDE;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// platforms
|
// platforms
|
||||||
String osName = System.getProperty( "os.name" ).toLowerCase( Locale.ENGLISH );
|
String osName = System.getProperty( "os.name" ).toLowerCase( Locale.ENGLISH );
|
||||||
IS_WINDOWS = osName.startsWith( "windows" );
|
isWindows = osName.startsWith( "windows" );
|
||||||
IS_MAC = osName.startsWith( "mac" );
|
isMacOS = osName.startsWith( "mac" );
|
||||||
IS_LINUX = osName.startsWith( "linux" );
|
isLinux = osName.startsWith( "linux" );
|
||||||
|
|
||||||
// OS versions
|
// OS versions
|
||||||
long osVersion = scanVersion( System.getProperty( "os.version" ) );
|
osVersion = scanVersion( System.getProperty( "os.version" ) );
|
||||||
IS_WINDOWS_10_OR_LATER = (IS_WINDOWS && osVersion >= toVersion( 10, 0, 0, 0 ));
|
isWindows_10_orLater = (isWindows && osVersion >= toVersion( 10, 0, 0, 0 ));
|
||||||
IS_MAC_OS_10_11_EL_CAPITAN_OR_LATER = (IS_MAC && osVersion >= toVersion( 10, 11, 0, 0 ));
|
isMacOS_10_11_ElCapitan_orLater = (isMacOS && osVersion >= toVersion( 10, 11, 0, 0 ));
|
||||||
IS_MAC_OS_10_14_MOJAVE = (IS_MAC && osVersion >= toVersion( 10, 14, 0, 0 ));
|
isMacOS_10_14_Mojave_orLater = (isMacOS && osVersion >= toVersion( 10, 14, 0, 0 ));
|
||||||
IS_MAC_OS_10_15_CATALINA_OR_LATER = (IS_MAC && osVersion >= toVersion( 10, 15, 0, 0 ));
|
isMacOS_10_15_Catalina_orLater = (isMacOS && osVersion >= toVersion( 10, 15, 0, 0 ));
|
||||||
|
|
||||||
// Java versions
|
// Java versions
|
||||||
long javaVersion = scanVersion( System.getProperty( "java.version" ) );
|
javaVersion = scanVersion( System.getProperty( "java.version" ) );
|
||||||
IS_JAVA_9_OR_LATER = (javaVersion >= toVersion( 9, 0, 0, 0 ));
|
isJava_9_orLater = (javaVersion >= toVersion( 9, 0, 0, 0 ));
|
||||||
IS_JAVA_11_OR_LATER = (javaVersion >= toVersion( 11, 0, 0, 0 ));
|
isJava_11_orLater = (javaVersion >= toVersion( 11, 0, 0, 0 ));
|
||||||
IS_JAVA_15_OR_LATER = (javaVersion >= toVersion( 15, 0, 0, 0 ));
|
isJava_15_orLater = (javaVersion >= toVersion( 15, 0, 0, 0 ));
|
||||||
|
|
||||||
// Java VMs
|
// Java VMs
|
||||||
IS_JETBRAINS_JVM = System.getProperty( "java.vm.vendor", "Unknown" )
|
isJetBrainsJVM = System.getProperty( "java.vm.vendor", "Unknown" )
|
||||||
.toLowerCase( Locale.ENGLISH ).contains( "jetbrains" );
|
.toLowerCase( Locale.ENGLISH ).contains( "jetbrains" );
|
||||||
IS_JETBRAINS_JVM_11_OR_LATER = IS_JETBRAINS_JVM && IS_JAVA_11_OR_LATER;
|
isJetBrainsJVM_11_orLater = isJetBrainsJVM && isJava_11_orLater;
|
||||||
|
|
||||||
// UI toolkits
|
// UI toolkits
|
||||||
IS_KDE = (IS_LINUX && System.getenv( "KDE_FULL_SESSION" ) != null);
|
isKDE = (isLinux && System.getenv( "KDE_FULL_SESSION" ) != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long scanVersion( String version ) {
|
public static long scanVersion( String version ) {
|
||||||
|
|||||||
@@ -90,10 +90,10 @@ public class UIScale
|
|||||||
|
|
||||||
jreHiDPI = false;
|
jreHiDPI = false;
|
||||||
|
|
||||||
if( SystemInfo.IS_JAVA_9_OR_LATER ) {
|
if( SystemInfo.isJava_9_orLater ) {
|
||||||
// Java 9 and later supports per-monitor scaling
|
// Java 9 and later supports per-monitor scaling
|
||||||
jreHiDPI = true;
|
jreHiDPI = true;
|
||||||
} else if( SystemInfo.IS_JETBRAINS_JVM ) {
|
} else if( SystemInfo.isJetBrainsJVM ) {
|
||||||
// IntelliJ IDEA ships its own JetBrains Java 8 JRE that may supports per-monitor scaling
|
// IntelliJ IDEA ships its own JetBrains Java 8 JRE that may supports per-monitor scaling
|
||||||
// see com.intellij.ui.JreHiDpiUtil.isJreHiDPIEnabled()
|
// see com.intellij.ui.JreHiDpiUtil.isJreHiDPIEnabled()
|
||||||
try {
|
try {
|
||||||
@@ -177,26 +177,25 @@ public class UIScale
|
|||||||
// default font size
|
// default font size
|
||||||
float fontSizeDivider = 12f;
|
float fontSizeDivider = 12f;
|
||||||
|
|
||||||
if( SystemInfo.IS_WINDOWS ) {
|
if( SystemInfo.isWindows ) {
|
||||||
// Windows LaF uses Tahoma font rather than the actual Windows system font (Segoe UI),
|
// Windows LaF uses Tahoma font rather than the actual Windows system font (Segoe UI),
|
||||||
// and its size is always ca. 10% smaller than the actual system font size.
|
// and its size is always ca. 10% smaller than the actual system font size.
|
||||||
// Tahoma 11 is used at 100%
|
// Tahoma 11 is used at 100%
|
||||||
if( "Tahoma".equals( font.getFamily() ) )
|
if( "Tahoma".equals( font.getFamily() ) )
|
||||||
fontSizeDivider = 11f;
|
fontSizeDivider = 11f;
|
||||||
} else if( SystemInfo.IS_MAC ) {
|
} else if( SystemInfo.isMacOS ) {
|
||||||
// default font size on macOS is 13
|
// default font size on macOS is 13
|
||||||
fontSizeDivider = 13f;
|
fontSizeDivider = 13f;
|
||||||
} else if( SystemInfo.IS_LINUX ) {
|
} else if( SystemInfo.isLinux ) {
|
||||||
// default font size for Unity and Gnome is 15 and for KDE it is 13
|
// default font size for Unity and Gnome is 15 and for KDE it is 13
|
||||||
fontSizeDivider = SystemInfo.IS_KDE ? 13f : 15f;
|
fontSizeDivider = SystemInfo.isKDE ? 13f : 15f;
|
||||||
}
|
}
|
||||||
|
|
||||||
return font.getSize() / fontSizeDivider;
|
return font.getSize() / fontSizeDivider;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isUserScalingEnabled() {
|
private static boolean isUserScalingEnabled() {
|
||||||
// same as in IntelliJ IDEA
|
return FlatSystemProperties.getBoolean( FlatSystemProperties.UI_SCALE_ENABLED, true );
|
||||||
return FlatSystemProperties.getBoolean( "hidpi", true );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -204,6 +203,9 @@ public class UIScale
|
|||||||
* to the given font.
|
* to the given font.
|
||||||
*/
|
*/
|
||||||
public static FontUIResource applyCustomScaleFactor( FontUIResource font ) {
|
public static FontUIResource applyCustomScaleFactor( FontUIResource font ) {
|
||||||
|
if( !isUserScalingEnabled() )
|
||||||
|
return font;
|
||||||
|
|
||||||
String uiScale = System.getProperty( FlatSystemProperties.UI_SCALE );
|
String uiScale = System.getProperty( FlatSystemProperties.UI_SCALE );
|
||||||
float scaleFactor = parseScaleFactor( uiScale );
|
float scaleFactor = parseScaleFactor( uiScale );
|
||||||
if( scaleFactor <= 0 )
|
if( scaleFactor <= 0 )
|
||||||
|
|||||||
@@ -74,6 +74,9 @@ controlDkShadow=lighten($controlShadow,10%)
|
|||||||
Button.background=#4c5052
|
Button.background=#4c5052
|
||||||
Button.hoverBackground=lighten($Button.background,3%,derived)
|
Button.hoverBackground=lighten($Button.background,3%,derived)
|
||||||
Button.pressedBackground=lighten($Button.background,6%,derived)
|
Button.pressedBackground=lighten($Button.background,6%,derived)
|
||||||
|
Button.selectedBackground=lighten($Button.background,10%,derived)
|
||||||
|
Button.selectedForeground=@foreground
|
||||||
|
Button.disabledSelectedBackground=lighten($Button.background,3%,derived)
|
||||||
|
|
||||||
Button.borderColor=#5e6060
|
Button.borderColor=#5e6060
|
||||||
Button.disabledBorderColor=#5e6060
|
Button.disabledBorderColor=#5e6060
|
||||||
@@ -92,6 +95,7 @@ Button.default.boldText=true
|
|||||||
|
|
||||||
Button.toolbar.hoverBackground=lighten($Button.background,1%,derived)
|
Button.toolbar.hoverBackground=lighten($Button.background,1%,derived)
|
||||||
Button.toolbar.pressedBackground=lighten($Button.background,4%,derived)
|
Button.toolbar.pressedBackground=lighten($Button.background,4%,derived)
|
||||||
|
Button.toolbar.selectedBackground=lighten($Button.background,7%,derived)
|
||||||
|
|
||||||
|
|
||||||
#---- CheckBox ----
|
#---- CheckBox ----
|
||||||
@@ -239,6 +243,12 @@ ProgressBar.selectionBackground=@foreground
|
|||||||
RadioButton.icon[filled].centerDiameter=5
|
RadioButton.icon[filled].centerDiameter=5
|
||||||
|
|
||||||
|
|
||||||
|
#---- RootPane ----
|
||||||
|
|
||||||
|
RootPane.activeBorderColor=darken(@background,7%,derived)
|
||||||
|
RootPane.inactiveBorderColor=darken(@background,5%,derived)
|
||||||
|
|
||||||
|
|
||||||
#---- ScrollBar ----
|
#---- ScrollBar ----
|
||||||
|
|
||||||
ScrollBar.track=lighten(@background,1%,derived noAutoInverse)
|
ScrollBar.track=lighten(@background,1%,derived noAutoInverse)
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ Button.default.borderWidth=1
|
|||||||
#---- CheckBox ----
|
#---- CheckBox ----
|
||||||
|
|
||||||
CheckBox.icon.style=filled
|
CheckBox.icon.style=filled
|
||||||
CheckBox.icon[filled].focusWidth=2
|
|
||||||
|
|
||||||
|
|
||||||
#---- Component ----
|
#---- Component ----
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ Button.rollover=true
|
|||||||
Button.defaultButtonFollowsFocus=false
|
Button.defaultButtonFollowsFocus=false
|
||||||
[win]Button.defaultButtonFollowsFocus=true
|
[win]Button.defaultButtonFollowsFocus=true
|
||||||
|
|
||||||
|
Button.borderWidth=1
|
||||||
Button.default.borderWidth=1
|
Button.default.borderWidth=1
|
||||||
|
|
||||||
Button.toolbar.margin=3,3,3,3
|
Button.toolbar.margin=3,3,3,3
|
||||||
@@ -180,7 +181,7 @@ ComboBox.border=com.formdev.flatlaf.ui.FlatRoundBorder
|
|||||||
ComboBox.padding=2,6,2,6
|
ComboBox.padding=2,6,2,6
|
||||||
ComboBox.minimumWidth=72
|
ComboBox.minimumWidth=72
|
||||||
ComboBox.editorColumns=0
|
ComboBox.editorColumns=0
|
||||||
ComboBox.maximumRowCount=20
|
ComboBox.maximumRowCount=15
|
||||||
[mac]ComboBox.showPopupOnNavigation=true
|
[mac]ComboBox.showPopupOnNavigation=true
|
||||||
ComboBox.buttonStyle=auto
|
ComboBox.buttonStyle=auto
|
||||||
|
|
||||||
@@ -292,6 +293,7 @@ List.selectionInactiveForeground=@selectionInactiveForeground
|
|||||||
List.dropCellBackground=@dropCellBackground
|
List.dropCellBackground=@dropCellBackground
|
||||||
List.dropCellForeground=@dropCellForeground
|
List.dropCellForeground=@dropCellForeground
|
||||||
List.dropLineColor=@dropLineColor
|
List.dropLineColor=@dropLineColor
|
||||||
|
List.showCellFocusIndicator=false
|
||||||
|
|
||||||
|
|
||||||
#---- Menu ----
|
#---- Menu ----
|
||||||
@@ -430,12 +432,15 @@ RadioButtonMenuItem.background=@menuBackground
|
|||||||
RootPane.border=com.formdev.flatlaf.ui.FlatRootPaneUI$FlatWindowBorder
|
RootPane.border=com.formdev.flatlaf.ui.FlatRootPaneUI$FlatWindowBorder
|
||||||
RootPane.borderDragThickness=5
|
RootPane.borderDragThickness=5
|
||||||
RootPane.cornerDragWidth=16
|
RootPane.cornerDragWidth=16
|
||||||
RootPane.honorMinimumSizeOnResize=true
|
RootPane.honorFrameMinimumSizeOnResize=false
|
||||||
|
RootPane.honorDialogMinimumSizeOnResize=true
|
||||||
|
|
||||||
|
|
||||||
#---- ScrollBar ----
|
#---- ScrollBar ----
|
||||||
|
|
||||||
ScrollBar.width=10
|
ScrollBar.width=10
|
||||||
|
ScrollBar.minimumThumbSize=10,10
|
||||||
|
ScrollBar.maximumThumbSize=100000,100000
|
||||||
ScrollBar.trackInsets=0,0,0,0
|
ScrollBar.trackInsets=0,0,0,0
|
||||||
ScrollBar.thumbInsets=0,0,0,0
|
ScrollBar.thumbInsets=0,0,0,0
|
||||||
ScrollBar.trackArc=0
|
ScrollBar.trackArc=0
|
||||||
@@ -448,10 +453,12 @@ ScrollBar.buttonArrowColor=$ComboBox.buttonArrowColor
|
|||||||
ScrollBar.buttonDisabledArrowColor=$ComboBox.buttonDisabledArrowColor
|
ScrollBar.buttonDisabledArrowColor=$ComboBox.buttonDisabledArrowColor
|
||||||
ScrollBar.allowsAbsolutePositioning=true
|
ScrollBar.allowsAbsolutePositioning=true
|
||||||
|
|
||||||
|
[mac]ScrollBar.minimumThumbSize=18,18
|
||||||
[mac]ScrollBar.thumbInsets=2,2,2,2
|
[mac]ScrollBar.thumbInsets=2,2,2,2
|
||||||
[mac]ScrollBar.thumbArc=999
|
[mac]ScrollBar.thumbArc=999
|
||||||
[mac]ScrollBar.hoverThumbWithTrack=true
|
[mac]ScrollBar.hoverThumbWithTrack=true
|
||||||
|
|
||||||
|
[linux]ScrollBar.minimumThumbSize=18,18
|
||||||
[linux]ScrollBar.thumbInsets=2,2,2,2
|
[linux]ScrollBar.thumbInsets=2,2,2,2
|
||||||
[linux]ScrollBar.thumbArc=999
|
[linux]ScrollBar.thumbArc=999
|
||||||
|
|
||||||
@@ -524,6 +531,7 @@ TabbedPane.contentBorderInsets=null
|
|||||||
Table.rowHeight=20
|
Table.rowHeight=20
|
||||||
Table.showHorizontalLines=false
|
Table.showHorizontalLines=false
|
||||||
Table.showVerticalLines=false
|
Table.showVerticalLines=false
|
||||||
|
Table.consistentHomeEndKeyBehavior=true
|
||||||
Table.intercellSpacing={dimension}0,0
|
Table.intercellSpacing={dimension}0,0
|
||||||
Table.scrollPaneBorder=com.formdev.flatlaf.ui.FlatBorder
|
Table.scrollPaneBorder=com.formdev.flatlaf.ui.FlatBorder
|
||||||
Table.ascendingSortIcon=com.formdev.flatlaf.icons.FlatAscendingSortIcon
|
Table.ascendingSortIcon=com.formdev.flatlaf.icons.FlatAscendingSortIcon
|
||||||
@@ -659,6 +667,7 @@ ToolTipManager.enableToolTipMode=activeApplication
|
|||||||
#---- Tree ----
|
#---- Tree ----
|
||||||
|
|
||||||
Tree.border=1,1,1,1
|
Tree.border=1,1,1,1
|
||||||
|
Tree.editorBorder=1,1,1,1,@cellFocusColor
|
||||||
Tree.selectionInactiveBackground=@selectionInactiveBackground
|
Tree.selectionInactiveBackground=@selectionInactiveBackground
|
||||||
Tree.selectionInactiveForeground=@selectionInactiveForeground
|
Tree.selectionInactiveForeground=@selectionInactiveForeground
|
||||||
Tree.textBackground=$Tree.background
|
Tree.textBackground=$Tree.background
|
||||||
@@ -671,6 +680,7 @@ Tree.rendererMargins=1,2,1,2
|
|||||||
Tree.wideSelection=true
|
Tree.wideSelection=true
|
||||||
Tree.repaintWholeRow=true
|
Tree.repaintWholeRow=true
|
||||||
Tree.paintLines=false
|
Tree.paintLines=false
|
||||||
|
Tree.showCellFocusIndicator=false
|
||||||
Tree.leftChildIndent=7
|
Tree.leftChildIndent=7
|
||||||
Tree.rightChildIndent=11
|
Tree.rightChildIndent=11
|
||||||
Tree.rowHeight=0
|
Tree.rowHeight=0
|
||||||
|
|||||||
@@ -75,6 +75,9 @@ Button.background=#ffffff
|
|||||||
Button.focusedBackground=#e3f1fa
|
Button.focusedBackground=#e3f1fa
|
||||||
Button.hoverBackground=darken($Button.background,3%,derived)
|
Button.hoverBackground=darken($Button.background,3%,derived)
|
||||||
Button.pressedBackground=darken($Button.background,10%,derived)
|
Button.pressedBackground=darken($Button.background,10%,derived)
|
||||||
|
Button.selectedBackground=darken($Button.background,20%,derived)
|
||||||
|
Button.selectedForeground=@foreground
|
||||||
|
Button.disabledSelectedBackground=darken($Button.background,13%,derived)
|
||||||
|
|
||||||
Button.borderColor=$Component.borderColor
|
Button.borderColor=$Component.borderColor
|
||||||
Button.disabledBorderColor=$Component.disabledBorderColor
|
Button.disabledBorderColor=$Component.disabledBorderColor
|
||||||
@@ -94,6 +97,7 @@ Button.default.borderWidth=2
|
|||||||
|
|
||||||
Button.toolbar.hoverBackground=darken($Button.background,12%,derived)
|
Button.toolbar.hoverBackground=darken($Button.background,12%,derived)
|
||||||
Button.toolbar.pressedBackground=darken($Button.background,15%,derived)
|
Button.toolbar.pressedBackground=darken($Button.background,15%,derived)
|
||||||
|
Button.toolbar.selectedBackground=$Button.selectedBackground
|
||||||
|
|
||||||
|
|
||||||
#---- CheckBox ----
|
#---- CheckBox ----
|
||||||
@@ -132,9 +136,9 @@ CheckBox.icon[filled].selectedFocusedBorderColor=#ACCFF7
|
|||||||
CheckBox.icon[filled].selectedFocusedBackground=$CheckBox.icon[filled].selectedBackground
|
CheckBox.icon[filled].selectedFocusedBackground=$CheckBox.icon[filled].selectedBackground
|
||||||
CheckBox.icon[filled].selectedFocusedCheckmarkColor=$CheckBox.icon.focusedBackground
|
CheckBox.icon[filled].selectedFocusedCheckmarkColor=$CheckBox.icon.focusedBackground
|
||||||
# hover
|
# hover
|
||||||
CheckBox.icon[filled].selectedHoverBackground=#5E94CE
|
CheckBox.icon[filled].selectedHoverBackground=darken($CheckBox.icon[filled].selectedBackground,5%)
|
||||||
# pressed
|
# pressed
|
||||||
CheckBox.icon[filled].selectedPressedBackground=#72A1D4
|
CheckBox.icon[filled].selectedPressedBackground=darken($CheckBox.icon[filled].selectedBackground,10%)
|
||||||
|
|
||||||
|
|
||||||
#---- ComboBox ----
|
#---- ComboBox ----
|
||||||
@@ -251,6 +255,12 @@ ProgressBar.selectionBackground=@foreground
|
|||||||
RadioButton.icon[filled].centerDiameter=5
|
RadioButton.icon[filled].centerDiameter=5
|
||||||
|
|
||||||
|
|
||||||
|
#---- RootPane ----
|
||||||
|
|
||||||
|
RootPane.activeBorderColor=#707070
|
||||||
|
RootPane.inactiveBorderColor=lighten($RootPane.activeBorderColor,20%,derived)
|
||||||
|
|
||||||
|
|
||||||
#---- ScrollBar ----
|
#---- ScrollBar ----
|
||||||
|
|
||||||
ScrollBar.track=lighten(@background,1%,derived noAutoInverse)
|
ScrollBar.track=lighten(@background,1%,derived noAutoInverse)
|
||||||
|
|||||||
@@ -45,6 +45,24 @@ ToggleButton.endBackground=$ToggleButton.background
|
|||||||
|
|
||||||
#---- theme specific ----
|
#---- theme specific ----
|
||||||
|
|
||||||
|
[Arc_Theme]ProgressBar.selectionBackground=#000
|
||||||
|
[Arc_Theme]ProgressBar.selectionForeground=#fff
|
||||||
|
|
||||||
|
[Arc_Theme_-_Orange]ProgressBar.selectionBackground=#000
|
||||||
|
[Arc_Theme_-_Orange]ProgressBar.selectionForeground=#fff
|
||||||
|
|
||||||
|
[Arc_Theme_Dark]ProgressBar.selectionBackground=#ddd
|
||||||
|
[Arc_Theme_Dark]ProgressBar.selectionForeground=#ddd
|
||||||
|
|
||||||
|
[Arc_Theme_Dark_-_Orange]ProgressBar.selectionBackground=#ddd
|
||||||
|
[Arc_Theme_Dark_-_Orange]ProgressBar.selectionForeground=#fff
|
||||||
|
|
||||||
|
[Cobalt_2]CheckBox.icon.background=#002946
|
||||||
|
[Cobalt_2]CheckBox.icon.checkmarkColor=#002946
|
||||||
|
|
||||||
|
[Dracula]ProgressBar.selectionBackground=#fff
|
||||||
|
[Dracula]ProgressBar.selectionForeground=#fff
|
||||||
|
|
||||||
[Gruvbox_Dark_Hard]ToggleButton.selectedBackground=$ToggleButton.selectedBackground
|
[Gruvbox_Dark_Hard]ToggleButton.selectedBackground=$ToggleButton.selectedBackground
|
||||||
[Gruvbox_Dark_Hard]ToggleButton.toolbar.selectedBackground=$ToggleButton.toolbar.selectedBackground
|
[Gruvbox_Dark_Hard]ToggleButton.toolbar.selectedBackground=$ToggleButton.toolbar.selectedBackground
|
||||||
|
|
||||||
@@ -62,3 +80,57 @@ ToggleButton.endBackground=$ToggleButton.background
|
|||||||
[High_contrast]ToggleButton.selectedForeground=#000
|
[High_contrast]ToggleButton.selectedForeground=#000
|
||||||
[High_contrast]ToggleButton.disabledSelectedBackground=#444
|
[High_contrast]ToggleButton.disabledSelectedBackground=#444
|
||||||
[High_contrast]ToggleButton.toolbar.selectedBackground=#fff
|
[High_contrast]ToggleButton.toolbar.selectedBackground=#fff
|
||||||
|
|
||||||
|
|
||||||
|
# Material Theme UI Lite
|
||||||
|
|
||||||
|
[Dracula_Contrast]ProgressBar.selectionBackground=#fff
|
||||||
|
[Dracula_Contrast]ProgressBar.selectionForeground=#fff
|
||||||
|
|
||||||
|
[GitHub]ProgressBar.selectionBackground=#222
|
||||||
|
[GitHub]ProgressBar.selectionForeground=#222
|
||||||
|
|
||||||
|
[GitHub_Contrast]ProgressBar.selectionBackground=#222
|
||||||
|
[GitHub_Contrast]ProgressBar.selectionForeground=#222
|
||||||
|
|
||||||
|
[Light_Owl]ProgressBar.selectionBackground=#111
|
||||||
|
[Light_Owl]ProgressBar.selectionForeground=#fff
|
||||||
|
|
||||||
|
[Light_Owl_Contrast]ProgressBar.selectionBackground=#111
|
||||||
|
[Light_Owl_Contrast]ProgressBar.selectionForeground=#fff
|
||||||
|
|
||||||
|
[Material_Lighter]ProgressBar.selectionBackground=#222
|
||||||
|
[Material_Lighter]ProgressBar.selectionForeground=#fff
|
||||||
|
|
||||||
|
[Material_Lighter_Contrast]ProgressBar.selectionBackground=#222
|
||||||
|
[Material_Lighter_Contrast]ProgressBar.selectionForeground=#fff
|
||||||
|
|
||||||
|
[Material_Oceanic]ProgressBar.selectionBackground=#ddd
|
||||||
|
[Material_Oceanic]ProgressBar.selectionForeground=#ddd
|
||||||
|
|
||||||
|
[Material_Oceanic_Contrast]ProgressBar.selectionBackground=#ddd
|
||||||
|
[Material_Oceanic_Contrast]ProgressBar.selectionForeground=#ddd
|
||||||
|
|
||||||
|
[Material_Palenight]ProgressBar.selectionBackground=#ddd
|
||||||
|
[Material_Palenight]ProgressBar.selectionForeground=#ddd
|
||||||
|
|
||||||
|
[Material_Palenight_Contrast]ProgressBar.selectionBackground=#ddd
|
||||||
|
[Material_Palenight_Contrast]ProgressBar.selectionForeground=#ddd
|
||||||
|
|
||||||
|
[Night_Owl]ProgressBar.selectionBackground=#ddd
|
||||||
|
[Night_Owl]ProgressBar.selectionForeground=#ddd
|
||||||
|
|
||||||
|
[Night_Owl_Contrast]ProgressBar.selectionBackground=#ddd
|
||||||
|
[Night_Owl_Contrast]ProgressBar.selectionForeground=#ddd
|
||||||
|
|
||||||
|
[Solarized_Dark]ProgressBar.selectionBackground=#ccc
|
||||||
|
[Solarized_Dark]ProgressBar.selectionForeground=#ccc
|
||||||
|
|
||||||
|
[Material_Solarized_Dark_Contrast]ProgressBar.selectionBackground=#ccc
|
||||||
|
[Material_Solarized_Dark_Contrast]ProgressBar.selectionForeground=#ccc
|
||||||
|
|
||||||
|
[Solarized_Light]ProgressBar.selectionBackground=#222
|
||||||
|
[Solarized_Light]ProgressBar.selectionForeground=#fff
|
||||||
|
|
||||||
|
[Material_Solarized_Light_Contrast]ProgressBar.selectionBackground=#222
|
||||||
|
[Material_Solarized_Light_Contrast]ProgressBar.selectionForeground=#fff
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.formdev.flatlaf.demo;
|
package com.formdev.flatlaf.demo;
|
||||||
|
|
||||||
|
import java.awt.Component;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.text.DefaultEditorKit;
|
import javax.swing.text.DefaultEditorKit;
|
||||||
import net.miginfocom.swing.*;
|
import net.miginfocom.swing.*;
|
||||||
@@ -114,14 +115,14 @@ class BasicComponentsPanel
|
|||||||
JScrollPane scrollPane12 = new JScrollPane();
|
JScrollPane scrollPane12 = new JScrollPane();
|
||||||
JTextPane textPane4 = new JTextPane();
|
JTextPane textPane4 = new JTextPane();
|
||||||
JTextPane textPane5 = new JTextPane();
|
JTextPane textPane5 = new JTextPane();
|
||||||
JLabel label3 = new JLabel();
|
JLabel errorHintsLabel = new JLabel();
|
||||||
JTextField textField5 = new JTextField();
|
JTextField errorHintsTextField = new JTextField();
|
||||||
JComboBox<String> comboBox7 = new JComboBox<>();
|
JComboBox<String> errorHintsComboBox = new JComboBox<>();
|
||||||
JSpinner spinner3 = new JSpinner();
|
JSpinner errorHintsSpinner = new JSpinner();
|
||||||
JLabel label4 = new JLabel();
|
JLabel warningHintsLabel = new JLabel();
|
||||||
JTextField textField7 = new JTextField();
|
JTextField warningHintsTextField = new JTextField();
|
||||||
JComboBox<String> comboBox8 = new JComboBox<>();
|
JComboBox<String> warningHintsComboBox = new JComboBox<>();
|
||||||
JSpinner spinner4 = new JSpinner();
|
JSpinner warningHintsSpinner = new JSpinner();
|
||||||
JPopupMenu popupMenu1 = new JPopupMenu();
|
JPopupMenu popupMenu1 = new JPopupMenu();
|
||||||
JMenuItem cutMenuItem = new JMenuItem();
|
JMenuItem cutMenuItem = new JMenuItem();
|
||||||
JMenuItem copyMenuItem = new JMenuItem();
|
JMenuItem copyMenuItem = new JMenuItem();
|
||||||
@@ -129,12 +130,12 @@ class BasicComponentsPanel
|
|||||||
|
|
||||||
//======== this ========
|
//======== this ========
|
||||||
setLayout(new MigLayout(
|
setLayout(new MigLayout(
|
||||||
"hidemode 3",
|
"insets dialog,hidemode 3",
|
||||||
// columns
|
// columns
|
||||||
"[]" +
|
"[sizegroup 1]" +
|
||||||
"[]" +
|
"[sizegroup 1]" +
|
||||||
"[]" +
|
"[sizegroup 1]" +
|
||||||
"[]" +
|
"[sizegroup 1]" +
|
||||||
"[]" +
|
"[]" +
|
||||||
"[]",
|
"[]",
|
||||||
// rows
|
// rows
|
||||||
@@ -606,44 +607,44 @@ class BasicComponentsPanel
|
|||||||
textPane5.setText("No scroll pane");
|
textPane5.setText("No scroll pane");
|
||||||
add(textPane5, "cell 5 11,growx");
|
add(textPane5, "cell 5 11,growx");
|
||||||
|
|
||||||
//---- label3 ----
|
//---- errorHintsLabel ----
|
||||||
label3.setText("Error hints:");
|
errorHintsLabel.setText("Error hints:");
|
||||||
add(label3, "cell 0 12");
|
add(errorHintsLabel, "cell 0 12");
|
||||||
|
|
||||||
//---- textField5 ----
|
//---- errorHintsTextField ----
|
||||||
textField5.putClientProperty("JComponent.outline", "error");
|
errorHintsTextField.putClientProperty("JComponent.outline", "error");
|
||||||
add(textField5, "cell 1 12,growx");
|
add(errorHintsTextField, "cell 1 12,growx");
|
||||||
|
|
||||||
//---- comboBox7 ----
|
//---- errorHintsComboBox ----
|
||||||
comboBox7.putClientProperty("JComponent.outline", "error");
|
errorHintsComboBox.putClientProperty("JComponent.outline", "error");
|
||||||
comboBox7.setModel(new DefaultComboBoxModel<>(new String[] {
|
errorHintsComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
|
||||||
"Editable"
|
"Editable"
|
||||||
}));
|
}));
|
||||||
comboBox7.setEditable(true);
|
errorHintsComboBox.setEditable(true);
|
||||||
add(comboBox7, "cell 2 12,growx");
|
add(errorHintsComboBox, "cell 2 12,growx");
|
||||||
|
|
||||||
//---- spinner3 ----
|
//---- errorHintsSpinner ----
|
||||||
spinner3.putClientProperty("JComponent.outline", "error");
|
errorHintsSpinner.putClientProperty("JComponent.outline", "error");
|
||||||
add(spinner3, "cell 3 12,growx");
|
add(errorHintsSpinner, "cell 3 12,growx");
|
||||||
|
|
||||||
//---- label4 ----
|
//---- warningHintsLabel ----
|
||||||
label4.setText("Warning hints:");
|
warningHintsLabel.setText("Warning hints:");
|
||||||
add(label4, "cell 0 13");
|
add(warningHintsLabel, "cell 0 13");
|
||||||
|
|
||||||
//---- textField7 ----
|
//---- warningHintsTextField ----
|
||||||
textField7.putClientProperty("JComponent.outline", "warning");
|
warningHintsTextField.putClientProperty("JComponent.outline", "warning");
|
||||||
add(textField7, "cell 1 13,growx");
|
add(warningHintsTextField, "cell 1 13,growx");
|
||||||
|
|
||||||
//---- comboBox8 ----
|
//---- warningHintsComboBox ----
|
||||||
comboBox8.putClientProperty("JComponent.outline", "warning");
|
warningHintsComboBox.putClientProperty("JComponent.outline", "warning");
|
||||||
comboBox8.setModel(new DefaultComboBoxModel<>(new String[] {
|
warningHintsComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
|
||||||
"Not editable"
|
"Not editable"
|
||||||
}));
|
}));
|
||||||
add(comboBox8, "cell 2 13,growx");
|
add(warningHintsComboBox, "cell 2 13,growx");
|
||||||
|
|
||||||
//---- spinner4 ----
|
//---- warningHintsSpinner ----
|
||||||
spinner4.putClientProperty("JComponent.outline", "warning");
|
warningHintsSpinner.putClientProperty("JComponent.outline", "warning");
|
||||||
add(spinner4, "cell 3 13,growx");
|
add(warningHintsSpinner, "cell 3 13,growx");
|
||||||
|
|
||||||
//======== popupMenu1 ========
|
//======== popupMenu1 ========
|
||||||
{
|
{
|
||||||
@@ -668,6 +669,33 @@ class BasicComponentsPanel
|
|||||||
cutMenuItem.addActionListener( new DefaultEditorKit.CutAction() );
|
cutMenuItem.addActionListener( new DefaultEditorKit.CutAction() );
|
||||||
copyMenuItem.addActionListener( new DefaultEditorKit.CopyAction() );
|
copyMenuItem.addActionListener( new DefaultEditorKit.CopyAction() );
|
||||||
pasteMenuItem.addActionListener( new DefaultEditorKit.PasteAction() );
|
pasteMenuItem.addActionListener( new DefaultEditorKit.PasteAction() );
|
||||||
|
|
||||||
|
if( FlatLafDemo.screenshotsMode ) {
|
||||||
|
Component[] components = {
|
||||||
|
button13, button14, button15, button16, comboBox5, comboBox6,
|
||||||
|
textField6, passwordField5,
|
||||||
|
|
||||||
|
formattedTextFieldLabel, formattedTextField1, formattedTextField2, formattedTextField3, formattedTextField4, formattedTextField5,
|
||||||
|
textAreaLabel, scrollPane1, scrollPane2, scrollPane3, scrollPane4, textArea5,
|
||||||
|
editorPaneLabel, scrollPane5, scrollPane6, scrollPane7, scrollPane8, editorPane5,
|
||||||
|
textPaneLabel, scrollPane9, scrollPane10, scrollPane11, scrollPane12, textPane5,
|
||||||
|
|
||||||
|
errorHintsLabel, errorHintsTextField, errorHintsComboBox, errorHintsSpinner,
|
||||||
|
warningHintsLabel, warningHintsTextField, warningHintsComboBox, warningHintsSpinner,
|
||||||
|
};
|
||||||
|
|
||||||
|
for( Component c : components )
|
||||||
|
c.setVisible( false );
|
||||||
|
|
||||||
|
// move password fields one row up
|
||||||
|
Component[] formattedTextFields = { formattedTextFieldLabel, formattedTextField1, formattedTextField2, formattedTextField3, formattedTextField4 };
|
||||||
|
Component[] passwordFields = { passwordFieldLabel, passwordField1, passwordField2, passwordField3, passwordField4 };
|
||||||
|
MigLayout layout = (MigLayout) getLayout();
|
||||||
|
for( int i = 0; i < passwordFields.length; i++ ) {
|
||||||
|
Object cons = layout.getComponentConstraints( formattedTextFields[i] );
|
||||||
|
layout.setComponentConstraints( passwordFields[i], cons );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ new FormModel {
|
|||||||
"JavaCodeGenerator.defaultVariableLocal": true
|
"JavaCodeGenerator.defaultVariableLocal": true
|
||||||
}
|
}
|
||||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$layoutConstraints": "hidemode 3"
|
"$layoutConstraints": "insets dialog,hidemode 3"
|
||||||
"$columnConstraints": "[][][][][][]"
|
"$columnConstraints": "[sizegroup 1][sizegroup 1][sizegroup 1][sizegroup 1][][]"
|
||||||
"$rowConstraints": "[][][][][][][][][][][][]para[][]"
|
"$rowConstraints": "[][][][][][][][][][][][]para[][]"
|
||||||
} ) {
|
} ) {
|
||||||
name: "this"
|
name: "this"
|
||||||
@@ -592,19 +592,19 @@ new FormModel {
|
|||||||
"value": "cell 5 11,growx"
|
"value": "cell 5 11,growx"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "label3"
|
name: "errorHintsLabel"
|
||||||
"text": "Error hints:"
|
"text": "Error hints:"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 12"
|
"value": "cell 0 12"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "textField5"
|
name: "errorHintsTextField"
|
||||||
"$client.JComponent.outline": "error"
|
"$client.JComponent.outline": "error"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 12,growx"
|
"value": "cell 1 12,growx"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JComboBox" ) {
|
add( new FormComponent( "javax.swing.JComboBox" ) {
|
||||||
name: "comboBox7"
|
name: "errorHintsComboBox"
|
||||||
"$client.JComponent.outline": "error"
|
"$client.JComponent.outline": "error"
|
||||||
"model": new javax.swing.DefaultComboBoxModel {
|
"model": new javax.swing.DefaultComboBoxModel {
|
||||||
selectedItem: "Editable"
|
selectedItem: "Editable"
|
||||||
@@ -615,25 +615,25 @@ new FormModel {
|
|||||||
"value": "cell 2 12,growx"
|
"value": "cell 2 12,growx"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JSpinner" ) {
|
add( new FormComponent( "javax.swing.JSpinner" ) {
|
||||||
name: "spinner3"
|
name: "errorHintsSpinner"
|
||||||
"$client.JComponent.outline": "error"
|
"$client.JComponent.outline": "error"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 3 12,growx"
|
"value": "cell 3 12,growx"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "label4"
|
name: "warningHintsLabel"
|
||||||
"text": "Warning hints:"
|
"text": "Warning hints:"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 13"
|
"value": "cell 0 13"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||||
name: "textField7"
|
name: "warningHintsTextField"
|
||||||
"$client.JComponent.outline": "warning"
|
"$client.JComponent.outline": "warning"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 13,growx"
|
"value": "cell 1 13,growx"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JComboBox" ) {
|
add( new FormComponent( "javax.swing.JComboBox" ) {
|
||||||
name: "comboBox8"
|
name: "warningHintsComboBox"
|
||||||
"$client.JComponent.outline": "warning"
|
"$client.JComponent.outline": "warning"
|
||||||
"model": new javax.swing.DefaultComboBoxModel {
|
"model": new javax.swing.DefaultComboBoxModel {
|
||||||
selectedItem: "Not editable"
|
selectedItem: "Not editable"
|
||||||
@@ -643,7 +643,7 @@ new FormModel {
|
|||||||
"value": "cell 2 13,growx"
|
"value": "cell 2 13,growx"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JSpinner" ) {
|
add( new FormComponent( "javax.swing.JSpinner" ) {
|
||||||
name: "spinner4"
|
name: "warningHintsSpinner"
|
||||||
"$client.JComponent.outline": "warning"
|
"$client.JComponent.outline": "warning"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 3 13,growx"
|
"value": "cell 3 13,growx"
|
||||||
|
|||||||
@@ -27,8 +27,12 @@ import javax.swing.UIManager.LookAndFeelInfo;
|
|||||||
import javax.swing.plaf.metal.MetalLookAndFeel;
|
import javax.swing.plaf.metal.MetalLookAndFeel;
|
||||||
import javax.swing.plaf.nimbus.NimbusLookAndFeel;
|
import javax.swing.plaf.nimbus.NimbusLookAndFeel;
|
||||||
import com.formdev.flatlaf.*;
|
import com.formdev.flatlaf.*;
|
||||||
|
import com.formdev.flatlaf.extras.FlatAnimatedLafChange;
|
||||||
import com.formdev.flatlaf.util.SystemInfo;
|
import com.formdev.flatlaf.util.SystemInfo;
|
||||||
import com.formdev.flatlaf.util.UIScale;
|
import com.formdev.flatlaf.util.UIScale;
|
||||||
|
import net.miginfocom.layout.ConstraintParser;
|
||||||
|
import net.miginfocom.layout.LC;
|
||||||
|
import net.miginfocom.layout.UnitValue;
|
||||||
import net.miginfocom.swing.*;
|
import net.miginfocom.swing.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,6 +47,18 @@ class ControlBar
|
|||||||
ControlBar() {
|
ControlBar() {
|
||||||
initComponents();
|
initComponents();
|
||||||
|
|
||||||
|
// remove top insets
|
||||||
|
MigLayout layout = (MigLayout) getLayout();
|
||||||
|
LC lc = ConstraintParser.parseLayoutConstraint( (String) layout.getLayoutConstraints() );
|
||||||
|
UnitValue[] insets = lc.getInsets();
|
||||||
|
lc.setInsets( new UnitValue[] {
|
||||||
|
new UnitValue( 0, UnitValue.PIXEL, null ),
|
||||||
|
insets[1],
|
||||||
|
insets[2],
|
||||||
|
insets[3]
|
||||||
|
} );
|
||||||
|
layout.setLayoutConstraints( lc );
|
||||||
|
|
||||||
// initialize look and feels combo box
|
// initialize look and feels combo box
|
||||||
DefaultComboBoxModel<LookAndFeelInfo> lafModel = new DefaultComboBoxModel<>();
|
DefaultComboBoxModel<LookAndFeelInfo> lafModel = new DefaultComboBoxModel<>();
|
||||||
lafModel.addElement( new LookAndFeelInfo( "Flat Light (F1)", FlatLightLaf.class.getName() ) );
|
lafModel.addElement( new LookAndFeelInfo( "Flat Light (F1)", FlatLightLaf.class.getName() ) );
|
||||||
@@ -58,9 +74,9 @@ class ControlBar
|
|||||||
className.equals( "com.sun.java.swing.plaf.motif.MotifLookAndFeel" ) )
|
className.equals( "com.sun.java.swing.plaf.motif.MotifLookAndFeel" ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( (SystemInfo.IS_WINDOWS && className.equals( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" )) ||
|
if( (SystemInfo.isWindows && className.equals( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" )) ||
|
||||||
(SystemInfo.IS_MAC && className.equals( "com.apple.laf.AquaLookAndFeel") ) ||
|
(SystemInfo.isMacOS && className.equals( "com.apple.laf.AquaLookAndFeel") ) ||
|
||||||
(SystemInfo.IS_LINUX && className.equals( "com.sun.java.swing.plaf.gtk.GTKLookAndFeel") ) )
|
(SystemInfo.isLinux && className.equals( "com.sun.java.swing.plaf.gtk.GTKLookAndFeel") ) )
|
||||||
name += " (F9)";
|
name += " (F9)";
|
||||||
else if( className.equals( MetalLookAndFeel.class.getName() ) )
|
else if( className.equals( MetalLookAndFeel.class.getName() ) )
|
||||||
name += " (F12)";
|
name += " (F12)";
|
||||||
@@ -111,11 +127,11 @@ class ControlBar
|
|||||||
registerSwitchToLookAndFeel( KeyEvent.VK_F3, FlatIntelliJLaf.class.getName() );
|
registerSwitchToLookAndFeel( KeyEvent.VK_F3, FlatIntelliJLaf.class.getName() );
|
||||||
registerSwitchToLookAndFeel( KeyEvent.VK_F4, FlatDarculaLaf.class.getName() );
|
registerSwitchToLookAndFeel( KeyEvent.VK_F4, FlatDarculaLaf.class.getName() );
|
||||||
|
|
||||||
if( SystemInfo.IS_WINDOWS )
|
if( SystemInfo.isWindows )
|
||||||
registerSwitchToLookAndFeel( KeyEvent.VK_F9, "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" );
|
registerSwitchToLookAndFeel( KeyEvent.VK_F9, "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" );
|
||||||
else if( SystemInfo.IS_MAC )
|
else if( SystemInfo.isMacOS )
|
||||||
registerSwitchToLookAndFeel( KeyEvent.VK_F9, "com.apple.laf.AquaLookAndFeel" );
|
registerSwitchToLookAndFeel( KeyEvent.VK_F9, "com.apple.laf.AquaLookAndFeel" );
|
||||||
else if( SystemInfo.IS_LINUX )
|
else if( SystemInfo.isLinux )
|
||||||
registerSwitchToLookAndFeel( KeyEvent.VK_F9, "com.sun.java.swing.plaf.gtk.GTKLookAndFeel" );
|
registerSwitchToLookAndFeel( KeyEvent.VK_F9, "com.sun.java.swing.plaf.gtk.GTKLookAndFeel" );
|
||||||
registerSwitchToLookAndFeel( KeyEvent.VK_F12, MetalLookAndFeel.class.getName() );
|
registerSwitchToLookAndFeel( KeyEvent.VK_F12, MetalLookAndFeel.class.getName() );
|
||||||
registerSwitchToLookAndFeel( KeyEvent.VK_F11, NimbusLookAndFeel.class.getName() );
|
registerSwitchToLookAndFeel( KeyEvent.VK_F11, NimbusLookAndFeel.class.getName() );
|
||||||
@@ -193,6 +209,8 @@ class ControlBar
|
|||||||
|
|
||||||
EventQueue.invokeLater( () -> {
|
EventQueue.invokeLater( () -> {
|
||||||
try {
|
try {
|
||||||
|
FlatAnimatedLafChange.showSnapshot();
|
||||||
|
|
||||||
// change look and feel
|
// change look and feel
|
||||||
UIManager.setLookAndFeel( lafClassName );
|
UIManager.setLookAndFeel( lafClassName );
|
||||||
|
|
||||||
@@ -202,6 +220,7 @@ class ControlBar
|
|||||||
|
|
||||||
// update all components
|
// update all components
|
||||||
FlatLaf.updateUI();
|
FlatLaf.updateUI();
|
||||||
|
FlatAnimatedLafChange.hideSnapshotWithAnimation();
|
||||||
|
|
||||||
// increase size of frame if necessary
|
// increase size of frame if necessary
|
||||||
int width = frame.getWidth();
|
int width = frame.getWidth();
|
||||||
|
|||||||
@@ -20,13 +20,16 @@ import java.awt.*;
|
|||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.prefs.Preferences;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.text.DefaultEditorKit;
|
import javax.swing.text.DefaultEditorKit;
|
||||||
import javax.swing.text.StyleContext;
|
import javax.swing.text.StyleContext;
|
||||||
import com.formdev.flatlaf.FlatClientProperties;
|
import com.formdev.flatlaf.FlatClientProperties;
|
||||||
import com.formdev.flatlaf.FlatLaf;
|
import com.formdev.flatlaf.FlatLaf;
|
||||||
|
import com.formdev.flatlaf.demo.HintManager.Hint;
|
||||||
import com.formdev.flatlaf.demo.extras.*;
|
import com.formdev.flatlaf.demo.extras.*;
|
||||||
import com.formdev.flatlaf.demo.intellijthemes.*;
|
import com.formdev.flatlaf.demo.intellijthemes.*;
|
||||||
|
import com.formdev.flatlaf.extras.FlatAnimatedLafChange;
|
||||||
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||||
import com.formdev.flatlaf.extras.SVGUtils;
|
import com.formdev.flatlaf.extras.SVGUtils;
|
||||||
import com.formdev.flatlaf.ui.JBRCustomDecorations;
|
import com.formdev.flatlaf.ui.JBRCustomDecorations;
|
||||||
@@ -56,6 +59,35 @@ class DemoFrame
|
|||||||
|
|
||||||
if( tabIndex >= 0 && tabIndex < tabbedPane.getTabCount() && tabIndex != tabbedPane.getSelectedIndex() )
|
if( tabIndex >= 0 && tabIndex < tabbedPane.getTabCount() && tabIndex != tabbedPane.getSelectedIndex() )
|
||||||
tabbedPane.setSelectedIndex( tabIndex );
|
tabbedPane.setSelectedIndex( tabIndex );
|
||||||
|
|
||||||
|
SwingUtilities.invokeLater( () -> {
|
||||||
|
showHints();
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showHints() {
|
||||||
|
Hint fontMenuHint = new Hint(
|
||||||
|
"Use 'Font' menu to increase/decrease font size or try different fonts.",
|
||||||
|
fontMenu, SwingConstants.BOTTOM, "hint.fontMenu", null );
|
||||||
|
|
||||||
|
Hint optionsMenuHint = new Hint(
|
||||||
|
"Use 'Options' menu to try out various FlatLaf options.",
|
||||||
|
optionsMenu, SwingConstants.BOTTOM, "hint.optionsMenu", fontMenuHint );
|
||||||
|
|
||||||
|
Hint themesHint = new Hint(
|
||||||
|
"Use 'Themes' list to try out various themes.",
|
||||||
|
themesPanel, SwingConstants.LEFT, "hint.themesPanel", optionsMenuHint );
|
||||||
|
|
||||||
|
HintManager.showHint( themesHint );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void clearHints() {
|
||||||
|
HintManager.hideAllHints();
|
||||||
|
|
||||||
|
Preferences state = DemoPrefs.getState();
|
||||||
|
state.remove( "hint.fontMenu" );
|
||||||
|
state.remove( "hint.optionsMenu" );
|
||||||
|
state.remove( "hint.themesPanel" );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void exitActionPerformed() {
|
private void exitActionPerformed() {
|
||||||
@@ -105,14 +137,26 @@ class DemoFrame
|
|||||||
repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void animatedLafChangeChanged() {
|
||||||
|
System.setProperty( "flatlaf.animatedLafChange", String.valueOf( animatedLafChangeMenuItem.isSelected() ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showHintsChanged() {
|
||||||
|
clearHints();
|
||||||
|
showHints();
|
||||||
|
}
|
||||||
|
|
||||||
private void fontFamilyChanged( ActionEvent e ) {
|
private void fontFamilyChanged( ActionEvent e ) {
|
||||||
String fontFamily = e.getActionCommand();
|
String fontFamily = e.getActionCommand();
|
||||||
|
|
||||||
|
FlatAnimatedLafChange.showSnapshot();
|
||||||
|
|
||||||
Font font = UIManager.getFont( "defaultFont" );
|
Font font = UIManager.getFont( "defaultFont" );
|
||||||
Font newFont = StyleContext.getDefaultStyleContext().getFont( fontFamily, font.getStyle(), font.getSize() );
|
Font newFont = StyleContext.getDefaultStyleContext().getFont( fontFamily, font.getStyle(), font.getSize() );
|
||||||
UIManager.put( "defaultFont", newFont );
|
UIManager.put( "defaultFont", newFont );
|
||||||
|
|
||||||
FlatLaf.updateUI();
|
FlatLaf.updateUI();
|
||||||
|
FlatAnimatedLafChange.hideSnapshotWithAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fontSizeChanged( ActionEvent e ) {
|
private void fontSizeChanged( ActionEvent e ) {
|
||||||
@@ -243,11 +287,13 @@ class DemoFrame
|
|||||||
JMenuItem restoreFontMenuItem = new JMenuItem();
|
JMenuItem restoreFontMenuItem = new JMenuItem();
|
||||||
JMenuItem incrFontMenuItem = new JMenuItem();
|
JMenuItem incrFontMenuItem = new JMenuItem();
|
||||||
JMenuItem decrFontMenuItem = new JMenuItem();
|
JMenuItem decrFontMenuItem = new JMenuItem();
|
||||||
JMenu optionsMenu = new JMenu();
|
optionsMenu = new JMenu();
|
||||||
windowDecorationsCheckBoxMenuItem = new JCheckBoxMenuItem();
|
windowDecorationsCheckBoxMenuItem = new JCheckBoxMenuItem();
|
||||||
menuBarEmbeddedCheckBoxMenuItem = new JCheckBoxMenuItem();
|
menuBarEmbeddedCheckBoxMenuItem = new JCheckBoxMenuItem();
|
||||||
underlineMenuSelectionMenuItem = new JCheckBoxMenuItem();
|
underlineMenuSelectionMenuItem = new JCheckBoxMenuItem();
|
||||||
alwaysShowMnemonicsMenuItem = new JCheckBoxMenuItem();
|
alwaysShowMnemonicsMenuItem = new JCheckBoxMenuItem();
|
||||||
|
animatedLafChangeMenuItem = new JCheckBoxMenuItem();
|
||||||
|
JMenuItem showHintsMenuItem = new JMenuItem();
|
||||||
JMenu helpMenu = new JMenu();
|
JMenu helpMenu = new JMenu();
|
||||||
JMenuItem aboutMenuItem = new JMenuItem();
|
JMenuItem aboutMenuItem = new JMenuItem();
|
||||||
JToolBar toolBar1 = new JToolBar();
|
JToolBar toolBar1 = new JToolBar();
|
||||||
@@ -267,7 +313,7 @@ class DemoFrame
|
|||||||
OptionPanePanel optionPanePanel = new OptionPanePanel();
|
OptionPanePanel optionPanePanel = new OptionPanePanel();
|
||||||
ExtrasPanel extrasPanel1 = new ExtrasPanel();
|
ExtrasPanel extrasPanel1 = new ExtrasPanel();
|
||||||
controlBar = new ControlBar();
|
controlBar = new ControlBar();
|
||||||
IJThemesPanel themesPanel = new IJThemesPanel();
|
themesPanel = new IJThemesPanel();
|
||||||
|
|
||||||
//======== this ========
|
//======== this ========
|
||||||
setTitle("FlatLaf Demo");
|
setTitle("FlatLaf Demo");
|
||||||
@@ -501,6 +547,17 @@ class DemoFrame
|
|||||||
alwaysShowMnemonicsMenuItem.setText("Always show mnemonics");
|
alwaysShowMnemonicsMenuItem.setText("Always show mnemonics");
|
||||||
alwaysShowMnemonicsMenuItem.addActionListener(e -> alwaysShowMnemonics());
|
alwaysShowMnemonicsMenuItem.addActionListener(e -> alwaysShowMnemonics());
|
||||||
optionsMenu.add(alwaysShowMnemonicsMenuItem);
|
optionsMenu.add(alwaysShowMnemonicsMenuItem);
|
||||||
|
|
||||||
|
//---- animatedLafChangeMenuItem ----
|
||||||
|
animatedLafChangeMenuItem.setText("Animated Laf Change");
|
||||||
|
animatedLafChangeMenuItem.setSelected(true);
|
||||||
|
animatedLafChangeMenuItem.addActionListener(e -> animatedLafChangeChanged());
|
||||||
|
optionsMenu.add(animatedLafChangeMenuItem);
|
||||||
|
|
||||||
|
//---- showHintsMenuItem ----
|
||||||
|
showHintsMenuItem.setText("Show hints");
|
||||||
|
showHintsMenuItem.addActionListener(e -> showHintsChanged());
|
||||||
|
optionsMenu.add(showHintsMenuItem);
|
||||||
}
|
}
|
||||||
menuBar1.add(optionsMenu);
|
menuBar1.add(optionsMenu);
|
||||||
|
|
||||||
@@ -616,11 +673,14 @@ class DemoFrame
|
|||||||
|
|
||||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
||||||
private JMenu fontMenu;
|
private JMenu fontMenu;
|
||||||
|
private JMenu optionsMenu;
|
||||||
private JCheckBoxMenuItem windowDecorationsCheckBoxMenuItem;
|
private JCheckBoxMenuItem windowDecorationsCheckBoxMenuItem;
|
||||||
private JCheckBoxMenuItem menuBarEmbeddedCheckBoxMenuItem;
|
private JCheckBoxMenuItem menuBarEmbeddedCheckBoxMenuItem;
|
||||||
private JCheckBoxMenuItem underlineMenuSelectionMenuItem;
|
private JCheckBoxMenuItem underlineMenuSelectionMenuItem;
|
||||||
private JCheckBoxMenuItem alwaysShowMnemonicsMenuItem;
|
private JCheckBoxMenuItem alwaysShowMnemonicsMenuItem;
|
||||||
|
private JCheckBoxMenuItem animatedLafChangeMenuItem;
|
||||||
private JTabbedPane tabbedPane;
|
private JTabbedPane tabbedPane;
|
||||||
private ControlBar controlBar;
|
private ControlBar controlBar;
|
||||||
|
private IJThemesPanel themesPanel;
|
||||||
// JFormDesigner - End of variables declaration //GEN-END:variables
|
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
|
JFDML JFormDesigner: "7.0.2.0.298" Java: "14" encoding: "UTF-8"
|
||||||
|
|
||||||
new FormModel {
|
new FormModel {
|
||||||
contentType: "form/swing"
|
contentType: "form/swing"
|
||||||
@@ -114,6 +114,9 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormComponent( "com.formdev.flatlaf.demo.intellijthemes.IJThemesPanel" ) {
|
add( new FormComponent( "com.formdev.flatlaf.demo.intellijthemes.IJThemesPanel" ) {
|
||||||
name: "themesPanel"
|
name: "themesPanel"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
}, new FormLayoutConstraints( class java.lang.String ) {
|
}, new FormLayoutConstraints( class java.lang.String ) {
|
||||||
"value": "East"
|
"value": "East"
|
||||||
} )
|
} )
|
||||||
@@ -322,6 +325,9 @@ new FormModel {
|
|||||||
add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
|
add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
|
||||||
name: "optionsMenu"
|
name: "optionsMenu"
|
||||||
"text": "Options"
|
"text": "Options"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
add( new FormComponent( "javax.swing.JCheckBoxMenuItem" ) {
|
add( new FormComponent( "javax.swing.JCheckBoxMenuItem" ) {
|
||||||
name: "windowDecorationsCheckBoxMenuItem"
|
name: "windowDecorationsCheckBoxMenuItem"
|
||||||
"text": "Window decorations"
|
"text": "Window decorations"
|
||||||
@@ -356,6 +362,20 @@ new FormModel {
|
|||||||
}
|
}
|
||||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "alwaysShowMnemonics", false ) )
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "alwaysShowMnemonics", false ) )
|
||||||
} )
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JCheckBoxMenuItem" ) {
|
||||||
|
name: "animatedLafChangeMenuItem"
|
||||||
|
"text": "Animated Laf Change"
|
||||||
|
"selected": true
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "animatedLafChangeChanged", false ) )
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JMenuItem" ) {
|
||||||
|
name: "showHintsMenuItem"
|
||||||
|
"text": "Show hints"
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showHintsChanged", false ) )
|
||||||
|
} )
|
||||||
} )
|
} )
|
||||||
add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
|
add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
|
||||||
name: "helpMenu"
|
name: "helpMenu"
|
||||||
|
|||||||
@@ -16,9 +16,11 @@
|
|||||||
|
|
||||||
package com.formdev.flatlaf.demo;
|
package com.formdev.flatlaf.demo;
|
||||||
|
|
||||||
|
import java.awt.Dimension;
|
||||||
import javax.swing.JDialog;
|
import javax.swing.JDialog;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
import com.formdev.flatlaf.FlatLaf;
|
||||||
import com.formdev.flatlaf.extras.FlatInspector;
|
import com.formdev.flatlaf.extras.FlatInspector;
|
||||||
import com.formdev.flatlaf.util.SystemInfo;
|
import com.formdev.flatlaf.util.SystemInfo;
|
||||||
|
|
||||||
@@ -30,9 +32,11 @@ public class FlatLafDemo
|
|||||||
static final String PREFS_ROOT_PATH = "/flatlaf-demo";
|
static final String PREFS_ROOT_PATH = "/flatlaf-demo";
|
||||||
static final String KEY_TAB = "tab";
|
static final String KEY_TAB = "tab";
|
||||||
|
|
||||||
|
static boolean screenshotsMode = Boolean.parseBoolean( System.getProperty( "flatlaf.demo.screenshotsMode" ) );
|
||||||
|
|
||||||
public static void main( String[] args ) {
|
public static void main( String[] args ) {
|
||||||
// on macOS enable screen menu bar
|
// on macOS enable screen menu bar
|
||||||
if( SystemInfo.IS_MAC && System.getProperty( "apple.laf.useScreenMenuBar" ) == null )
|
if( SystemInfo.isMacOS && System.getProperty( "apple.laf.useScreenMenuBar" ) == null )
|
||||||
System.setProperty( "apple.laf.useScreenMenuBar", "true" );
|
System.setProperty( "apple.laf.useScreenMenuBar", "true" );
|
||||||
|
|
||||||
SwingUtilities.invokeLater( () -> {
|
SwingUtilities.invokeLater( () -> {
|
||||||
@@ -42,6 +46,9 @@ public class FlatLafDemo
|
|||||||
JFrame.setDefaultLookAndFeelDecorated( true );
|
JFrame.setDefaultLookAndFeelDecorated( true );
|
||||||
JDialog.setDefaultLookAndFeelDecorated( true );
|
JDialog.setDefaultLookAndFeelDecorated( true );
|
||||||
|
|
||||||
|
// application specific UI defaults
|
||||||
|
FlatLaf.registerCustomDefaultsSource( "com.formdev.flatlaf.demo" );
|
||||||
|
|
||||||
// set look and feel
|
// set look and feel
|
||||||
DemoPrefs.initLaf( args );
|
DemoPrefs.initLaf( args );
|
||||||
|
|
||||||
@@ -51,6 +58,9 @@ public class FlatLafDemo
|
|||||||
// create frame
|
// create frame
|
||||||
DemoFrame frame = new DemoFrame();
|
DemoFrame frame = new DemoFrame();
|
||||||
|
|
||||||
|
if( FlatLafDemo.screenshotsMode )
|
||||||
|
frame.setPreferredSize( new Dimension( 1280, 620 ) );
|
||||||
|
|
||||||
// show frame
|
// show frame
|
||||||
frame.pack();
|
frame.pack();
|
||||||
frame.setLocationRelativeTo( null );
|
frame.setLocationRelativeTo( null );
|
||||||
|
|||||||
@@ -0,0 +1,219 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 FormDev Software GmbH
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.formdev.flatlaf.demo;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import java.awt.event.MouseAdapter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.swing.*;
|
||||||
|
import com.formdev.flatlaf.ui.FlatDropShadowBorder;
|
||||||
|
import com.formdev.flatlaf.ui.FlatPopupMenuBorder;
|
||||||
|
import com.formdev.flatlaf.ui.FlatUIUtils;
|
||||||
|
import com.formdev.flatlaf.util.UIScale;
|
||||||
|
import net.miginfocom.swing.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Karl Tauber
|
||||||
|
*/
|
||||||
|
class HintManager
|
||||||
|
{
|
||||||
|
private static final List<HintPanel> hintPanels = new ArrayList<>();
|
||||||
|
|
||||||
|
static void showHint( Hint hint ) {
|
||||||
|
// check whether user already closed the hint
|
||||||
|
if( DemoPrefs.getState().getBoolean( hint.prefsKey, false ) ) {
|
||||||
|
if( hint.nextHint != null )
|
||||||
|
showHint( hint.nextHint );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
HintPanel hintPanel = new HintPanel( hint );
|
||||||
|
hintPanel.showHint();
|
||||||
|
|
||||||
|
hintPanels.add( hintPanel );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void hideAllHints() {
|
||||||
|
HintPanel[] hintPanels2 = hintPanels.toArray( new HintPanel[hintPanels.size()] );
|
||||||
|
for( HintPanel hintPanel : hintPanels2 )
|
||||||
|
hintPanel.hideHint();
|
||||||
|
}
|
||||||
|
|
||||||
|
//---- class HintPanel ----------------------------------------------------
|
||||||
|
|
||||||
|
static class Hint
|
||||||
|
{
|
||||||
|
private final String message;
|
||||||
|
private final Component owner;
|
||||||
|
private final int position;
|
||||||
|
private final String prefsKey;
|
||||||
|
private final Hint nextHint;
|
||||||
|
|
||||||
|
Hint( String message, Component owner, int position, String prefsKey, Hint nextHint ) {
|
||||||
|
this.message = message;
|
||||||
|
this.owner = owner;
|
||||||
|
this.position = position;
|
||||||
|
this.prefsKey = prefsKey;
|
||||||
|
this.nextHint = nextHint;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//---- class HintPanel ----------------------------------------------------
|
||||||
|
|
||||||
|
private static class HintPanel
|
||||||
|
extends JPanel
|
||||||
|
{
|
||||||
|
private final Hint hint;
|
||||||
|
|
||||||
|
private JPanel popup;
|
||||||
|
|
||||||
|
private HintPanel( Hint hint ) {
|
||||||
|
this.hint = hint;
|
||||||
|
|
||||||
|
initComponents();
|
||||||
|
|
||||||
|
hintLabel.setText( "<html>" + hint.message + "</html>" );
|
||||||
|
|
||||||
|
// grab all mouse events to avoid that components overlapped
|
||||||
|
// by the hint panel receive them
|
||||||
|
addMouseListener( new MouseAdapter() {} );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateUI() {
|
||||||
|
super.updateUI();
|
||||||
|
|
||||||
|
setBackground( UIManager.getColor( "HintPanel.backgroundColor" ) );
|
||||||
|
setBorder( new FlatPopupMenuBorder() );
|
||||||
|
}
|
||||||
|
|
||||||
|
void showHint() {
|
||||||
|
JRootPane rootPane = SwingUtilities.getRootPane( hint.owner );
|
||||||
|
if( rootPane == null )
|
||||||
|
return;
|
||||||
|
|
||||||
|
JLayeredPane layeredPane = rootPane.getLayeredPane();
|
||||||
|
|
||||||
|
// create a popup panel that has a drop shadow
|
||||||
|
popup = new JPanel( new BorderLayout() ) {
|
||||||
|
@Override
|
||||||
|
public void updateUI() {
|
||||||
|
super.updateUI();
|
||||||
|
|
||||||
|
setBorder( new FlatDropShadowBorder(
|
||||||
|
UIManager.getColor( "Popup.dropShadowColor" ),
|
||||||
|
UIManager.getInsets( "Popup.dropShadowInsets" ),
|
||||||
|
FlatUIUtils.getUIFloat( "Popup.dropShadowOpacity", 0.5f ) ) );
|
||||||
|
|
||||||
|
// use invokeLater because at this time the UI delegates
|
||||||
|
// of child components are not yet updated
|
||||||
|
EventQueue.invokeLater( () -> {
|
||||||
|
validate();
|
||||||
|
setSize( getPreferredSize() );
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
popup.setOpaque( false );
|
||||||
|
popup.add( this );
|
||||||
|
|
||||||
|
// calculate x/y location for hint popup
|
||||||
|
Point pt = SwingUtilities.convertPoint( hint.owner, 0, 0, layeredPane );
|
||||||
|
int x = pt.x;
|
||||||
|
int y = pt.y;
|
||||||
|
Dimension size = popup.getPreferredSize();
|
||||||
|
int gap = UIScale.scale( 6 );
|
||||||
|
|
||||||
|
switch( hint.position ) {
|
||||||
|
case SwingConstants.LEFT:
|
||||||
|
x -= size.width + gap;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SwingConstants.TOP:
|
||||||
|
y -= size.height + gap;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SwingConstants.RIGHT:
|
||||||
|
x += hint.owner.getWidth() + gap;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SwingConstants.BOTTOM:
|
||||||
|
y += hint.owner.getHeight() + gap;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// set hint popup size and show it
|
||||||
|
popup.setBounds( x, y, size.width, size.height );
|
||||||
|
layeredPane.add( popup, JLayeredPane.POPUP_LAYER );
|
||||||
|
}
|
||||||
|
|
||||||
|
void hideHint() {
|
||||||
|
if( popup != null ) {
|
||||||
|
Container parent = popup.getParent();
|
||||||
|
if( parent != null ) {
|
||||||
|
parent.remove( popup );
|
||||||
|
parent.repaint( popup.getX(), popup.getY(), popup.getWidth(), popup.getHeight() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hintPanels.remove( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void gotIt() {
|
||||||
|
// hide hint
|
||||||
|
hideHint();
|
||||||
|
|
||||||
|
// remember that user closed the hint
|
||||||
|
DemoPrefs.getState().putBoolean( hint.prefsKey, true );
|
||||||
|
|
||||||
|
// show next hint (if any)
|
||||||
|
if( hint.nextHint != null )
|
||||||
|
HintManager.showHint( hint.nextHint );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initComponents() {
|
||||||
|
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
||||||
|
hintLabel = new JLabel();
|
||||||
|
gotItButton = new JButton();
|
||||||
|
|
||||||
|
//======== this ========
|
||||||
|
setLayout(new MigLayout(
|
||||||
|
"insets dialog,hidemode 3",
|
||||||
|
// columns
|
||||||
|
"[::200,fill]",
|
||||||
|
// rows
|
||||||
|
"[]para" +
|
||||||
|
"[]"));
|
||||||
|
|
||||||
|
//---- hintLabel ----
|
||||||
|
hintLabel.setText("hint");
|
||||||
|
add(hintLabel, "cell 0 0");
|
||||||
|
|
||||||
|
//---- gotItButton ----
|
||||||
|
gotItButton.setText("Got it!");
|
||||||
|
gotItButton.setFocusable(false);
|
||||||
|
gotItButton.addActionListener(e -> gotIt());
|
||||||
|
add(gotItButton, "cell 0 1,alignx right,growx 0");
|
||||||
|
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||||
|
}
|
||||||
|
|
||||||
|
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
||||||
|
private JLabel hintLabel;
|
||||||
|
private JButton gotItButton;
|
||||||
|
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
JFDML JFormDesigner: "7.0.2.0.298" Java: "14" encoding: "UTF-8"
|
||||||
|
|
||||||
|
new FormModel {
|
||||||
|
contentType: "form/swing"
|
||||||
|
root: new FormRoot {
|
||||||
|
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
|
"$layoutConstraints": "insets dialog,hidemode 3"
|
||||||
|
"$columnConstraints": "[::200,fill]"
|
||||||
|
"$rowConstraints": "[]para[]"
|
||||||
|
} ) {
|
||||||
|
name: "panel"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.className": "HintPanel"
|
||||||
|
}
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "hintLabel"
|
||||||
|
"text": "hint"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 0"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JButton" ) {
|
||||||
|
name: "gotItButton"
|
||||||
|
"text": "Got it!"
|
||||||
|
"focusable": false
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "gotIt", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 1,alignx right,growx 0"
|
||||||
|
} )
|
||||||
|
}, new FormLayoutConstraints( null ) {
|
||||||
|
"location": new java.awt.Point( 0, 0 )
|
||||||
|
"size": new java.awt.Dimension( 400, 300 )
|
||||||
|
} )
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -59,7 +59,6 @@ class MoreComponentsPanel
|
|||||||
JSeparator separator2 = new JSeparator();
|
JSeparator separator2 = new JSeparator();
|
||||||
JSlider slider2 = new JSlider();
|
JSlider slider2 = new JSlider();
|
||||||
JSlider slider4 = new JSlider();
|
JSlider slider4 = new JSlider();
|
||||||
JScrollPane scrollPane14 = new JScrollPane();
|
|
||||||
progressBar3 = new JProgressBar();
|
progressBar3 = new JProgressBar();
|
||||||
progressBar4 = new JProgressBar();
|
progressBar4 = new JProgressBar();
|
||||||
JToolBar toolBar2 = new JToolBar();
|
JToolBar toolBar2 = new JToolBar();
|
||||||
@@ -67,11 +66,12 @@ class MoreComponentsPanel
|
|||||||
JButton button10 = new JButton();
|
JButton button10 = new JButton();
|
||||||
JButton button11 = new JButton();
|
JButton button11 = new JButton();
|
||||||
JToggleButton toggleButton7 = new JToggleButton();
|
JToggleButton toggleButton7 = new JToggleButton();
|
||||||
|
JPanel panel2 = new JPanel();
|
||||||
JLabel scrollBarLabel = new JLabel();
|
JLabel scrollBarLabel = new JLabel();
|
||||||
JScrollBar scrollBar1 = new JScrollBar();
|
JScrollBar scrollBar1 = new JScrollBar();
|
||||||
JLabel label4 = new JLabel();
|
|
||||||
JScrollBar scrollBar4 = new JScrollBar();
|
JScrollBar scrollBar4 = new JScrollBar();
|
||||||
JPanel panel3 = new JPanel();
|
JPanel panel3 = new JPanel();
|
||||||
|
JLabel label4 = new JLabel();
|
||||||
JLabel label3 = new JLabel();
|
JLabel label3 = new JLabel();
|
||||||
JScrollPane scrollPane15 = new JScrollPane();
|
JScrollPane scrollPane15 = new JScrollPane();
|
||||||
JEditorPane editorPane6 = new JEditorPane();
|
JEditorPane editorPane6 = new JEditorPane();
|
||||||
@@ -81,7 +81,6 @@ class MoreComponentsPanel
|
|||||||
JScrollBar scrollBar6 = new JScrollBar();
|
JScrollBar scrollBar6 = new JScrollBar();
|
||||||
JLabel separatorLabel = new JLabel();
|
JLabel separatorLabel = new JLabel();
|
||||||
JSeparator separator1 = new JSeparator();
|
JSeparator separator1 = new JSeparator();
|
||||||
JPanel panel2 = new JPanel();
|
|
||||||
JLabel sliderLabel = new JLabel();
|
JLabel sliderLabel = new JLabel();
|
||||||
JSlider slider1 = new JSlider();
|
JSlider slider1 = new JSlider();
|
||||||
JSlider slider6 = new JSlider();
|
JSlider slider6 = new JSlider();
|
||||||
@@ -105,13 +104,12 @@ class MoreComponentsPanel
|
|||||||
|
|
||||||
//======== this ========
|
//======== this ========
|
||||||
setLayout(new MigLayout(
|
setLayout(new MigLayout(
|
||||||
"hidemode 3",
|
"insets dialog,hidemode 3",
|
||||||
// columns
|
// columns
|
||||||
"[]" +
|
"[]" +
|
||||||
"[]" +
|
"[]" +
|
||||||
"[]" +
|
"[]" +
|
||||||
"[]" +
|
"[]" +
|
||||||
"[]" +
|
|
||||||
"[]",
|
"[]",
|
||||||
// rows
|
// rows
|
||||||
"[]" +
|
"[]" +
|
||||||
@@ -142,7 +140,7 @@ class MoreComponentsPanel
|
|||||||
}
|
}
|
||||||
scrollPane13.setViewportView(panel1);
|
scrollPane13.setViewportView(panel1);
|
||||||
}
|
}
|
||||||
add(scrollPane13, "cell 1 0,grow,width 70,height 70");
|
add(scrollPane13, "cell 1 0,grow,width 70,height 40");
|
||||||
add(scrollBar2, "cell 2 0 1 6,growy");
|
add(scrollBar2, "cell 2 0 1 6,growy");
|
||||||
|
|
||||||
//---- scrollBar3 ----
|
//---- scrollBar3 ----
|
||||||
@@ -165,7 +163,7 @@ class MoreComponentsPanel
|
|||||||
//---- slider2 ----
|
//---- slider2 ----
|
||||||
slider2.setOrientation(SwingConstants.VERTICAL);
|
slider2.setOrientation(SwingConstants.VERTICAL);
|
||||||
slider2.setValue(30);
|
slider2.setValue(30);
|
||||||
add(slider2, "cell 2 0 1 6,growy");
|
add(slider2, "cell 2 0 1 6,growy,height 100");
|
||||||
|
|
||||||
//---- slider4 ----
|
//---- slider4 ----
|
||||||
slider4.setMinorTickSpacing(10);
|
slider4.setMinorTickSpacing(10);
|
||||||
@@ -174,19 +172,18 @@ class MoreComponentsPanel
|
|||||||
slider4.setPaintLabels(true);
|
slider4.setPaintLabels(true);
|
||||||
slider4.setOrientation(SwingConstants.VERTICAL);
|
slider4.setOrientation(SwingConstants.VERTICAL);
|
||||||
slider4.setValue(30);
|
slider4.setValue(30);
|
||||||
add(slider4, "cell 2 0 1 6,growy");
|
add(slider4, "cell 2 0 1 6,growy,height 100");
|
||||||
add(scrollPane14, "cell 3 0,grow");
|
|
||||||
|
|
||||||
//---- progressBar3 ----
|
//---- progressBar3 ----
|
||||||
progressBar3.setOrientation(SwingConstants.VERTICAL);
|
progressBar3.setOrientation(SwingConstants.VERTICAL);
|
||||||
progressBar3.setValue(60);
|
progressBar3.setValue(60);
|
||||||
add(progressBar3, "cell 4 0 1 6,growy");
|
add(progressBar3, "cell 2 0 1 6,growy");
|
||||||
|
|
||||||
//---- progressBar4 ----
|
//---- progressBar4 ----
|
||||||
progressBar4.setOrientation(SwingConstants.VERTICAL);
|
progressBar4.setOrientation(SwingConstants.VERTICAL);
|
||||||
progressBar4.setValue(60);
|
progressBar4.setValue(60);
|
||||||
progressBar4.setStringPainted(true);
|
progressBar4.setStringPainted(true);
|
||||||
add(progressBar4, "cell 4 0 1 6,growy");
|
add(progressBar4, "cell 2 0 1 6,growy");
|
||||||
|
|
||||||
//======== toolBar2 ========
|
//======== toolBar2 ========
|
||||||
{
|
{
|
||||||
@@ -209,7 +206,14 @@ class MoreComponentsPanel
|
|||||||
toggleButton7.setIcon(UIManager.getIcon("Tree.closedIcon"));
|
toggleButton7.setIcon(UIManager.getIcon("Tree.closedIcon"));
|
||||||
toolBar2.add(toggleButton7);
|
toolBar2.add(toggleButton7);
|
||||||
}
|
}
|
||||||
add(toolBar2, "cell 4 0 1 6,growy");
|
add(toolBar2, "cell 2 0 1 6,growy");
|
||||||
|
|
||||||
|
//======== panel2 ========
|
||||||
|
{
|
||||||
|
panel2.setBorder(new TitledBorder("TitledBorder"));
|
||||||
|
panel2.setLayout(new FlowLayout());
|
||||||
|
}
|
||||||
|
add(panel2, "cell 3 0 1 6,grow");
|
||||||
|
|
||||||
//---- scrollBarLabel ----
|
//---- scrollBarLabel ----
|
||||||
scrollBarLabel.setText("JScrollBar:");
|
scrollBarLabel.setText("JScrollBar:");
|
||||||
@@ -219,10 +223,6 @@ class MoreComponentsPanel
|
|||||||
scrollBar1.setOrientation(Adjustable.HORIZONTAL);
|
scrollBar1.setOrientation(Adjustable.HORIZONTAL);
|
||||||
add(scrollBar1, "cell 1 1,growx");
|
add(scrollBar1, "cell 1 1,growx");
|
||||||
|
|
||||||
//---- label4 ----
|
|
||||||
label4.setText("HTML:");
|
|
||||||
add(label4, "cell 5 1");
|
|
||||||
|
|
||||||
//---- scrollBar4 ----
|
//---- scrollBar4 ----
|
||||||
scrollBar4.setOrientation(Adjustable.HORIZONTAL);
|
scrollBar4.setOrientation(Adjustable.HORIZONTAL);
|
||||||
scrollBar4.setEnabled(false);
|
scrollBar4.setEnabled(false);
|
||||||
@@ -238,11 +238,16 @@ class MoreComponentsPanel
|
|||||||
// rows
|
// rows
|
||||||
"[]" +
|
"[]" +
|
||||||
"[]" +
|
"[]" +
|
||||||
|
"[]" +
|
||||||
"[]"));
|
"[]"));
|
||||||
|
|
||||||
|
//---- label4 ----
|
||||||
|
label4.setText("HTML:");
|
||||||
|
panel3.add(label4, "cell 0 0");
|
||||||
|
|
||||||
//---- label3 ----
|
//---- label3 ----
|
||||||
label3.setText("<html>JLabel HTML<br>Sample <b>content</b><br> <u>text</u> with <a href=\"#\">link</a></html>");
|
label3.setText("<html>JLabel HTML<br>Sample <b>content</b><br> <u>text</u> with <a href=\"#\">link</a></html>");
|
||||||
panel3.add(label3, "cell 0 0");
|
panel3.add(label3, "cell 0 1");
|
||||||
|
|
||||||
//======== scrollPane15 ========
|
//======== scrollPane15 ========
|
||||||
{
|
{
|
||||||
@@ -252,7 +257,7 @@ class MoreComponentsPanel
|
|||||||
editorPane6.setText("JEditorPane HTML<br>Sample <b>content</b><br> <u>text</u> with <a href=\"#\">link</a>");
|
editorPane6.setText("JEditorPane HTML<br>Sample <b>content</b><br> <u>text</u> with <a href=\"#\">link</a>");
|
||||||
scrollPane15.setViewportView(editorPane6);
|
scrollPane15.setViewportView(editorPane6);
|
||||||
}
|
}
|
||||||
panel3.add(scrollPane15, "cell 0 1,grow");
|
panel3.add(scrollPane15, "cell 0 2,grow");
|
||||||
|
|
||||||
//======== scrollPane16 ========
|
//======== scrollPane16 ========
|
||||||
{
|
{
|
||||||
@@ -262,9 +267,9 @@ class MoreComponentsPanel
|
|||||||
textPane6.setText("JTextPane HTML<br>Sample <b>content</b><br> <u>text</u> with <a href=\"#\">link</a>");
|
textPane6.setText("JTextPane HTML<br>Sample <b>content</b><br> <u>text</u> with <a href=\"#\">link</a>");
|
||||||
scrollPane16.setViewportView(textPane6);
|
scrollPane16.setViewportView(textPane6);
|
||||||
}
|
}
|
||||||
panel3.add(scrollPane16, "cell 0 2,grow");
|
panel3.add(scrollPane16, "cell 0 3,grow");
|
||||||
}
|
}
|
||||||
add(panel3, "cell 5 2 1 9,aligny top,growy 0");
|
add(panel3, "cell 4 0 1 8,aligny top,growy 0");
|
||||||
|
|
||||||
//---- scrollBar5 ----
|
//---- scrollBar5 ----
|
||||||
scrollBar5.setOrientation(Adjustable.HORIZONTAL);
|
scrollBar5.setOrientation(Adjustable.HORIZONTAL);
|
||||||
@@ -282,13 +287,6 @@ class MoreComponentsPanel
|
|||||||
add(separatorLabel, "cell 0 5");
|
add(separatorLabel, "cell 0 5");
|
||||||
add(separator1, "cell 1 5,growx");
|
add(separator1, "cell 1 5,growx");
|
||||||
|
|
||||||
//======== panel2 ========
|
|
||||||
{
|
|
||||||
panel2.setBorder(new TitledBorder("TitledBorder"));
|
|
||||||
panel2.setLayout(new FlowLayout());
|
|
||||||
}
|
|
||||||
add(panel2, "cell 3 5,grow");
|
|
||||||
|
|
||||||
//---- sliderLabel ----
|
//---- sliderLabel ----
|
||||||
sliderLabel.setText("JSlider:");
|
sliderLabel.setText("JSlider:");
|
||||||
add(sliderLabel, "cell 0 6");
|
add(sliderLabel, "cell 0 6");
|
||||||
@@ -389,6 +387,17 @@ class MoreComponentsPanel
|
|||||||
}
|
}
|
||||||
add(toolBar1, "cell 1 10 3 1,growx");
|
add(toolBar1, "cell 1 10 3 1,growx");
|
||||||
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||||
|
|
||||||
|
if( FlatLafDemo.screenshotsMode ) {
|
||||||
|
Component[] components = new Component[] {
|
||||||
|
indeterminateCheckBox,
|
||||||
|
toolTipLabel, toolTip1, toolTip2,
|
||||||
|
toolBarLabel, toolBar1, toolBar2,
|
||||||
|
};
|
||||||
|
|
||||||
|
for( Component c : components )
|
||||||
|
c.setVisible( false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
|
JFDML JFormDesigner: "7.0.2.0.298" Java: "14" encoding: "UTF-8"
|
||||||
|
|
||||||
new FormModel {
|
new FormModel {
|
||||||
contentType: "form/swing"
|
contentType: "form/swing"
|
||||||
@@ -7,8 +7,8 @@ new FormModel {
|
|||||||
"JavaCodeGenerator.defaultVariableLocal": true
|
"JavaCodeGenerator.defaultVariableLocal": true
|
||||||
}
|
}
|
||||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$layoutConstraints": "hidemode 3"
|
"$layoutConstraints": "insets dialog,hidemode 3"
|
||||||
"$columnConstraints": "[][][][][][]"
|
"$columnConstraints": "[][][][][]"
|
||||||
"$rowConstraints": "[][][][][][][][][][][]"
|
"$rowConstraints": "[][][][][][][][][][][]"
|
||||||
} ) {
|
} ) {
|
||||||
name: "this"
|
name: "this"
|
||||||
@@ -27,7 +27,7 @@ new FormModel {
|
|||||||
"preferredSize": new java.awt.Dimension( 200, 200 )
|
"preferredSize": new java.awt.Dimension( 200, 200 )
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 0,grow,width 70,height 70"
|
"value": "cell 1 0,grow,width 70,height 40"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JScrollBar" ) {
|
add( new FormComponent( "javax.swing.JScrollBar" ) {
|
||||||
name: "scrollBar2"
|
name: "scrollBar2"
|
||||||
@@ -64,7 +64,7 @@ new FormModel {
|
|||||||
"orientation": 1
|
"orientation": 1
|
||||||
"value": 30
|
"value": 30
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 0 1 6,growy"
|
"value": "cell 2 0 1 6,growy,height 100"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JSlider" ) {
|
add( new FormComponent( "javax.swing.JSlider" ) {
|
||||||
name: "slider4"
|
name: "slider4"
|
||||||
@@ -75,12 +75,7 @@ new FormModel {
|
|||||||
"orientation": 1
|
"orientation": 1
|
||||||
"value": 30
|
"value": 30
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 0 1 6,growy"
|
"value": "cell 2 0 1 6,growy,height 100"
|
||||||
} )
|
|
||||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
|
||||||
name: "scrollPane14"
|
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
|
||||||
"value": "cell 3 0,grow"
|
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JProgressBar" ) {
|
add( new FormComponent( "javax.swing.JProgressBar" ) {
|
||||||
name: "progressBar3"
|
name: "progressBar3"
|
||||||
@@ -90,7 +85,7 @@ new FormModel {
|
|||||||
"JavaCodeGenerator.variableLocal": false
|
"JavaCodeGenerator.variableLocal": false
|
||||||
}
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 4 0 1 6,growy"
|
"value": "cell 2 0 1 6,growy"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JProgressBar" ) {
|
add( new FormComponent( "javax.swing.JProgressBar" ) {
|
||||||
name: "progressBar4"
|
name: "progressBar4"
|
||||||
@@ -101,7 +96,7 @@ new FormModel {
|
|||||||
"JavaCodeGenerator.variableLocal": false
|
"JavaCodeGenerator.variableLocal": false
|
||||||
}
|
}
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 4 0 1 6,growy"
|
"value": "cell 2 0 1 6,growy"
|
||||||
} )
|
} )
|
||||||
add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
|
add( new FormContainer( "javax.swing.JToolBar", new FormLayoutManager( class javax.swing.JToolBar ) ) {
|
||||||
name: "toolBar2"
|
name: "toolBar2"
|
||||||
@@ -126,7 +121,13 @@ new FormModel {
|
|||||||
"icon": new com.jformdesigner.model.SwingIcon( 2, "Tree.closedIcon" )
|
"icon": new com.jformdesigner.model.SwingIcon( 2, "Tree.closedIcon" )
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 4 0 1 6,growy"
|
"value": "cell 2 0 1 6,growy"
|
||||||
|
} )
|
||||||
|
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.FlowLayout ) ) {
|
||||||
|
name: "panel2"
|
||||||
|
"border": new javax.swing.border.TitledBorder( "TitledBorder" )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 3 0 1 6,grow"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "scrollBarLabel"
|
name: "scrollBarLabel"
|
||||||
@@ -140,12 +141,6 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 1,growx"
|
"value": "cell 1 1,growx"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
|
||||||
name: "label4"
|
|
||||||
"text": "HTML:"
|
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
|
||||||
"value": "cell 5 1"
|
|
||||||
} )
|
|
||||||
add( new FormComponent( "javax.swing.JScrollBar" ) {
|
add( new FormComponent( "javax.swing.JScrollBar" ) {
|
||||||
name: "scrollBar4"
|
name: "scrollBar4"
|
||||||
"orientation": 0
|
"orientation": 0
|
||||||
@@ -155,16 +150,22 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$columnConstraints": "[]"
|
"$columnConstraints": "[]"
|
||||||
"$rowConstraints": "[][][]"
|
"$rowConstraints": "[][][][]"
|
||||||
"$layoutConstraints": "ltr,insets 0,hidemode 3"
|
"$layoutConstraints": "ltr,insets 0,hidemode 3"
|
||||||
} ) {
|
} ) {
|
||||||
name: "panel3"
|
name: "panel3"
|
||||||
"opaque": false
|
"opaque": false
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "label4"
|
||||||
|
"text": "HTML:"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 0"
|
||||||
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "label3"
|
name: "label3"
|
||||||
"text": "<html>JLabel HTML<br>Sample <b>content</b><br> <u>text</u> with <a href=\"#\">link</a></html>"
|
"text": "<html>JLabel HTML<br>Sample <b>content</b><br> <u>text</u> with <a href=\"#\">link</a></html>"
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 0"
|
"value": "cell 0 1"
|
||||||
} )
|
} )
|
||||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||||
name: "scrollPane15"
|
name: "scrollPane15"
|
||||||
@@ -174,7 +175,7 @@ new FormModel {
|
|||||||
"text": "JEditorPane HTML<br>Sample <b>content</b><br> <u>text</u> with <a href=\"#\">link</a>"
|
"text": "JEditorPane HTML<br>Sample <b>content</b><br> <u>text</u> with <a href=\"#\">link</a>"
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 1,grow"
|
"value": "cell 0 2,grow"
|
||||||
} )
|
} )
|
||||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||||
name: "scrollPane16"
|
name: "scrollPane16"
|
||||||
@@ -184,10 +185,10 @@ new FormModel {
|
|||||||
"text": "JTextPane HTML<br>Sample <b>content</b><br> <u>text</u> with <a href=\"#\">link</a>"
|
"text": "JTextPane HTML<br>Sample <b>content</b><br> <u>text</u> with <a href=\"#\">link</a>"
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 2,grow"
|
"value": "cell 0 3,grow"
|
||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 5 2 1 9,aligny top,growy 0"
|
"value": "cell 4 0 1 8,aligny top,growy 0"
|
||||||
} )
|
} )
|
||||||
add( new FormComponent( "javax.swing.JScrollBar" ) {
|
add( new FormComponent( "javax.swing.JScrollBar" ) {
|
||||||
name: "scrollBar5"
|
name: "scrollBar5"
|
||||||
@@ -215,12 +216,6 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 1 5,growx"
|
"value": "cell 1 5,growx"
|
||||||
} )
|
} )
|
||||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.FlowLayout ) ) {
|
|
||||||
name: "panel2"
|
|
||||||
"border": new javax.swing.border.TitledBorder( "TitledBorder" )
|
|
||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
|
||||||
"value": "cell 3 5,grow"
|
|
||||||
} )
|
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "sliderLabel"
|
name: "sliderLabel"
|
||||||
"text": "JSlider:"
|
"text": "JSlider:"
|
||||||
@@ -365,7 +360,7 @@ new FormModel {
|
|||||||
} )
|
} )
|
||||||
}, new FormLayoutConstraints( null ) {
|
}, new FormLayoutConstraints( null ) {
|
||||||
"location": new java.awt.Point( 0, 0 )
|
"location": new java.awt.Point( 0, 0 )
|
||||||
"size": new java.awt.Dimension( 790, 715 )
|
"size": new java.awt.Dimension( 700, 420 )
|
||||||
} )
|
} )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class IJThemeInfo
|
|||||||
{
|
{
|
||||||
final String name;
|
final String name;
|
||||||
final String resourceName;
|
final String resourceName;
|
||||||
|
final boolean dark;
|
||||||
final String license;
|
final String license;
|
||||||
final String licenseFile;
|
final String licenseFile;
|
||||||
final String sourceCodeUrl;
|
final String sourceCodeUrl;
|
||||||
@@ -32,13 +33,14 @@ class IJThemeInfo
|
|||||||
final File themeFile;
|
final File themeFile;
|
||||||
final String lafClassName;
|
final String lafClassName;
|
||||||
|
|
||||||
IJThemeInfo( String name, String resourceName,
|
IJThemeInfo( String name, String resourceName, boolean dark,
|
||||||
String license, String licenseFile,
|
String license, String licenseFile,
|
||||||
String sourceCodeUrl, String sourceCodePath,
|
String sourceCodeUrl, String sourceCodePath,
|
||||||
File themeFile, String lafClassName )
|
File themeFile, String lafClassName )
|
||||||
{
|
{
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.resourceName = resourceName;
|
this.resourceName = resourceName;
|
||||||
|
this.dark = dark;
|
||||||
this.license = license;
|
this.license = license;
|
||||||
this.licenseFile = licenseFile;
|
this.licenseFile = licenseFile;
|
||||||
this.sourceCodeUrl = sourceCodeUrl;
|
this.sourceCodeUrl = sourceCodeUrl;
|
||||||
|
|||||||
@@ -55,12 +55,13 @@ class IJThemesManager
|
|||||||
String resourceName = e.getKey();
|
String resourceName = e.getKey();
|
||||||
Map<String, String> value = (Map<String, String>) e.getValue();
|
Map<String, String> value = (Map<String, String>) e.getValue();
|
||||||
String name = value.get( "name" );
|
String name = value.get( "name" );
|
||||||
|
boolean dark = Boolean.parseBoolean( value.get( "dark" ) );
|
||||||
String license = value.get( "license" );
|
String license = value.get( "license" );
|
||||||
String licenseFile = value.get( "licenseFile" );
|
String licenseFile = value.get( "licenseFile" );
|
||||||
String sourceCodeUrl = value.get( "sourceCodeUrl" );
|
String sourceCodeUrl = value.get( "sourceCodeUrl" );
|
||||||
String sourceCodePath = value.get( "sourceCodePath" );
|
String sourceCodePath = value.get( "sourceCodePath" );
|
||||||
|
|
||||||
bundledThemes.add( new IJThemeInfo( name, resourceName, license, licenseFile, sourceCodeUrl, sourceCodePath, null, null ) );
|
bundledThemes.add( new IJThemeInfo( name, resourceName, dark, license, licenseFile, sourceCodeUrl, sourceCodePath, null, null ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +84,7 @@ class IJThemesManager
|
|||||||
String name = fname.endsWith( ".properties" )
|
String name = fname.endsWith( ".properties" )
|
||||||
? StringUtils.removeTrailing( fname, ".properties" )
|
? StringUtils.removeTrailing( fname, ".properties" )
|
||||||
: StringUtils.removeTrailing( fname, ".theme.json" );
|
: StringUtils.removeTrailing( fname, ".theme.json" );
|
||||||
moreThemes.add( new IJThemeInfo( name, null, null, null, null, null, f, null ) );
|
moreThemes.add( new IJThemeInfo( name, null, false, null, null, null, null, f, null ) );
|
||||||
lastModifiedMap.put( f, f.lastModified() );
|
lastModifiedMap.put( f, f.lastModified() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ package com.formdev.flatlaf.demo.intellijthemes;
|
|||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Desktop;
|
import java.awt.Desktop;
|
||||||
import java.awt.EventQueue;
|
import java.awt.EventQueue;
|
||||||
|
import java.awt.Rectangle;
|
||||||
import java.awt.Window;
|
import java.awt.Window;
|
||||||
import java.awt.event.WindowAdapter;
|
import java.awt.event.WindowAdapter;
|
||||||
import java.awt.event.WindowEvent;
|
import java.awt.event.WindowEvent;
|
||||||
@@ -49,6 +50,7 @@ import com.formdev.flatlaf.FlatLightLaf;
|
|||||||
import com.formdev.flatlaf.FlatPropertiesLaf;
|
import com.formdev.flatlaf.FlatPropertiesLaf;
|
||||||
import com.formdev.flatlaf.IntelliJTheme;
|
import com.formdev.flatlaf.IntelliJTheme;
|
||||||
import com.formdev.flatlaf.demo.DemoPrefs;
|
import com.formdev.flatlaf.demo.DemoPrefs;
|
||||||
|
import com.formdev.flatlaf.extras.FlatAnimatedLafChange;
|
||||||
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||||
import com.formdev.flatlaf.util.StringUtils;
|
import com.formdev.flatlaf.util.StringUtils;
|
||||||
import net.miginfocom.swing.*;
|
import net.miginfocom.swing.*;
|
||||||
@@ -119,6 +121,10 @@ public class IJThemesPanel
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateThemesList() {
|
private void updateThemesList() {
|
||||||
|
int filterLightDark = filterComboBox.getSelectedIndex();
|
||||||
|
boolean showLight = (filterLightDark != 2);
|
||||||
|
boolean showDark = (filterLightDark != 1);
|
||||||
|
|
||||||
// load theme infos
|
// load theme infos
|
||||||
themesManager.loadBundledThemes();
|
themesManager.loadBundledThemes();
|
||||||
themesManager.loadThemesFromDirectory();
|
themesManager.loadThemesFromDirectory();
|
||||||
@@ -128,15 +134,22 @@ public class IJThemesPanel
|
|||||||
themesManager.bundledThemes.sort( comparator );
|
themesManager.bundledThemes.sort( comparator );
|
||||||
themesManager.moreThemes.sort( comparator );
|
themesManager.moreThemes.sort( comparator );
|
||||||
|
|
||||||
|
// remember selection (must be invoked before clearing themes field)
|
||||||
|
IJThemeInfo oldSel = themesList.getSelectedValue();
|
||||||
|
|
||||||
themes.clear();
|
themes.clear();
|
||||||
categories.clear();
|
categories.clear();
|
||||||
|
|
||||||
// add core themes at beginning
|
// add core themes at beginning
|
||||||
categories.put( themes.size(), "Core Themes" );
|
categories.put( themes.size(), "Core Themes" );
|
||||||
themes.add( new IJThemeInfo( "Flat Light", null, null, null, null, null, null, FlatLightLaf.class.getName() ) );
|
if( showLight )
|
||||||
themes.add( new IJThemeInfo( "Flat Dark", null, null, null, null, null, null, FlatDarkLaf.class.getName() ) );
|
themes.add( new IJThemeInfo( "Flat Light", null, false, null, null, null, null, null, FlatLightLaf.class.getName() ) );
|
||||||
themes.add( new IJThemeInfo( "Flat IntelliJ", null, null, null, null, null, null, FlatIntelliJLaf.class.getName() ) );
|
if( showDark )
|
||||||
themes.add( new IJThemeInfo( "Flat Darcula", null, null, null, null, null, null, FlatDarculaLaf.class.getName() ) );
|
themes.add( new IJThemeInfo( "Flat Dark", null, true, null, null, null, null, null, FlatDarkLaf.class.getName() ) );
|
||||||
|
if( showLight )
|
||||||
|
themes.add( new IJThemeInfo( "Flat IntelliJ", null, false, null, null, null, null, null, FlatIntelliJLaf.class.getName() ) );
|
||||||
|
if( showDark )
|
||||||
|
themes.add( new IJThemeInfo( "Flat Darcula", null, true, null, null, null, null, null, FlatDarculaLaf.class.getName() ) );
|
||||||
|
|
||||||
// add themes from directory
|
// add themes from directory
|
||||||
categories.put( themes.size(), "Current Directory" );
|
categories.put( themes.size(), "Current Directory" );
|
||||||
@@ -145,15 +158,17 @@ public class IJThemesPanel
|
|||||||
// add uncategorized bundled themes
|
// add uncategorized bundled themes
|
||||||
categories.put( themes.size(), "IntelliJ Themes" );
|
categories.put( themes.size(), "IntelliJ Themes" );
|
||||||
for( IJThemeInfo ti : themesManager.bundledThemes ) {
|
for( IJThemeInfo ti : themesManager.bundledThemes ) {
|
||||||
if( !ti.name.contains( "/" ) )
|
boolean show = (showLight && !ti.dark) || (showDark && ti.dark);
|
||||||
|
if( show && !ti.name.contains( "/" ) )
|
||||||
themes.add( ti );
|
themes.add( ti );
|
||||||
}
|
}
|
||||||
|
|
||||||
// add categorized bundled themes
|
// add categorized bundled themes
|
||||||
String lastCategory = null;
|
String lastCategory = null;
|
||||||
for( IJThemeInfo ti : themesManager.bundledThemes ) {
|
for( IJThemeInfo ti : themesManager.bundledThemes ) {
|
||||||
|
boolean show = (showLight && !ti.dark) || (showDark && ti.dark);
|
||||||
int sep = ti.name.indexOf( '/' );
|
int sep = ti.name.indexOf( '/' );
|
||||||
if( sep < 0 )
|
if( !show || sep < 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
String category = ti.name.substring( 0, sep ).trim();
|
String category = ti.name.substring( 0, sep ).trim();
|
||||||
@@ -165,9 +180,6 @@ public class IJThemesPanel
|
|||||||
themes.add( ti );
|
themes.add( ti );
|
||||||
}
|
}
|
||||||
|
|
||||||
// remember selection
|
|
||||||
IJThemeInfo oldSel = themesList.getSelectedValue();
|
|
||||||
|
|
||||||
// fill themes list
|
// fill themes list
|
||||||
themesList.setModel( new AbstractListModel<IJThemeInfo>() {
|
themesList.setModel( new AbstractListModel<IJThemeInfo>() {
|
||||||
@Override
|
@Override
|
||||||
@@ -193,6 +205,18 @@ public class IJThemesPanel
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// select first theme if none selected
|
||||||
|
if( themesList.getSelectedIndex() < 0 )
|
||||||
|
themesList.setSelectedIndex( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
// scroll selection into visible area
|
||||||
|
int sel = themesList.getSelectedIndex();
|
||||||
|
if( sel >= 0 ) {
|
||||||
|
Rectangle bounds = themesList.getCellBounds( sel, sel );
|
||||||
|
if( bounds != null )
|
||||||
|
themesList.scrollRectToVisible( bounds );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,6 +243,8 @@ public class IJThemesPanel
|
|||||||
if( themeInfo.lafClassName.equals( UIManager.getLookAndFeel().getClass().getName() ) )
|
if( themeInfo.lafClassName.equals( UIManager.getLookAndFeel().getClass().getName() ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
FlatAnimatedLafChange.showSnapshot();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
UIManager.setLookAndFeel( themeInfo.lafClassName );
|
UIManager.setLookAndFeel( themeInfo.lafClassName );
|
||||||
} catch( Exception ex ) {
|
} catch( Exception ex ) {
|
||||||
@@ -226,6 +252,8 @@ public class IJThemesPanel
|
|||||||
showInformationDialog( "Failed to create '" + themeInfo.lafClassName + "'.", ex );
|
showInformationDialog( "Failed to create '" + themeInfo.lafClassName + "'.", ex );
|
||||||
}
|
}
|
||||||
} else if( themeInfo.themeFile != null ) {
|
} else if( themeInfo.themeFile != null ) {
|
||||||
|
FlatAnimatedLafChange.showSnapshot();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if( themeInfo.themeFile.getName().endsWith( ".properties" ) ) {
|
if( themeInfo.themeFile.getName().endsWith( ".properties" ) ) {
|
||||||
FlatLaf.install( new FlatPropertiesLaf( themeInfo.name, themeInfo.themeFile ) );
|
FlatLaf.install( new FlatPropertiesLaf( themeInfo.name, themeInfo.themeFile ) );
|
||||||
@@ -238,12 +266,15 @@ public class IJThemesPanel
|
|||||||
showInformationDialog( "Failed to load '" + themeInfo.themeFile + "'.", ex );
|
showInformationDialog( "Failed to load '" + themeInfo.themeFile + "'.", ex );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
FlatAnimatedLafChange.showSnapshot();
|
||||||
|
|
||||||
IntelliJTheme.install( getClass().getResourceAsStream( THEMES_PACKAGE + themeInfo.resourceName ) );
|
IntelliJTheme.install( getClass().getResourceAsStream( THEMES_PACKAGE + themeInfo.resourceName ) );
|
||||||
DemoPrefs.getState().put( DemoPrefs.KEY_LAF_THEME, DemoPrefs.RESOURCE_PREFIX + themeInfo.resourceName );
|
DemoPrefs.getState().put( DemoPrefs.KEY_LAF_THEME, DemoPrefs.RESOURCE_PREFIX + themeInfo.resourceName );
|
||||||
}
|
}
|
||||||
|
|
||||||
// update all components
|
// update all components
|
||||||
FlatLaf.updateUI();
|
FlatLaf.updateUI();
|
||||||
|
FlatAnimatedLafChange.hideSnapshotWithAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveTheme() {
|
private void saveTheme() {
|
||||||
@@ -373,12 +404,17 @@ public class IJThemesPanel
|
|||||||
isAdjustingThemesList = false;
|
isAdjustingThemesList = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void filterChanged() {
|
||||||
|
updateThemesList();
|
||||||
|
}
|
||||||
|
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
||||||
JLabel themesLabel = new JLabel();
|
JLabel themesLabel = new JLabel();
|
||||||
toolBar = new JToolBar();
|
toolBar = new JToolBar();
|
||||||
saveButton = new JButton();
|
saveButton = new JButton();
|
||||||
sourceCodeButton = new JButton();
|
sourceCodeButton = new JButton();
|
||||||
|
filterComboBox = new JComboBox<>();
|
||||||
themesScrollPane = new JScrollPane();
|
themesScrollPane = new JScrollPane();
|
||||||
themesList = new JList<>();
|
themesList = new JList<>();
|
||||||
|
|
||||||
@@ -411,6 +447,17 @@ public class IJThemesPanel
|
|||||||
}
|
}
|
||||||
add(toolBar, "cell 0 0,alignx right,growx 0");
|
add(toolBar, "cell 0 0,alignx right,growx 0");
|
||||||
|
|
||||||
|
//---- filterComboBox ----
|
||||||
|
filterComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
|
||||||
|
"all",
|
||||||
|
"light",
|
||||||
|
"dark"
|
||||||
|
}));
|
||||||
|
filterComboBox.putClientProperty("JComponent.minimumWidth", 0);
|
||||||
|
filterComboBox.setFocusable(false);
|
||||||
|
filterComboBox.addActionListener(e -> filterChanged());
|
||||||
|
add(filterComboBox, "cell 0 0,alignx right,growx 0");
|
||||||
|
|
||||||
//======== themesScrollPane ========
|
//======== themesScrollPane ========
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -427,6 +474,7 @@ public class IJThemesPanel
|
|||||||
private JToolBar toolBar;
|
private JToolBar toolBar;
|
||||||
private JButton saveButton;
|
private JButton saveButton;
|
||||||
private JButton sourceCodeButton;
|
private JButton sourceCodeButton;
|
||||||
|
private JComboBox<String> filterComboBox;
|
||||||
private JScrollPane themesScrollPane;
|
private JScrollPane themesScrollPane;
|
||||||
private JList<IJThemeInfo> themesList;
|
private JList<IJThemeInfo> themesList;
|
||||||
// JFormDesigner - End of variables declaration //GEN-END:variables
|
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
JFDML JFormDesigner: "7.0.0.0.194" Java: "11.0.2" encoding: "UTF-8"
|
JFDML JFormDesigner: "7.0.2.0.298" Java: "14" encoding: "UTF-8"
|
||||||
|
|
||||||
new FormModel {
|
new FormModel {
|
||||||
contentType: "form/swing"
|
contentType: "form/swing"
|
||||||
@@ -34,6 +34,20 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 0,alignx right,growx 0"
|
"value": "cell 0 0,alignx right,growx 0"
|
||||||
} )
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JComboBox" ) {
|
||||||
|
name: "filterComboBox"
|
||||||
|
"model": new javax.swing.DefaultComboBoxModel {
|
||||||
|
selectedItem: "all"
|
||||||
|
addElement( "all" )
|
||||||
|
addElement( "light" )
|
||||||
|
addElement( "dark" )
|
||||||
|
}
|
||||||
|
"$client.JComponent.minimumWidth": 0
|
||||||
|
"focusable": false
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "filterChanged", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 0,alignx right,growx 0"
|
||||||
|
} )
|
||||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||||
name: "themesScrollPane"
|
name: "themesScrollPane"
|
||||||
add( new FormComponent( "javax.swing.JList" ) {
|
add( new FormComponent( "javax.swing.JList" ) {
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#
|
||||||
|
# Copyright 2020 FormDev Software GmbH
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
HintPanel.backgroundColor=darken(#ffffe1,80%)
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#
|
||||||
|
# Copyright 2020 FormDev Software GmbH
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
HintPanel.backgroundColor=#ffffe1
|
||||||
@@ -13,6 +13,38 @@
|
|||||||
"sourceCodeUrl": "https://gitlab.com/zlamalp/arc-theme-idea",
|
"sourceCodeUrl": "https://gitlab.com/zlamalp/arc-theme-idea",
|
||||||
"sourceCodePath": "blob/master/resources/arc-theme-orange.theme.json"
|
"sourceCodePath": "blob/master/resources/arc-theme-orange.theme.json"
|
||||||
},
|
},
|
||||||
|
"arc_theme_dark.theme.json": {
|
||||||
|
"name": "Arc Dark",
|
||||||
|
"dark": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"licenseFile": "arc-themes.LICENSE.txt",
|
||||||
|
"sourceCodeUrl": "https://gitlab.com/zlamalp/arc-theme-idea",
|
||||||
|
"sourceCodePath": "blob/master/resources/arc_theme_dark.theme.json"
|
||||||
|
},
|
||||||
|
"arc_theme_dark_orange.theme.json": {
|
||||||
|
"name": "Arc Dark - Orange",
|
||||||
|
"dark": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"licenseFile": "arc-themes.LICENSE.txt",
|
||||||
|
"sourceCodeUrl": "https://gitlab.com/zlamalp/arc-theme-idea",
|
||||||
|
"sourceCodePath": "blob/master/resources/arc_theme_dark_orange.theme.json"
|
||||||
|
},
|
||||||
|
"Carbon.theme.json": {
|
||||||
|
"name": "Carbon",
|
||||||
|
"dark": true,
|
||||||
|
"license": "Apache License 2.0",
|
||||||
|
"licenseFile": "arc-themes.LICENSE.txt",
|
||||||
|
"sourceCodeUrl": "https://github.com/luisfer0793/theme-carbon",
|
||||||
|
"sourceCodePath": "blob/master/resources/matte_carbon_basics.theme.json"
|
||||||
|
},
|
||||||
|
"Cobalt_2.theme.json": {
|
||||||
|
"name": "Cobalt 2",
|
||||||
|
"dark": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"licenseFile": "Cobalt_2.LICENSE.txt",
|
||||||
|
"sourceCodeUrl": "https://github.com/ngehlert/cobalt2",
|
||||||
|
"sourceCodePath": "blob/master/Cobalt2-UI-Theme/resources/Cobalt_2.theme.json"
|
||||||
|
},
|
||||||
"Cyan.theme.json": {
|
"Cyan.theme.json": {
|
||||||
"name": "Cyan light",
|
"name": "Cyan light",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -22,6 +54,7 @@
|
|||||||
},
|
},
|
||||||
"DarkFlatTheme.theme.json": {
|
"DarkFlatTheme.theme.json": {
|
||||||
"name": "Dark Flat",
|
"name": "Dark Flat",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "DarkFlatTheme.LICENSE.txt",
|
"licenseFile": "DarkFlatTheme.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/nerzhulart/DarkFlatTheme",
|
"sourceCodeUrl": "https://github.com/nerzhulart/DarkFlatTheme",
|
||||||
@@ -29,6 +62,7 @@
|
|||||||
},
|
},
|
||||||
"DarkPurple.theme.json": {
|
"DarkPurple.theme.json": {
|
||||||
"name": "Dark purple",
|
"name": "Dark purple",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "DarkPurple.LICENSE.txt",
|
"licenseFile": "DarkPurple.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/OlyaB/DarkPurpleTheme",
|
"sourceCodeUrl": "https://github.com/OlyaB/DarkPurpleTheme",
|
||||||
@@ -36,6 +70,7 @@
|
|||||||
},
|
},
|
||||||
"Dracula.theme.json": {
|
"Dracula.theme.json": {
|
||||||
"name": "Dracula",
|
"name": "Dracula",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "Dracula.LICENSE.txt",
|
"licenseFile": "Dracula.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/dracula/jetbrains",
|
"sourceCodeUrl": "https://github.com/dracula/jetbrains",
|
||||||
@@ -43,6 +78,7 @@
|
|||||||
},
|
},
|
||||||
"Gradianto_dark_fuchsia.theme.json": {
|
"Gradianto_dark_fuchsia.theme.json": {
|
||||||
"name": "Gradianto Dark Fuchsia",
|
"name": "Gradianto Dark Fuchsia",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "Gradianto.LICENSE.txt",
|
"licenseFile": "Gradianto.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
|
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
|
||||||
@@ -50,6 +86,7 @@
|
|||||||
},
|
},
|
||||||
"Gradianto_deep_ocean.theme.json": {
|
"Gradianto_deep_ocean.theme.json": {
|
||||||
"name": "Gradianto Deep Ocean",
|
"name": "Gradianto Deep Ocean",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "Gradianto.LICENSE.txt",
|
"licenseFile": "Gradianto.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
|
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
|
||||||
@@ -57,6 +94,7 @@
|
|||||||
},
|
},
|
||||||
"Gradianto_midnight_blue.theme.json": {
|
"Gradianto_midnight_blue.theme.json": {
|
||||||
"name": "Gradianto Midnight Blue",
|
"name": "Gradianto Midnight Blue",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "Gradianto.LICENSE.txt",
|
"licenseFile": "Gradianto.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
|
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
|
||||||
@@ -71,6 +109,7 @@
|
|||||||
},
|
},
|
||||||
"gruvbox_dark_hard.theme.json": {
|
"gruvbox_dark_hard.theme.json": {
|
||||||
"name": "Gruvbox Dark Hard",
|
"name": "Gruvbox Dark Hard",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "gruvbox_theme.LICENSE.txt",
|
"licenseFile": "gruvbox_theme.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/Vincent-P/gruvbox-intellij-theme",
|
"sourceCodeUrl": "https://github.com/Vincent-P/gruvbox-intellij-theme",
|
||||||
@@ -78,6 +117,7 @@
|
|||||||
},
|
},
|
||||||
"gruvbox_dark_medium.theme.json": {
|
"gruvbox_dark_medium.theme.json": {
|
||||||
"name": "Gruvbox Dark Medium",
|
"name": "Gruvbox Dark Medium",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "gruvbox_theme.LICENSE.txt",
|
"licenseFile": "gruvbox_theme.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/Vincent-P/gruvbox-intellij-theme",
|
"sourceCodeUrl": "https://github.com/Vincent-P/gruvbox-intellij-theme",
|
||||||
@@ -85,6 +125,7 @@
|
|||||||
},
|
},
|
||||||
"gruvbox_dark_soft.theme.json": {
|
"gruvbox_dark_soft.theme.json": {
|
||||||
"name": "Gruvbox Dark Soft",
|
"name": "Gruvbox Dark Soft",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "gruvbox_theme.LICENSE.txt",
|
"licenseFile": "gruvbox_theme.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/Vincent-P/gruvbox-intellij-theme",
|
"sourceCodeUrl": "https://github.com/Vincent-P/gruvbox-intellij-theme",
|
||||||
@@ -92,6 +133,7 @@
|
|||||||
},
|
},
|
||||||
"HiberbeeDark.theme.json": {
|
"HiberbeeDark.theme.json": {
|
||||||
"name": "Hiberbee Dark",
|
"name": "Hiberbee Dark",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "Hiberbee.LICENSE.txt",
|
"licenseFile": "Hiberbee.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/Hiberbee/code-highlight-themes",
|
"sourceCodeUrl": "https://github.com/Hiberbee/code-highlight-themes",
|
||||||
@@ -99,6 +141,7 @@
|
|||||||
},
|
},
|
||||||
"HighContrast.theme.json": {
|
"HighContrast.theme.json": {
|
||||||
"name": "High contrast",
|
"name": "High contrast",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "HighContrast.LICENSE.txt",
|
"licenseFile": "HighContrast.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/OlyaB/HighContrastTheme",
|
"sourceCodeUrl": "https://github.com/OlyaB/HighContrastTheme",
|
||||||
@@ -113,6 +156,7 @@
|
|||||||
},
|
},
|
||||||
"MaterialTheme.theme.json": {
|
"MaterialTheme.theme.json": {
|
||||||
"name": "Material Design Dark",
|
"name": "Material Design Dark",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "MaterialTheme.LICENSE.txt",
|
"licenseFile": "MaterialTheme.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/xinkunZ/NotReallyMDTheme",
|
"sourceCodeUrl": "https://github.com/xinkunZ/NotReallyMDTheme",
|
||||||
@@ -120,6 +164,7 @@
|
|||||||
},
|
},
|
||||||
"Monocai.theme.json": {
|
"Monocai.theme.json": {
|
||||||
"name": "Monocai",
|
"name": "Monocai",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "Monocai.LICENSE.txt",
|
"licenseFile": "Monocai.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/bmikaili/intellij-monocai-theme",
|
"sourceCodeUrl": "https://github.com/bmikaili/intellij-monocai-theme",
|
||||||
@@ -127,6 +172,7 @@
|
|||||||
},
|
},
|
||||||
"nord.theme.json": {
|
"nord.theme.json": {
|
||||||
"name": "Nord",
|
"name": "Nord",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "nord.LICENSE.txt",
|
"licenseFile": "nord.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/arcticicestudio/nord-jetbrains",
|
"sourceCodeUrl": "https://github.com/arcticicestudio/nord-jetbrains",
|
||||||
@@ -134,27 +180,30 @@
|
|||||||
},
|
},
|
||||||
"one_dark.theme.json": {
|
"one_dark.theme.json": {
|
||||||
"name": "One Dark",
|
"name": "One Dark",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "one_dark.LICENSE.txt",
|
"licenseFile": "one_dark.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/one-dark/jetbrains-one-dark-theme",
|
"sourceCodeUrl": "https://github.com/one-dark/jetbrains-one-dark-theme",
|
||||||
"sourceCodePath": "blob/master/src/main/resources/themes/one_dark.theme.json"
|
"sourceCodePath": "blob/master/buildSrc/templates/oneDark.template.theme.json"
|
||||||
},
|
},
|
||||||
"solarized_dark_theme.theme.json": {
|
"SolarizedDark.theme.json": {
|
||||||
"name": "Solarized Dark",
|
"name": "Solarized Dark",
|
||||||
"license": "MIT",
|
"dark": true,
|
||||||
"licenseFile": "solarized_dark_theme.LICENSE.txt",
|
"license": "The Unlicense",
|
||||||
"sourceCodeUrl": "https://github.com/snowe2010/solarized-jetbrains",
|
"licenseFile": "Solarized.LICENSE.txt",
|
||||||
"sourceCodePath": "blob/master/src/solarized_dark_theme.theme.json"
|
"sourceCodeUrl": "https://github.com/4lex4/intellij-platform-solarized",
|
||||||
|
"sourceCodePath": "blob/master/resources/SolarizedDark.theme.json"
|
||||||
},
|
},
|
||||||
"solarized_light_theme.theme.json": {
|
"SolarizedLight.theme.json": {
|
||||||
"name": "Solarized Light",
|
"name": "Solarized Light",
|
||||||
"license": "MIT",
|
"license": "The Unlicense",
|
||||||
"licenseFile": "solarized_light_theme.LICENSE.txt",
|
"licenseFile": "Solarized.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/snowe2010/solarized-jetbrains",
|
"sourceCodeUrl": "https://github.com/4lex4/intellij-platform-solarized",
|
||||||
"sourceCodePath": "blob/master/src/solarized_light_theme.theme.json"
|
"sourceCodePath": "blob/master/resources/SolarizedLight.theme.json"
|
||||||
},
|
},
|
||||||
"Spacegray.theme.json": {
|
"Spacegray.theme.json": {
|
||||||
"name": "Spacegray",
|
"name": "Spacegray",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "Spacegray.LICENSE.txt",
|
"licenseFile": "Spacegray.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mturlo/intellij-spacegray",
|
"sourceCodeUrl": "https://github.com/mturlo/intellij-spacegray",
|
||||||
@@ -162,6 +211,7 @@
|
|||||||
},
|
},
|
||||||
"vuesion_theme.theme.json": {
|
"vuesion_theme.theme.json": {
|
||||||
"name": "Vuesion",
|
"name": "Vuesion",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "vuesion_theme.LICENSE.txt",
|
"licenseFile": "vuesion_theme.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/vuesion/intellij-theme",
|
"sourceCodeUrl": "https://github.com/vuesion/intellij-theme",
|
||||||
@@ -170,6 +220,7 @@
|
|||||||
|
|
||||||
"material-theme-ui-lite/Arc Dark.theme.json": {
|
"material-theme-ui-lite/Arc Dark.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Arc Dark",
|
"name": "Material Theme UI Lite / Arc Dark",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -177,6 +228,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Arc Dark Contrast.theme.json": {
|
"material-theme-ui-lite/Arc Dark Contrast.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Arc Dark Contrast",
|
"name": "Material Theme UI Lite / Arc Dark Contrast",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -184,6 +236,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Atom One Dark.theme.json": {
|
"material-theme-ui-lite/Atom One Dark.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Atom One Dark",
|
"name": "Material Theme UI Lite / Atom One Dark",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -191,6 +244,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Atom One Dark Contrast.theme.json": {
|
"material-theme-ui-lite/Atom One Dark Contrast.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Atom One Dark Contrast",
|
"name": "Material Theme UI Lite / Atom One Dark Contrast",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -212,6 +266,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Dracula.theme.json": {
|
"material-theme-ui-lite/Dracula.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Dracula",
|
"name": "Material Theme UI Lite / Dracula",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -219,6 +274,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Dracula Contrast.theme.json": {
|
"material-theme-ui-lite/Dracula Contrast.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Dracula Contrast",
|
"name": "Material Theme UI Lite / Dracula Contrast",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -254,6 +310,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Material Darker.theme.json": {
|
"material-theme-ui-lite/Material Darker.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Material Darker",
|
"name": "Material Theme UI Lite / Material Darker",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -261,6 +318,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Material Darker Contrast.theme.json": {
|
"material-theme-ui-lite/Material Darker Contrast.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Material Darker Contrast",
|
"name": "Material Theme UI Lite / Material Darker Contrast",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -268,6 +326,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Material Deep Ocean.theme.json": {
|
"material-theme-ui-lite/Material Deep Ocean.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Material Deep Ocean",
|
"name": "Material Theme UI Lite / Material Deep Ocean",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -275,6 +334,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Material Deep Ocean Contrast.theme.json": {
|
"material-theme-ui-lite/Material Deep Ocean Contrast.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Material Deep Ocean Contrast",
|
"name": "Material Theme UI Lite / Material Deep Ocean Contrast",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -296,6 +356,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Material Oceanic.theme.json": {
|
"material-theme-ui-lite/Material Oceanic.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Material Oceanic",
|
"name": "Material Theme UI Lite / Material Oceanic",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -303,6 +364,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Material Oceanic Contrast.theme.json": {
|
"material-theme-ui-lite/Material Oceanic Contrast.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Material Oceanic Contrast",
|
"name": "Material Theme UI Lite / Material Oceanic Contrast",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -310,6 +372,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Material Palenight.theme.json": {
|
"material-theme-ui-lite/Material Palenight.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Material Palenight",
|
"name": "Material Theme UI Lite / Material Palenight",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -317,6 +380,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Material Palenight Contrast.theme.json": {
|
"material-theme-ui-lite/Material Palenight Contrast.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Material Palenight Contrast",
|
"name": "Material Theme UI Lite / Material Palenight Contrast",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -324,6 +388,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Monokai Pro.theme.json": {
|
"material-theme-ui-lite/Monokai Pro.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Monokai Pro",
|
"name": "Material Theme UI Lite / Monokai Pro",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -331,6 +396,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Monokai Pro Contrast.theme.json": {
|
"material-theme-ui-lite/Monokai Pro Contrast.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Monokai Pro Contrast",
|
"name": "Material Theme UI Lite / Monokai Pro Contrast",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -338,6 +404,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Night Owl.theme.json": {
|
"material-theme-ui-lite/Night Owl.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Night Owl",
|
"name": "Material Theme UI Lite / Night Owl",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -345,6 +412,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Night Owl Contrast.theme.json": {
|
"material-theme-ui-lite/Night Owl Contrast.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Night Owl Contrast",
|
"name": "Material Theme UI Lite / Night Owl Contrast",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -352,6 +420,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Solarized Dark.theme.json": {
|
"material-theme-ui-lite/Solarized Dark.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Solarized Dark",
|
"name": "Material Theme UI Lite / Solarized Dark",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
@@ -359,6 +428,7 @@
|
|||||||
},
|
},
|
||||||
"material-theme-ui-lite/Solarized Dark Contrast.theme.json": {
|
"material-theme-ui-lite/Solarized Dark Contrast.theme.json": {
|
||||||
"name": "Material Theme UI Lite / Solarized Dark Contrast",
|
"name": "Material Theme UI Lite / Solarized Dark Contrast",
|
||||||
|
"dark": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
|
||||||
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ FlatLaf Extras
|
|||||||
|
|
||||||
This sub-project provides some additional components and classes:
|
This sub-project provides some additional components and classes:
|
||||||
|
|
||||||
|
- [FlatAnimatedLafChange](src/main/java/com/formdev/flatlaf/extras/FlatAnimatedLafChange.java):
|
||||||
|
Animated Laf changing.
|
||||||
- [FlatInspector](src/main/java/com/formdev/flatlaf/extras/FlatInspector.java):
|
- [FlatInspector](src/main/java/com/formdev/flatlaf/extras/FlatInspector.java):
|
||||||
A simple UI inspector that shows information about UI component at mouse
|
A simple UI inspector that shows information about UI component at mouse
|
||||||
location in a tooltip.
|
location in a tooltip.
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ plugins {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation( project( ":flatlaf-core" ) )
|
implementation( project( ":flatlaf-core" ) )
|
||||||
implementation( "com.formdev:svgSalamander:1.1.2.1" )
|
implementation( "com.formdev:svgSalamander:1.1.2.3" )
|
||||||
}
|
}
|
||||||
|
|
||||||
flatlafModuleInfo {
|
flatlafModuleInfo {
|
||||||
|
|||||||
@@ -0,0 +1,194 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 FormDev Software GmbH
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.formdev.flatlaf.extras;
|
||||||
|
|
||||||
|
import java.awt.AlphaComposite;
|
||||||
|
import java.awt.Graphics;
|
||||||
|
import java.awt.Graphics2D;
|
||||||
|
import java.awt.Window;
|
||||||
|
import java.awt.image.VolatileImage;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.WeakHashMap;
|
||||||
|
import javax.swing.JComponent;
|
||||||
|
import javax.swing.JLayeredPane;
|
||||||
|
import javax.swing.RootPaneContainer;
|
||||||
|
import com.formdev.flatlaf.FlatSystemProperties;
|
||||||
|
import com.formdev.flatlaf.util.Animator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Animated look and feel changing.
|
||||||
|
* <p>
|
||||||
|
* Invoke {@link #showSnapshot()} before setting look and feel and
|
||||||
|
* {@link #hideSnapshotWithAnimation()} after updating UI. E.g.
|
||||||
|
* <pre>
|
||||||
|
* FlatAnimatedLafChange.showSnapshot();
|
||||||
|
* UIManager.setLookAndFeel( lafClassName );
|
||||||
|
* FlatLaf.updateUI();
|
||||||
|
* FlatAnimatedLafChange.hideSnapshotWithAnimation();
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author Karl Tauber
|
||||||
|
*/
|
||||||
|
public class FlatAnimatedLafChange
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The duration of the animation in milliseconds. Default is 160 ms.
|
||||||
|
*/
|
||||||
|
public static int duration = 160;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The resolution of the animation in milliseconds. Default is 40 ms.
|
||||||
|
*/
|
||||||
|
public static int resolution = 40;
|
||||||
|
|
||||||
|
private static Animator animator;
|
||||||
|
private static final Map<JLayeredPane, JComponent> oldUIsnapshots = new WeakHashMap<>();
|
||||||
|
private static final Map<JLayeredPane, JComponent> newUIsnapshots = new WeakHashMap<>();
|
||||||
|
private static float alpha;
|
||||||
|
private static boolean inShowSnapshot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a snapshot of the old UI and shows it on top of the UI.
|
||||||
|
* Invoke before setting new look and feel.
|
||||||
|
*/
|
||||||
|
public static void showSnapshot() {
|
||||||
|
if( !FlatSystemProperties.getBoolean( "flatlaf.animatedLafChange", true ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// stop already running animation
|
||||||
|
if( animator != null )
|
||||||
|
animator.stop();
|
||||||
|
|
||||||
|
alpha = 1;
|
||||||
|
|
||||||
|
// show snapshot of old UI
|
||||||
|
showSnapshot( true, oldUIsnapshots );
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void showSnapshot( boolean useAlpha, Map<JLayeredPane, JComponent> map ) {
|
||||||
|
inShowSnapshot = true;
|
||||||
|
|
||||||
|
// create snapshots for all shown windows
|
||||||
|
Window[] windows = Window.getWindows();
|
||||||
|
for( Window window : windows ) {
|
||||||
|
if( !(window instanceof RootPaneContainer) || !window.isShowing() )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// create snapshot image
|
||||||
|
// (using volatile image to have correct sub-pixel text rendering on Java 9+)
|
||||||
|
VolatileImage snapshot = window.createVolatileImage( window.getWidth(), window.getHeight() );
|
||||||
|
if( snapshot == null )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// paint window to snapshot image
|
||||||
|
JLayeredPane layeredPane = ((RootPaneContainer)window).getLayeredPane();
|
||||||
|
layeredPane.paint( snapshot.getGraphics() );
|
||||||
|
|
||||||
|
// create snapshot layer, which is added to layered pane and paints
|
||||||
|
// snapshot with animated alpha
|
||||||
|
JComponent snapshotLayer = new JComponent() {
|
||||||
|
@Override
|
||||||
|
public void paint( Graphics g ) {
|
||||||
|
if( inShowSnapshot || snapshot.contentsLost() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if( useAlpha )
|
||||||
|
((Graphics2D)g).setComposite( AlphaComposite.getInstance( AlphaComposite.SRC_OVER, alpha ) );
|
||||||
|
g.drawImage( snapshot, 0, 0, null );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeNotify() {
|
||||||
|
super.removeNotify();
|
||||||
|
|
||||||
|
// release system resources used by volatile image
|
||||||
|
snapshot.flush();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if( !useAlpha )
|
||||||
|
snapshotLayer.setOpaque( true );
|
||||||
|
snapshotLayer.setSize( layeredPane.getSize() );
|
||||||
|
|
||||||
|
// add image layer to layered pane
|
||||||
|
layeredPane.add( snapshotLayer, Integer.valueOf( JLayeredPane.DRAG_LAYER + (useAlpha ? 2 : 1) ) );
|
||||||
|
map.put( layeredPane, snapshotLayer );
|
||||||
|
}
|
||||||
|
|
||||||
|
inShowSnapshot = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starts an animation that shows the snapshot (created by {@link #showSnapshot()}
|
||||||
|
* with an decreasing alpha. At the end, the snapshot is removed and the new UI is shown.
|
||||||
|
* Invoke after updating UI.
|
||||||
|
*/
|
||||||
|
public static void hideSnapshotWithAnimation() {
|
||||||
|
if( !FlatSystemProperties.getBoolean( "flatlaf.animatedLafChange", true ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if( oldUIsnapshots.isEmpty() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// show snapshot of new UI
|
||||||
|
showSnapshot( false, newUIsnapshots );
|
||||||
|
|
||||||
|
// create animator
|
||||||
|
animator = new Animator( duration, fraction -> {
|
||||||
|
if( fraction < 0.1 || fraction > 0.9 )
|
||||||
|
return; // ignore initial and last events
|
||||||
|
|
||||||
|
alpha = 1f - fraction;
|
||||||
|
|
||||||
|
// repaint snapshots
|
||||||
|
for( Map.Entry<JLayeredPane, JComponent> e : oldUIsnapshots.entrySet() ) {
|
||||||
|
if( e.getKey().isShowing() )
|
||||||
|
e.getValue().repaint();
|
||||||
|
}
|
||||||
|
}, () -> {
|
||||||
|
hideSnapshot();
|
||||||
|
animator = null;
|
||||||
|
} );
|
||||||
|
|
||||||
|
animator.setResolution( resolution );
|
||||||
|
animator.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void hideSnapshot() {
|
||||||
|
hideSnapshot( oldUIsnapshots );
|
||||||
|
hideSnapshot( newUIsnapshots );
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void hideSnapshot( Map<JLayeredPane, JComponent> map ) {
|
||||||
|
// remove snapshots
|
||||||
|
for( Map.Entry<JLayeredPane, JComponent> e : map.entrySet() ) {
|
||||||
|
e.getKey().remove( e.getValue() );
|
||||||
|
e.getKey().repaint();
|
||||||
|
}
|
||||||
|
|
||||||
|
map.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stops a running animation (if any) and hides the snapshot.
|
||||||
|
*/
|
||||||
|
public static void stop() {
|
||||||
|
if( animator != null )
|
||||||
|
animator.stop();
|
||||||
|
else
|
||||||
|
hideSnapshot();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -50,11 +50,18 @@ public class FlatSVGIcon
|
|||||||
private static final SVGUniverse svgUniverse = new SVGUniverse();
|
private static final SVGUniverse svgUniverse = new SVGUniverse();
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
|
private final ClassLoader classLoader;
|
||||||
|
|
||||||
private SVGDiagram diagram;
|
private SVGDiagram diagram;
|
||||||
private boolean dark;
|
private boolean dark;
|
||||||
|
|
||||||
public FlatSVGIcon( String name ) {
|
public FlatSVGIcon( String name ) {
|
||||||
|
this( name, null );
|
||||||
|
}
|
||||||
|
|
||||||
|
public FlatSVGIcon( String name, ClassLoader classLoader ) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
this.classLoader = classLoader;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void update() {
|
private void update() {
|
||||||
@@ -79,7 +86,14 @@ public class FlatSVGIcon
|
|||||||
int dotIndex = name.lastIndexOf( '.' );
|
int dotIndex = name.lastIndexOf( '.' );
|
||||||
name = name.substring( 0, dotIndex ) + "_dark" + name.substring( dotIndex );
|
name = name.substring( 0, dotIndex ) + "_dark" + name.substring( dotIndex );
|
||||||
}
|
}
|
||||||
return FlatSVGIcon.class.getClassLoader().getResource( name );
|
|
||||||
|
ClassLoader cl = (classLoader != null) ? classLoader : FlatSVGIcon.class.getClassLoader();
|
||||||
|
return cl.getResource( name );
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasFound() {
|
||||||
|
update();
|
||||||
|
return diagram != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -49,6 +49,10 @@ Name | Class
|
|||||||
-----|------
|
-----|------
|
||||||
[Arc](https://gitlab.com/zlamalp/arc-theme-idea) | `com.formdev.flatlaf.intellijthemes.FlatArcIJTheme`
|
[Arc](https://gitlab.com/zlamalp/arc-theme-idea) | `com.formdev.flatlaf.intellijthemes.FlatArcIJTheme`
|
||||||
[Arc - Orange](https://gitlab.com/zlamalp/arc-theme-idea) | `com.formdev.flatlaf.intellijthemes.FlatArcOrangeIJTheme`
|
[Arc - Orange](https://gitlab.com/zlamalp/arc-theme-idea) | `com.formdev.flatlaf.intellijthemes.FlatArcOrangeIJTheme`
|
||||||
|
[Arc Dark](https://gitlab.com/zlamalp/arc-theme-idea) | `com.formdev.flatlaf.intellijthemes.FlatArcDarkIJTheme`
|
||||||
|
[Arc Dark - Orange](https://gitlab.com/zlamalp/arc-theme-idea) | `com.formdev.flatlaf.intellijthemes.FlatArcDarkOrangeIJTheme`
|
||||||
|
[Carbon](https://github.com/luisfer0793/theme-carbon) | `com.formdev.flatlaf.intellijthemes.FlatCarbonIJTheme`
|
||||||
|
[Cobalt 2](https://github.com/ngehlert/cobalt2) | `com.formdev.flatlaf.intellijthemes.FlatCobalt2IJTheme`
|
||||||
[Cyan light](https://github.com/OlyaB/CyanTheme) | `com.formdev.flatlaf.intellijthemes.FlatCyanLightIJTheme`
|
[Cyan light](https://github.com/OlyaB/CyanTheme) | `com.formdev.flatlaf.intellijthemes.FlatCyanLightIJTheme`
|
||||||
[Dark Flat](https://github.com/nerzhulart/DarkFlatTheme) | `com.formdev.flatlaf.intellijthemes.FlatDarkFlatIJTheme`
|
[Dark Flat](https://github.com/nerzhulart/DarkFlatTheme) | `com.formdev.flatlaf.intellijthemes.FlatDarkFlatIJTheme`
|
||||||
[Dark purple](https://github.com/OlyaB/DarkPurpleTheme) | `com.formdev.flatlaf.intellijthemes.FlatDarkPurpleIJTheme`
|
[Dark purple](https://github.com/OlyaB/DarkPurpleTheme) | `com.formdev.flatlaf.intellijthemes.FlatDarkPurpleIJTheme`
|
||||||
@@ -67,8 +71,8 @@ Name | Class
|
|||||||
[Monocai](https://github.com/bmikaili/intellij-monocai-theme) | `com.formdev.flatlaf.intellijthemes.FlatMonocaiIJTheme`
|
[Monocai](https://github.com/bmikaili/intellij-monocai-theme) | `com.formdev.flatlaf.intellijthemes.FlatMonocaiIJTheme`
|
||||||
[Nord](https://github.com/arcticicestudio/nord-jetbrains) | `com.formdev.flatlaf.intellijthemes.FlatNordIJTheme`
|
[Nord](https://github.com/arcticicestudio/nord-jetbrains) | `com.formdev.flatlaf.intellijthemes.FlatNordIJTheme`
|
||||||
[One Dark](https://github.com/one-dark/jetbrains-one-dark-theme) | `com.formdev.flatlaf.intellijthemes.FlatOneDarkIJTheme`
|
[One Dark](https://github.com/one-dark/jetbrains-one-dark-theme) | `com.formdev.flatlaf.intellijthemes.FlatOneDarkIJTheme`
|
||||||
[Solarized Dark](https://github.com/snowe2010/solarized-jetbrains) | `com.formdev.flatlaf.intellijthemes.FlatSolarizedDarkIJTheme`
|
[Solarized Dark](https://github.com/4lex4/intellij-platform-solarized) | `com.formdev.flatlaf.intellijthemes.FlatSolarizedDarkIJTheme`
|
||||||
[Solarized Light](https://github.com/snowe2010/solarized-jetbrains) | `com.formdev.flatlaf.intellijthemes.FlatSolarizedLightIJTheme`
|
[Solarized Light](https://github.com/4lex4/intellij-platform-solarized) | `com.formdev.flatlaf.intellijthemes.FlatSolarizedLightIJTheme`
|
||||||
[Spacegray](https://github.com/mturlo/intellij-spacegray) | `com.formdev.flatlaf.intellijthemes.FlatSpacegrayIJTheme`
|
[Spacegray](https://github.com/mturlo/intellij-spacegray) | `com.formdev.flatlaf.intellijthemes.FlatSpacegrayIJTheme`
|
||||||
[Vuesion](https://github.com/vuesion/intellij-theme) | `com.formdev.flatlaf.intellijthemes.FlatVuesionIJTheme`
|
[Vuesion](https://github.com/vuesion/intellij-theme) | `com.formdev.flatlaf.intellijthemes.FlatVuesionIJTheme`
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ public class FlatAllIJThemes
|
|||||||
public static final LookAndFeelInfo[] INFOS = {
|
public static final LookAndFeelInfo[] INFOS = {
|
||||||
new LookAndFeelInfo( "Arc", "com.formdev.flatlaf.intellijthemes.FlatArcIJTheme" ),
|
new LookAndFeelInfo( "Arc", "com.formdev.flatlaf.intellijthemes.FlatArcIJTheme" ),
|
||||||
new LookAndFeelInfo( "Arc - Orange", "com.formdev.flatlaf.intellijthemes.FlatArcOrangeIJTheme" ),
|
new LookAndFeelInfo( "Arc - Orange", "com.formdev.flatlaf.intellijthemes.FlatArcOrangeIJTheme" ),
|
||||||
|
new LookAndFeelInfo( "Arc Dark", "com.formdev.flatlaf.intellijthemes.FlatArcDarkIJTheme" ),
|
||||||
|
new LookAndFeelInfo( "Arc Dark - Orange", "com.formdev.flatlaf.intellijthemes.FlatArcDarkOrangeIJTheme" ),
|
||||||
|
new LookAndFeelInfo( "Carbon", "com.formdev.flatlaf.intellijthemes.FlatCarbonIJTheme" ),
|
||||||
|
new LookAndFeelInfo( "Cobalt 2", "com.formdev.flatlaf.intellijthemes.FlatCobalt2IJTheme" ),
|
||||||
new LookAndFeelInfo( "Cyan light", "com.formdev.flatlaf.intellijthemes.FlatCyanLightIJTheme" ),
|
new LookAndFeelInfo( "Cyan light", "com.formdev.flatlaf.intellijthemes.FlatCyanLightIJTheme" ),
|
||||||
new LookAndFeelInfo( "Dark Flat", "com.formdev.flatlaf.intellijthemes.FlatDarkFlatIJTheme" ),
|
new LookAndFeelInfo( "Dark Flat", "com.formdev.flatlaf.intellijthemes.FlatDarkFlatIJTheme" ),
|
||||||
new LookAndFeelInfo( "Dark purple", "com.formdev.flatlaf.intellijthemes.FlatDarkPurpleIJTheme" ),
|
new LookAndFeelInfo( "Dark purple", "com.formdev.flatlaf.intellijthemes.FlatDarkPurpleIJTheme" ),
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 FormDev Software GmbH
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.formdev.flatlaf.intellijthemes;
|
||||||
|
|
||||||
|
import com.formdev.flatlaf.IntelliJTheme;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Karl Tauber
|
||||||
|
*/
|
||||||
|
public class FlatArcDarkIJTheme
|
||||||
|
extends IntelliJTheme.ThemeLaf
|
||||||
|
{
|
||||||
|
public static boolean install( ) {
|
||||||
|
try {
|
||||||
|
return install( new FlatArcDarkIJTheme() );
|
||||||
|
} catch( RuntimeException ex ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public FlatArcDarkIJTheme() {
|
||||||
|
super( Utils.loadTheme( "arc_theme_dark.theme.json" ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 FormDev Software GmbH
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.formdev.flatlaf.intellijthemes;
|
||||||
|
|
||||||
|
import com.formdev.flatlaf.IntelliJTheme;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Karl Tauber
|
||||||
|
*/
|
||||||
|
public class FlatArcDarkOrangeIJTheme
|
||||||
|
extends IntelliJTheme.ThemeLaf
|
||||||
|
{
|
||||||
|
public static boolean install( ) {
|
||||||
|
try {
|
||||||
|
return install( new FlatArcDarkOrangeIJTheme() );
|
||||||
|
} catch( RuntimeException ex ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public FlatArcDarkOrangeIJTheme() {
|
||||||
|
super( Utils.loadTheme( "arc_theme_dark_orange.theme.json" ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 FormDev Software GmbH
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.formdev.flatlaf.intellijthemes;
|
||||||
|
|
||||||
|
import com.formdev.flatlaf.IntelliJTheme;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Karl Tauber
|
||||||
|
*/
|
||||||
|
public class FlatCarbonIJTheme
|
||||||
|
extends IntelliJTheme.ThemeLaf
|
||||||
|
{
|
||||||
|
public static boolean install( ) {
|
||||||
|
try {
|
||||||
|
return install( new FlatCarbonIJTheme() );
|
||||||
|
} catch( RuntimeException ex ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public FlatCarbonIJTheme() {
|
||||||
|
super( Utils.loadTheme( "Carbon.theme.json" ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 FormDev Software GmbH
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.formdev.flatlaf.intellijthemes;
|
||||||
|
|
||||||
|
import com.formdev.flatlaf.IntelliJTheme;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Karl Tauber
|
||||||
|
*/
|
||||||
|
public class FlatCobalt2IJTheme
|
||||||
|
extends IntelliJTheme.ThemeLaf
|
||||||
|
{
|
||||||
|
public static boolean install( ) {
|
||||||
|
try {
|
||||||
|
return install( new FlatCobalt2IJTheme() );
|
||||||
|
} catch( RuntimeException ex ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public FlatCobalt2IJTheme() {
|
||||||
|
super( Utils.loadTheme( "Cobalt_2.theme.json" ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -33,6 +33,6 @@ public class FlatSolarizedDarkIJTheme
|
|||||||
}
|
}
|
||||||
|
|
||||||
public FlatSolarizedDarkIJTheme() {
|
public FlatSolarizedDarkIJTheme() {
|
||||||
super( Utils.loadTheme( "solarized_dark_theme.theme.json" ) );
|
super( Utils.loadTheme( "SolarizedDark.theme.json" ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,6 @@ public class FlatSolarizedLightIJTheme
|
|||||||
}
|
}
|
||||||
|
|
||||||
public FlatSolarizedLightIJTheme() {
|
public FlatSolarizedLightIJTheme() {
|
||||||
super( Utils.loadTheme( "solarized_light_theme.theme.json" ) );
|
super( Utils.loadTheme( "SolarizedLight.theme.json" ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
@@ -0,0 +1,353 @@
|
|||||||
|
{
|
||||||
|
"name": "Carbon",
|
||||||
|
"dark": true,
|
||||||
|
"author": "Luis Fernando Jimenez",
|
||||||
|
"editorScheme": "/themes/Carbon.xml",
|
||||||
|
"ui": {
|
||||||
|
"*": {
|
||||||
|
"foreground": "#bac8cb",
|
||||||
|
"background": "#172030",
|
||||||
|
"borderColor": "#213047",
|
||||||
|
"disabledBorderColor": "#586e75",
|
||||||
|
"selectionBackground": "#0A677A",
|
||||||
|
"selectionForeground": "#fdf6e3",
|
||||||
|
"selectionInactiveBackground": "#1E2A3E",
|
||||||
|
"selectionBackgroundInactive": "#1E2A3E",
|
||||||
|
"lightSelectionBackground": "#074855",
|
||||||
|
"lightSelectionForeground": "#839496",
|
||||||
|
"lightSelectionInactiveBackground": "#073642",
|
||||||
|
"lightSelectionInactiveForeground": "#839496",
|
||||||
|
"separatorColor": "#213047",
|
||||||
|
"lineSeparatorColor": "#213047",
|
||||||
|
"disabledBackground": "#1E2A3E",
|
||||||
|
"inactiveBackground": "#1E2A3E",
|
||||||
|
"disabledForeground": "#657778",
|
||||||
|
"disabledText": "#657778",
|
||||||
|
"inactiveForeground": "#657778",
|
||||||
|
"acceleratorForeground": "#abb9bc",
|
||||||
|
"acceleratorSelectionForeground": "#abb9bc"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ActionButton": {
|
||||||
|
"hoverBackground": "26354f",
|
||||||
|
"hoverBorderColor": "#074855",
|
||||||
|
"pressedBackground": "#074855",
|
||||||
|
"pressedBorderColor": "#074855"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Borders": {
|
||||||
|
"color": "#213047",
|
||||||
|
"ContrastBorderColor": "#213047"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Button": {
|
||||||
|
"startBackground": "#074855",
|
||||||
|
"endBackground": "#074855",
|
||||||
|
"startBorderColor": "#93a1a1",
|
||||||
|
"endBorderColor": "#93a1a1",
|
||||||
|
"default": {
|
||||||
|
"foreground": "#fdf6e3",
|
||||||
|
"startBackground": "#0A677A",
|
||||||
|
"endBackground": "#0A677A",
|
||||||
|
"startBorderColor": "#0A677Ac3",
|
||||||
|
"endBorderColor": "#0A677Ac3",
|
||||||
|
"focusedBorderColor": "#839496",
|
||||||
|
"focusColor": "#778282"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"ComboBox": {
|
||||||
|
"nonEditableBackground": "#1e2a3e",
|
||||||
|
"background": "#1e2a3e",
|
||||||
|
"ArrowButton": {
|
||||||
|
"iconColor": "#a3aaa9",
|
||||||
|
"disabledIconColor": "#839496",
|
||||||
|
"nonEditableBackground": "#1e2a3e"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"ComboPopup.border": "1,1,1,1,213047",
|
||||||
|
|
||||||
|
"CompletionPopup": {
|
||||||
|
"matchForeground": "#02858E"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Component": {
|
||||||
|
"errorFocusColor": "#bf616a",
|
||||||
|
"focusColor": "#0c9294",
|
||||||
|
"focusedBorderColor": "#0c9294",
|
||||||
|
"focusWidth": 2,
|
||||||
|
"inactiveErrorFocusColor": "#bf616a",
|
||||||
|
"inactiveWarningFocusColor": "#8f9544",
|
||||||
|
"infoForeground": "#bac8cb",
|
||||||
|
"warningFocusColor": "#8f9544"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Counter": {
|
||||||
|
"background": "#0A677A",
|
||||||
|
"foreground": "#bac8cb"
|
||||||
|
},
|
||||||
|
|
||||||
|
"DefaultTabs": {
|
||||||
|
"underlineColor": "#2aa198",
|
||||||
|
"hoverBackground": "#1E2A3E",
|
||||||
|
"inactiveUnderlineColor": "#446a73"
|
||||||
|
},
|
||||||
|
|
||||||
|
"DragAndDrop": {
|
||||||
|
"areaForeground": "#bac8cb",
|
||||||
|
"areaBackground": "#1E2A3E",
|
||||||
|
"areaBorderColor": "#213047"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Editor": {
|
||||||
|
"background": "#172030",
|
||||||
|
"foreground": "#bac8cb",
|
||||||
|
"shortcutForeground": "#2aa198"
|
||||||
|
},
|
||||||
|
|
||||||
|
"EditorPane.inactiveBackground": "#1E2A3E",
|
||||||
|
|
||||||
|
"EditorTabs": {
|
||||||
|
"underlineColor": "#2aa198",
|
||||||
|
"borderColor": "#213047",
|
||||||
|
"underlinedTabBackground": "#1E2A3E",
|
||||||
|
"hoverMaskColor": "#1E2A3E"
|
||||||
|
},
|
||||||
|
|
||||||
|
"FileColor": {
|
||||||
|
"Yellow": "#1b2f41",
|
||||||
|
"Rose": "#bf616a",
|
||||||
|
"Green": "#112634"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Group.disabledSeparatorColor": "#213047",
|
||||||
|
|
||||||
|
"InplaceRefactoringPopup.borderColor": "#213047",
|
||||||
|
|
||||||
|
"Link": {
|
||||||
|
"activeForeground": "#0a7285",
|
||||||
|
"hoverForeground": "#0a7285",
|
||||||
|
"pressedForeground": "#0a7285",
|
||||||
|
"visitedForeground": "#0a7285",
|
||||||
|
"secondaryForeground": "#75BAB5"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Label.errorForeground": "#af304a",
|
||||||
|
|
||||||
|
"NavBar.borderColor": "#213047",
|
||||||
|
|
||||||
|
"Notification": {
|
||||||
|
"background": "#1E2A3E",
|
||||||
|
"borderColor": "#586E75",
|
||||||
|
"errorForeground": "#bac8cb",
|
||||||
|
"errorBackground": "#4d232e",
|
||||||
|
"errorBorderColor": "#802e44",
|
||||||
|
"MoreButton": {
|
||||||
|
"background": "#1E2A3E",
|
||||||
|
"foreground": "#bac8cb",
|
||||||
|
"innerBorderColor": "#213047"
|
||||||
|
},
|
||||||
|
"ToolWindow": {
|
||||||
|
"informativeForeground": "#bac8cb",
|
||||||
|
"informativeBackground": "#074855",
|
||||||
|
"informativeBorderColor": "#213047",
|
||||||
|
"warningForeground": "#bac8cb",
|
||||||
|
"warningBackground": "#8d8d55",
|
||||||
|
"warningBorderColor": "#213047",
|
||||||
|
"errorForeground": "#bac8cb",
|
||||||
|
"errorBackground": "#802d43",
|
||||||
|
"errorBorderColor": "#4d1c2b"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"ParameterInfo": {
|
||||||
|
"background": "#1E2A3E",
|
||||||
|
"foreground": "#bac8cb",
|
||||||
|
"infoForeground": "ababb3",
|
||||||
|
"currentOverloadBackground": "#1E2A3E",
|
||||||
|
"currentParameterForeground": "#02858e"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Plugins": {
|
||||||
|
"Tab": {
|
||||||
|
"selectedForeground": "#bac8cb",
|
||||||
|
"selectedBackground": "#074855",
|
||||||
|
"hoverBackground": "#1E2A3E"
|
||||||
|
},
|
||||||
|
"eapTagBackground": "#02858e",
|
||||||
|
"SectionHeader.background": "#1E2A3E",
|
||||||
|
"tagBackground": "#1E2A3E",
|
||||||
|
"tagForeground": "#bac8cb",
|
||||||
|
"Button": {
|
||||||
|
"installForeground": "#bac8cb",
|
||||||
|
"installBorderColor": "#02858e",
|
||||||
|
"installFillForeground": "#bac8cb",
|
||||||
|
"installFillBackground": "#172030",
|
||||||
|
"updateForeground": "#bac8cb",
|
||||||
|
"updateBackground": "#02858e",
|
||||||
|
"updateBorderColor": "#213047"
|
||||||
|
},
|
||||||
|
"lightSelectionBackground": "#1E2A3E"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Popup": {
|
||||||
|
"paintBorder": true,
|
||||||
|
"borderColor": "#213047",
|
||||||
|
"inactiveBorderColor": "#213047",
|
||||||
|
"Toolbar.borderColor": "#213047",
|
||||||
|
"Header.activeBackground": "#172030",
|
||||||
|
"Header.inactiveBackground": "#172030",
|
||||||
|
"separatorForeground": "#213047",
|
||||||
|
"Advertiser": {
|
||||||
|
"foreground": "#bac8cb",
|
||||||
|
"borderColor": "#213047",
|
||||||
|
"borderInsets": "4,8,3,0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"PopupMenu": {
|
||||||
|
"borderWidth": 1,
|
||||||
|
"borderInsets": "1,1,1,1"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ProgressBar": {
|
||||||
|
"trackColor": "#1E2A3E",
|
||||||
|
"progressColor": "#029098",
|
||||||
|
"indeterminateStartColor": "#02858e",
|
||||||
|
"indeterminateEndColor": "#2cb0a7",
|
||||||
|
"failedColor": "#ff4262",
|
||||||
|
"failedEndColor": "#a12a3e",
|
||||||
|
"passedColor": "#2cb0a7",
|
||||||
|
"passedEndColor": "#026d76"
|
||||||
|
},
|
||||||
|
|
||||||
|
"SearchEverywhere": {
|
||||||
|
"Header.background": "#1E2A3E",
|
||||||
|
"Tab": {
|
||||||
|
"selectedForeground": "#bac8cb",
|
||||||
|
"selectedBackground": "#074855"
|
||||||
|
},
|
||||||
|
"SearchField": {
|
||||||
|
"background": "#172030",
|
||||||
|
"borderColor": "#213047"
|
||||||
|
},
|
||||||
|
"Advertiser.foreground": "#bac8cb"
|
||||||
|
},
|
||||||
|
|
||||||
|
"SearchMatch": {
|
||||||
|
"startBackground": "#e1e797",
|
||||||
|
"endBackground": "#e1e797"
|
||||||
|
},
|
||||||
|
|
||||||
|
"SpeedSearch": {
|
||||||
|
"foreground": "#bac8cb",
|
||||||
|
"borderColor": "#213047",
|
||||||
|
"background": "#1E2A3E",
|
||||||
|
"errorForeground": "#e0555e"
|
||||||
|
},
|
||||||
|
|
||||||
|
"SplitPane.background": "#172030",
|
||||||
|
|
||||||
|
"StatusBar.borderColor": "#213047",
|
||||||
|
|
||||||
|
"Table": {
|
||||||
|
"foreground": "#bac8cb",
|
||||||
|
"background": "#172030",
|
||||||
|
"stripeColor": "#1E2A3E",
|
||||||
|
"selectionForeground": "#fdf6e3",
|
||||||
|
"selectionBackground": "#074855",
|
||||||
|
"focusCellForeground": "#fdf6e3",
|
||||||
|
"dropLineColor": "#213047",
|
||||||
|
"gridColor": "#213047",
|
||||||
|
"lightSelectionInactiveForeground": "#bac8cb",
|
||||||
|
"lightSelectionForeground": "#bac8cb",
|
||||||
|
"selectionInactiveForeground": "#bac8cb",
|
||||||
|
"lightSelectionBackground": "#074855",
|
||||||
|
"lightSelectionInactiveBackground": "#063944"
|
||||||
|
},
|
||||||
|
|
||||||
|
"TabbedPane": {
|
||||||
|
"hoverColor": "#1E2A3E",
|
||||||
|
"underlineColor": "#0A677A",
|
||||||
|
"disabledUnderlineColor": "#5e5b6b",
|
||||||
|
"contentAreaColor": "#213047"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ToggleButton": {
|
||||||
|
"onBackground": "#0A677A",
|
||||||
|
"borderColor": "#213047"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ToolTip": {
|
||||||
|
"background": "#172030",
|
||||||
|
"Actions.background": "#1E2A3E"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ToolWindow": {
|
||||||
|
"Header": {
|
||||||
|
"background": "#1E2A3E",
|
||||||
|
"inactiveBackground": "#1E2A3E"
|
||||||
|
},
|
||||||
|
"HeaderTab": {
|
||||||
|
"selectedBackground": "#1E2A3E",
|
||||||
|
"hoverBackground": "#1E2A3E",
|
||||||
|
"selectedInactiveBackground": "#1E2A3E",
|
||||||
|
"hoverInactiveBackground": "#1E2A3E"
|
||||||
|
},
|
||||||
|
"Button": {
|
||||||
|
"selectedBackground": "#1E2A3E",
|
||||||
|
"hoverBackground": "#1E2A3E"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"Tree.rowHeight": 22,
|
||||||
|
|
||||||
|
"VersionControl": {
|
||||||
|
"GitLog.localBranchIconColor": "#02858e",
|
||||||
|
"GitLog.remoteBranchIconColor": "#214760",
|
||||||
|
"Log.Commit.currentBranchBackground": "#1e2a3e",
|
||||||
|
"FileHistory.Commit.selectedBranchBackground": "#3f5d6e"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Viewport.background": "#172030",
|
||||||
|
|
||||||
|
"WelcomeScreen.background": "#172030",
|
||||||
|
|
||||||
|
"WelcomeScreen": {
|
||||||
|
"Projects.selectionInactiveBackground": "#172030",
|
||||||
|
"separatorColor": "#172030"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"icons": {
|
||||||
|
"ColorPalette": {
|
||||||
|
"Actions.Red": "#ff4262",
|
||||||
|
"Actions.Green": "#52b455",
|
||||||
|
"Actions.Grey": "#bac8cb",
|
||||||
|
"Actions.Yellow": "#e1e797",
|
||||||
|
"Actions.Blue": "#44a6d2",
|
||||||
|
"Actions.GreyInline.Dark": "#9f99bfb3",
|
||||||
|
"Objects.Grey": "#808C97",
|
||||||
|
"Objects.RedStatus": "#af304a",
|
||||||
|
"Objects.Red": "#c6455a",
|
||||||
|
"Objects.Pink": "#f98b9e",
|
||||||
|
"Objects.Yellow": "#e1e797",
|
||||||
|
"Objects.Green": "#27b26f",
|
||||||
|
"Objects.Blue": "#2F7A99",
|
||||||
|
"Objects.Purple": "#B692CE",
|
||||||
|
"Objects.BlackText": "#0b1015",
|
||||||
|
"Objects.YellowDark": "#acaf44",
|
||||||
|
"Objects.GreenAndroid": "#78c257",
|
||||||
|
"Checkbox.Background.Default.Dark": "#1E2A3E",
|
||||||
|
"Checkbox.Border.Default.Dark": "#586e75",
|
||||||
|
"Checkbox.Foreground.Selected.Dark": "#bac8cb",
|
||||||
|
"Checkbox.Focus.Wide.Dark": "#93a1a1",
|
||||||
|
"Checkbox.Focus.Thin.Default.Dark": "#839496",
|
||||||
|
"Checkbox.Focus.Thin.Selected.Dark": "#839496",
|
||||||
|
"Checkbox.Background.Disabled.Dark": "#1a2334",
|
||||||
|
"Checkbox.Border.Disabled.Dark": "#657778",
|
||||||
|
"Checkbox.Foreground.Disabled.Dark": "#657778"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright 2019 Tyler B. Thrailkill
|
Copyright 2020 Nicolas Gehlert
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
@@ -0,0 +1,181 @@
|
|||||||
|
{
|
||||||
|
"name": "Cobalt 2",
|
||||||
|
"author": "Nicolas Gehlert <info@ngehlert.de>",
|
||||||
|
"dark": true,
|
||||||
|
"editorScheme": "/Cobalt_2.xml",
|
||||||
|
"colors": {
|
||||||
|
"basicBackground": "#002946",
|
||||||
|
"secondaryBackground": "#001b36",
|
||||||
|
"borderColor": "#545454",
|
||||||
|
"hue1": "#003854",
|
||||||
|
"hue2": "#003f5e",
|
||||||
|
"hue3": "#267DA2",
|
||||||
|
"contrast": "#ff9d00",
|
||||||
|
"contrastHue1": "#9a5000",
|
||||||
|
"textColor": "#FFF0C7"
|
||||||
|
},
|
||||||
|
"ui": {
|
||||||
|
"*": {
|
||||||
|
"background": "basicBackground",
|
||||||
|
"foreground": "textColor",
|
||||||
|
"selectionBackground": "hue2"
|
||||||
|
},
|
||||||
|
"ActionButton": {
|
||||||
|
"pressedBackground": "hue3",
|
||||||
|
"pressedBorderColor": "hue3",
|
||||||
|
"hoverBackground": "hue2",
|
||||||
|
"hoverBorderColor": "hue2"
|
||||||
|
},
|
||||||
|
"CompletionPopup": {
|
||||||
|
"selectionBackground": "basicBackground"
|
||||||
|
},
|
||||||
|
"Borders": {
|
||||||
|
"ContrastBorderColor": "borderColor",
|
||||||
|
"color": "borderColor"
|
||||||
|
},
|
||||||
|
"Button": {
|
||||||
|
"background": "secondaryBackground",
|
||||||
|
"startBackground": "hue3",
|
||||||
|
"endBackground": "hue2",
|
||||||
|
"startBorderColor": "hue3",
|
||||||
|
"endBorderColor": "hue2",
|
||||||
|
"default": {
|
||||||
|
"startBackground": "contrast",
|
||||||
|
"endBackground": "contrastHue1",
|
||||||
|
"startBorderColor": "contrast",
|
||||||
|
"endBorderColor": "contrastHue1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CheckBox": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"CheckBoxMenuItem": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"ColorChooser": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"ComboBox": {
|
||||||
|
"ArrowButton": {
|
||||||
|
"background": "basicBackground",
|
||||||
|
"nonEditableBackground": "basicBackground"
|
||||||
|
},
|
||||||
|
"background": "secondaryBackground",
|
||||||
|
"foreground": "textColor",
|
||||||
|
"nonEditableBackground": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"DefaultTabs": {
|
||||||
|
"background": "secondaryBackground",
|
||||||
|
"borderColor": "borderColor",
|
||||||
|
"hoverBackground": "hue1"
|
||||||
|
},
|
||||||
|
"EditorTabs": {
|
||||||
|
"background": "secondaryBackground",
|
||||||
|
"borderColor": "borderColor",
|
||||||
|
"underlinedTabBackground": "hue1"
|
||||||
|
},
|
||||||
|
"Link": {
|
||||||
|
"activeForeground": "contrast",
|
||||||
|
"hoverForeground": "contrast",
|
||||||
|
"visitedForeground": "contrast"
|
||||||
|
},
|
||||||
|
"Label": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"List": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"Menu": {
|
||||||
|
"background": "secondaryBackground",
|
||||||
|
"foreground": "textColor"
|
||||||
|
},
|
||||||
|
"MenuBar": {
|
||||||
|
"disabledBackground": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"OptionPane": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"Panel": {
|
||||||
|
"background": "secondaryBackground",
|
||||||
|
"foreground": "textColor"
|
||||||
|
},
|
||||||
|
"PasswordField": {
|
||||||
|
"background": "secondaryBackground",
|
||||||
|
"selectionBackground": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"Popup": {
|
||||||
|
"Toolbar.background": "basicBackground"
|
||||||
|
},
|
||||||
|
"PopupMenu": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"ProgressBar": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"Plugins": {
|
||||||
|
"lightSelectionBackground": "hue2"
|
||||||
|
},
|
||||||
|
"RadioButton": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"RadioButtonMenuItem": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"ScrollBar": {
|
||||||
|
"background": "hue1"
|
||||||
|
},
|
||||||
|
"ScrollPane": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"Slider": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"Spinner": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"SplitPane": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"TabbedPane": {
|
||||||
|
"background": "secondaryBackground",
|
||||||
|
"contentAreaColor": "borderColor"
|
||||||
|
},
|
||||||
|
"TextField": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"TextPane": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"ToggleButton": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"ToolBar": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"ToolTip": {
|
||||||
|
"background": "hue2"
|
||||||
|
},
|
||||||
|
"ToolWindow": {
|
||||||
|
"Header.background": "basicBackground",
|
||||||
|
"Header.borderColor": "borderColor",
|
||||||
|
"Header.inactiveBackground": "secondaryBackground"
|
||||||
|
},
|
||||||
|
"Tree": {
|
||||||
|
"background": "basicBackground",
|
||||||
|
"modifiedItemForeground": "contrast"
|
||||||
|
},
|
||||||
|
"Viewport": {
|
||||||
|
"background": "secondaryBackground"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"icons": {
|
||||||
|
"ColorPalette": {
|
||||||
|
"Checkbox.Background.Default.Dark": "#002946",
|
||||||
|
"Checkbox.Background.Default": "#002946",
|
||||||
|
"Checkbox.Background.Selected.Dark": "#FF9D00",
|
||||||
|
"Checkbox.Background.Selected": "#FF9D00",
|
||||||
|
"Checkbox.Foreground.Selected.Dark": "#002240",
|
||||||
|
"Checkbox.Foreground.Selected": "#002240"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <https://unlicense.org>
|
||||||
@@ -0,0 +1,670 @@
|
|||||||
|
{
|
||||||
|
"name": "Solarized Dark",
|
||||||
|
"dark": true,
|
||||||
|
"author": "4lex4",
|
||||||
|
"editorScheme": "/editor/SolarizedDark.xml",
|
||||||
|
"colors": {
|
||||||
|
"colorBackground": "#0E3C4A",
|
||||||
|
"colorForeground": "#A9B3AE",
|
||||||
|
"colorInactiveForeground": "#839496",
|
||||||
|
"colorSelectionBackground": "#1C62C9",
|
||||||
|
"colorSelectionBackgroundInactive": "#00243C",
|
||||||
|
"colorSelectionForeground": "#C2C5BC",
|
||||||
|
"colorSelectionForegroundInactive": "#A9B3AE",
|
||||||
|
"colorHoverBackground": "#284E5B",
|
||||||
|
"colorBorder": "#04343F",
|
||||||
|
"colorDisabledForeground": "#657B83",
|
||||||
|
"colorAlternativeBackground": "#1B4854",
|
||||||
|
"colorSeparator": "#2E4E58",
|
||||||
|
"colorAcceleratorForeground": "#527FBF",
|
||||||
|
"colorAcceleratorSelectionForeground": "#C2C5BC",
|
||||||
|
"colorHighlight": "#FFFFEB",
|
||||||
|
"colorShadow": "#B2CEE6"
|
||||||
|
},
|
||||||
|
"ui": {
|
||||||
|
"*": {
|
||||||
|
"acceleratorForeground": "colorAcceleratorForeground",
|
||||||
|
"acceleratorSelectionForeground": "colorAcceleratorSelectionForeground",
|
||||||
|
"background": "colorBackground",
|
||||||
|
"caretForeground": "colorForeground",
|
||||||
|
"disabledForeground": "colorDisabledForeground",
|
||||||
|
"disabledText": "colorDisabledForeground",
|
||||||
|
"foreground": "colorForeground",
|
||||||
|
"inactiveBackground": "colorBackground",
|
||||||
|
"inactiveForeground": "colorInactiveForeground",
|
||||||
|
"selectionBackground": "colorSelectionBackground",
|
||||||
|
"selectionBackgroundInactive": "colorSelectionBackgroundInactive",
|
||||||
|
"selectionForeground": "colorSelectionForeground",
|
||||||
|
"selectionForegroundInactive": "colorSelectionForegroundInactive",
|
||||||
|
"selectionInactiveBackground": "colorSelectionBackgroundInactive",
|
||||||
|
"selectionInactiveForeground": "colorSelectionForegroundInactive",
|
||||||
|
"textBackground": "colorBackground",
|
||||||
|
"textForeground": "colorForeground"
|
||||||
|
},
|
||||||
|
"ActionButton": {
|
||||||
|
"hoverBackground": "colorHoverBackground",
|
||||||
|
"hoverBorderColor": "colorHoverBackground",
|
||||||
|
"pressedBackground": "#43616C",
|
||||||
|
"pressedBorderColor": "#43616C"
|
||||||
|
},
|
||||||
|
"Borders": {
|
||||||
|
"color": "colorBorder",
|
||||||
|
"ContrastBorderColor": "colorBorder"
|
||||||
|
},
|
||||||
|
"Button": {
|
||||||
|
"default": {
|
||||||
|
"endBackground": "#0F5282",
|
||||||
|
"endBorderColor": "#2D6D90",
|
||||||
|
"focusColor": "#25648F",
|
||||||
|
"focusedBorderColor": "#3B749E",
|
||||||
|
"shadowColor": "#00151F1A",
|
||||||
|
"startBackground": "#0F5282",
|
||||||
|
"startBorderColor": "#2D6D90"
|
||||||
|
},
|
||||||
|
"disabledBorderColor": "#476069",
|
||||||
|
"endBackground": "#284E5B",
|
||||||
|
"endBorderColor": "#476069",
|
||||||
|
"focusedBorderColor": "#296996",
|
||||||
|
"shadowColor": "#00151F1A",
|
||||||
|
"startBackground": "#284E5B",
|
||||||
|
"startBorderColor": "#476069"
|
||||||
|
},
|
||||||
|
"CheckBox": {},
|
||||||
|
"CheckBoxMenuItem": {},
|
||||||
|
"ColorChooser": {
|
||||||
|
"swatchesDefaultRecentColor": "colorBackground"
|
||||||
|
},
|
||||||
|
"ComboBox": {
|
||||||
|
"ArrowButton": {
|
||||||
|
"disabledIconColor": "#49636B",
|
||||||
|
"iconColor": "#8D9FA2",
|
||||||
|
"nonEditableBackground": "colorBackground"
|
||||||
|
},
|
||||||
|
"disabledBackground": "colorBackground",
|
||||||
|
"modifiedItemForeground": "#519AF2",
|
||||||
|
"nonEditableBackground": "colorBackground"
|
||||||
|
},
|
||||||
|
"ComboBoxButton": {},
|
||||||
|
"ComboPopup": {
|
||||||
|
"border": "1,1,1,1,04343F"
|
||||||
|
},
|
||||||
|
"CompletionPopup": {
|
||||||
|
"foreground": "colorForeground",
|
||||||
|
"matchForeground": "#519AF2",
|
||||||
|
"selectionBackground": "#003359",
|
||||||
|
"selectionInactiveBackground": "#295462"
|
||||||
|
},
|
||||||
|
"Component": {
|
||||||
|
"borderColor": "#49636B",
|
||||||
|
"disabledBorderColor": "#49636B",
|
||||||
|
"errorFocusColor": "#743D44",
|
||||||
|
"focusColor": "#26608A",
|
||||||
|
"focusedBorderColor": "#296996",
|
||||||
|
"hoverIconColor": "#8D9FA2",
|
||||||
|
"iconColor": "#8D9FA2",
|
||||||
|
"inactiveErrorFocusColor": "#53515A",
|
||||||
|
"inactiveWarningFocusColor": "#555129",
|
||||||
|
"infoForeground": "#657B83",
|
||||||
|
"warningFocusColor": "#9A7926"
|
||||||
|
},
|
||||||
|
"Counter": {
|
||||||
|
"background": "#99A6A5B0",
|
||||||
|
"foreground": "#002B36"
|
||||||
|
},
|
||||||
|
"Debugger": {
|
||||||
|
"Variables": {
|
||||||
|
"changedValueForeground": "#519AF2",
|
||||||
|
"collectingDataForeground": "#93A1A1",
|
||||||
|
"errorMessageForeground": "#FA6060",
|
||||||
|
"evaluatingExpressionForeground": "#93A1A1",
|
||||||
|
"exceptionForeground": "#FA6060",
|
||||||
|
"modifyingValueForeground": "#519AF2",
|
||||||
|
"valueForeground": "#FD7E7A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"DebuggerPopup": {
|
||||||
|
"borderColor": "colorBorder"
|
||||||
|
},
|
||||||
|
"DebuggerTabs": {},
|
||||||
|
"DefaultTabs": {
|
||||||
|
"borderColor": "colorBorder",
|
||||||
|
"hoverBackground": "#00131F82",
|
||||||
|
"inactiveUnderlineColor": "#577A88",
|
||||||
|
"underlineColor": "#3985C7",
|
||||||
|
"underlinedTabBackground": "colorBackground",
|
||||||
|
"underlinedTabForeground": "colorForeground"
|
||||||
|
},
|
||||||
|
"DragAndDrop": {
|
||||||
|
"areaBackground": "#17475F",
|
||||||
|
"areaBorderColor": "#386FA8",
|
||||||
|
"areaForeground": "colorForeground"
|
||||||
|
},
|
||||||
|
"Editor": {
|
||||||
|
"background": "#0E272F",
|
||||||
|
"foreground": "#93A1A1",
|
||||||
|
"shortcutForeground": "#519AF2"
|
||||||
|
},
|
||||||
|
"EditorPane": {
|
||||||
|
"inactiveBackground": "colorAlternativeBackground",
|
||||||
|
"inactiveForeground": "colorForeground"
|
||||||
|
},
|
||||||
|
"EditorTabs": {
|
||||||
|
"inactiveColoredFileBackground": "#0E3C4A99",
|
||||||
|
"underlinedTabBackground": "#225261"
|
||||||
|
},
|
||||||
|
"FileColor": {
|
||||||
|
"Blue": "#2B5372",
|
||||||
|
"Green": "#215354",
|
||||||
|
"Orange": "#67625D",
|
||||||
|
"Rose": "#4D5264",
|
||||||
|
"Violet": "#534A57",
|
||||||
|
"Yellow": "#274A4C"
|
||||||
|
},
|
||||||
|
"FlameGraph": {
|
||||||
|
"JavaCell": {
|
||||||
|
"background": "#B29F66",
|
||||||
|
"foreground": "#002B36",
|
||||||
|
"hoverBackground": "#8E865F",
|
||||||
|
"hoverForeground": "#002B36",
|
||||||
|
"hoverInactiveBackground": "#76704A",
|
||||||
|
"hoverInactiveForeground": "#002B36",
|
||||||
|
"inactiveBackground": "#96854E",
|
||||||
|
"inactiveForeground": "#586E75",
|
||||||
|
"searchFailBackground": "#536861",
|
||||||
|
"searchFailHoverBackground": "#3D5853",
|
||||||
|
"searchFailHoverInactiveBackground": "#29423F",
|
||||||
|
"searchFailInactiveBackground": "#3E524C",
|
||||||
|
"searchOkBackground": "#B29F66",
|
||||||
|
"searchOkHoverBackground": "#8E865F",
|
||||||
|
"searchOkHoverInactiveBackground": "#76704A",
|
||||||
|
"searchOkInactiveBackground": "#988750"
|
||||||
|
},
|
||||||
|
"NativeCell": {
|
||||||
|
"background": "#75ABCA",
|
||||||
|
"foreground": "#002B36",
|
||||||
|
"hoverBackground": "#5B8DAC",
|
||||||
|
"hoverForeground": "#002B36",
|
||||||
|
"hoverInactiveBackground": "#437694",
|
||||||
|
"hoverInactiveForeground": "#002B36",
|
||||||
|
"inactiveBackground": "#5B90AF",
|
||||||
|
"inactiveForeground": "#586E75",
|
||||||
|
"searchFailBackground": "#376375",
|
||||||
|
"searchFailHoverBackground": "#265465",
|
||||||
|
"searchFailHoverInactiveBackground": "#0C3F4F",
|
||||||
|
"searchFailInactiveBackground": "#1E4D5E",
|
||||||
|
"searchOkBackground": "#75ABCA",
|
||||||
|
"searchOkHoverBackground": "#5B8DAC",
|
||||||
|
"searchOkHoverInactiveBackground": "#437694",
|
||||||
|
"searchOkInactiveBackground": "#5D93B1"
|
||||||
|
},
|
||||||
|
"ParentCell": {
|
||||||
|
"background": "#95A3A4",
|
||||||
|
"foreground": "#002B36",
|
||||||
|
"hoverBackground": "#7D8F92",
|
||||||
|
"hoverForeground": "#002B36",
|
||||||
|
"hoverInactiveBackground": "#627880",
|
||||||
|
"hoverInactiveForeground": "#002B36",
|
||||||
|
"inactiveBackground": "#778A8F",
|
||||||
|
"inactiveForeground": "#586E75",
|
||||||
|
"searchFailBackground": "#476069",
|
||||||
|
"searchFailHoverBackground": "#566C73",
|
||||||
|
"searchFailHoverInactiveBackground": "#3B5760",
|
||||||
|
"searchFailInactiveBackground": "#2B4C56",
|
||||||
|
"searchOkBackground": "#95A3A4",
|
||||||
|
"searchOkHoverBackground": "#7D8F92",
|
||||||
|
"searchOkHoverInactiveBackground": "#627880",
|
||||||
|
"searchOkInactiveBackground": "#7B8C8F"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"FormattedTextField": {
|
||||||
|
"background": "colorAlternativeBackground"
|
||||||
|
},
|
||||||
|
"Group": {
|
||||||
|
"disabledSeparatorColor": "colorSeparator",
|
||||||
|
"separatorColor": "colorSeparator"
|
||||||
|
},
|
||||||
|
"GutterTooltip": {
|
||||||
|
"infoForeground": "#708589",
|
||||||
|
"lineSeparatorColor": "colorBorder"
|
||||||
|
},
|
||||||
|
"HelpTooltip": {
|
||||||
|
"borderColor": "#486671"
|
||||||
|
},
|
||||||
|
"InformationHint": {
|
||||||
|
"borderColor": "colorBorder"
|
||||||
|
},
|
||||||
|
"InplaceRefactoringPopup": {
|
||||||
|
"borderColor": "colorBorder"
|
||||||
|
},
|
||||||
|
"Label": {
|
||||||
|
"errorForeground": "#FA6060",
|
||||||
|
"infoForeground": "#778A8F",
|
||||||
|
"selectedForeground": "colorForeground"
|
||||||
|
},
|
||||||
|
"Link": {
|
||||||
|
"activeForeground": "#519AF2",
|
||||||
|
"hoverForeground": "#519AF2",
|
||||||
|
"pressedForeground": "#AA6E28",
|
||||||
|
"secondaryForeground": "#3B72A2",
|
||||||
|
"visitedForeground": "#519AF2"
|
||||||
|
},
|
||||||
|
"List": {
|
||||||
|
"dropLineColor": "colorAcceleratorForeground"
|
||||||
|
},
|
||||||
|
"MemoryIndicator": {
|
||||||
|
"allocatedBackground": "#3B5760",
|
||||||
|
"usedBackground": "#566C73"
|
||||||
|
},
|
||||||
|
"Menu": {
|
||||||
|
"borderColor": "colorSeparator",
|
||||||
|
"separatorColor": "colorSeparator"
|
||||||
|
},
|
||||||
|
"MenuBar": {
|
||||||
|
"borderColor": "colorSeparator",
|
||||||
|
"disabledBackground": "colorBackground",
|
||||||
|
"highlight": "colorHighlight",
|
||||||
|
"shadow": "colorShadow"
|
||||||
|
},
|
||||||
|
"MenuItem": {
|
||||||
|
"acceleratorForeground": "colorForeground",
|
||||||
|
"disabledBackground": "colorBackground"
|
||||||
|
},
|
||||||
|
"NavBar": {
|
||||||
|
"borderColor": "colorSeparator"
|
||||||
|
},
|
||||||
|
"Notification": {
|
||||||
|
"borderColor": "#365863CD",
|
||||||
|
"errorBackground": "#353E4D",
|
||||||
|
"errorBorderColor": "#564755",
|
||||||
|
"errorForeground": "colorForeground",
|
||||||
|
"MoreButton": {
|
||||||
|
"background": "#0F3945",
|
||||||
|
"foreground": "#839496",
|
||||||
|
"innerBorderColor": "#073642"
|
||||||
|
},
|
||||||
|
"ToolWindow": {
|
||||||
|
"errorBackground": "#524950",
|
||||||
|
"errorBorderColor": "#828A91",
|
||||||
|
"errorForeground": "colorForeground",
|
||||||
|
"informativeBackground": "#123F35",
|
||||||
|
"informativeBorderColor": "#6D977F",
|
||||||
|
"informativeForeground": "colorForeground",
|
||||||
|
"warningBackground": "#435126",
|
||||||
|
"warningBorderColor": "#93A16A",
|
||||||
|
"warningForeground": "colorForeground"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"OptionPane": {
|
||||||
|
"messageForeground": "colorForeground"
|
||||||
|
},
|
||||||
|
"Panel": {},
|
||||||
|
"ParameterInfo": {
|
||||||
|
"background": "#254C57",
|
||||||
|
"borderColor": "#415E69",
|
||||||
|
"currentOverloadBackground": "#415E69",
|
||||||
|
"currentParameterForeground": "colorForeground",
|
||||||
|
"disabledForeground": "#60767D",
|
||||||
|
"infoForeground": "#708589",
|
||||||
|
"lineSeparatorColor": "#415E69"
|
||||||
|
},
|
||||||
|
"PasswordField": {
|
||||||
|
"background": "colorAlternativeBackground"
|
||||||
|
},
|
||||||
|
"Plugins": {
|
||||||
|
"background": "#013441",
|
||||||
|
"Button": {
|
||||||
|
"installBackground": "#013441",
|
||||||
|
"installBorderColor": "#057A56",
|
||||||
|
"installFillBackground": "#057A56",
|
||||||
|
"installFillForeground": "colorForeground",
|
||||||
|
"installFocusedBackground": "#DFF6DB",
|
||||||
|
"installForeground": "#057A56",
|
||||||
|
"updateBackground": "#004880",
|
||||||
|
"updateBorderColor": "#004880",
|
||||||
|
"updateForeground": "colorForeground"
|
||||||
|
},
|
||||||
|
"disabledForeground": "#546971",
|
||||||
|
"eapTagBackground": "#EFD2CF",
|
||||||
|
"lightSelectionBackground": "#0B3A48",
|
||||||
|
"SearchField": {
|
||||||
|
"background": "#013441",
|
||||||
|
"borderColor": "#30505B"
|
||||||
|
},
|
||||||
|
"SectionHeader": {
|
||||||
|
"background": "#0C3D45",
|
||||||
|
"foreground": "#88999B"
|
||||||
|
},
|
||||||
|
"Tab": {},
|
||||||
|
"tagBackground": "#2E4E58",
|
||||||
|
"tagForeground": "#88999B"
|
||||||
|
},
|
||||||
|
"Popup": {
|
||||||
|
"Advertiser": {
|
||||||
|
"borderColor": "#708589"
|
||||||
|
},
|
||||||
|
"borderColor": "#476069",
|
||||||
|
"Header": {
|
||||||
|
"activeBackground": "#204D5C",
|
||||||
|
"inactiveBackground": "#1B4555"
|
||||||
|
},
|
||||||
|
"inactiveBorderColor": "#38555E",
|
||||||
|
"separatorColor": "colorSeparator",
|
||||||
|
"separatorForeground": "#6B8086",
|
||||||
|
"Toolbar": {
|
||||||
|
"borderColor": "#264C59"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PopupMenu": {
|
||||||
|
"translucentBackground": "colorBackground"
|
||||||
|
},
|
||||||
|
"ProgressBar": {
|
||||||
|
"failedColor": "#DE4647",
|
||||||
|
"failedEndColor": "#EFA0A0",
|
||||||
|
"foreground": "#6B8086",
|
||||||
|
"indeterminateEndColor": "#6D8289",
|
||||||
|
"indeterminateStartColor": "#4E6770",
|
||||||
|
"passedColor": "#008A4B",
|
||||||
|
"passedEndColor": "#4FC392",
|
||||||
|
"progressColor": "#93A1A1",
|
||||||
|
"trackColor": "#36525B"
|
||||||
|
},
|
||||||
|
"RadioButton": {},
|
||||||
|
"RadioButtonMenuItem": {},
|
||||||
|
"ScrollBar": {
|
||||||
|
"background": "#14414F",
|
||||||
|
"hoverThumbBorderColor": "#0A384459",
|
||||||
|
"hoverThumbColor": "#99A6A559",
|
||||||
|
"hoverTrackColor": "",
|
||||||
|
"Mac": {
|
||||||
|
"hoverThumbBorderColor": "#0027328C",
|
||||||
|
"hoverThumbColor": "#6B80868C",
|
||||||
|
"hoverTrackColor": "",
|
||||||
|
"thumbBorderColor": "#00273259",
|
||||||
|
"thumbColor": "#6B808659",
|
||||||
|
"trackColor": "",
|
||||||
|
"Transparent": {
|
||||||
|
"hoverThumbBorderColor": "#0027328C",
|
||||||
|
"hoverThumbColor": "#6B80868C",
|
||||||
|
"hoverTrackColor": "#6B80861A",
|
||||||
|
"thumbBorderColor": "",
|
||||||
|
"thumbColor": "",
|
||||||
|
"trackColor": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"thumbBorderColor": "#0A384447",
|
||||||
|
"thumbColor": "#99A6A547",
|
||||||
|
"trackColor": "",
|
||||||
|
"Transparent": {
|
||||||
|
"hoverThumbBorderColor": "#0A384459",
|
||||||
|
"hoverThumbColor": "#99A6A559",
|
||||||
|
"hoverTrackColor": "#6B80861A",
|
||||||
|
"thumbBorderColor": "#0A384447",
|
||||||
|
"thumbColor": "#99A6A547",
|
||||||
|
"trackColor": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ScrollPane": {},
|
||||||
|
"SearchEverywhere": {
|
||||||
|
"Advertiser": {
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"foreground": "#6B8086"
|
||||||
|
},
|
||||||
|
"Header": {
|
||||||
|
"background": "colorAlternativeBackground"
|
||||||
|
},
|
||||||
|
"List": {
|
||||||
|
"separatorColor": "#2E4E58",
|
||||||
|
"separatorForeground": "#6B8086"
|
||||||
|
},
|
||||||
|
"SearchField": {
|
||||||
|
"borderColor": "#49636B",
|
||||||
|
"infoForeground": "#6B8086"
|
||||||
|
},
|
||||||
|
"Tab": {
|
||||||
|
"selectedBackground": "#365863",
|
||||||
|
"selectedForeground": "colorForeground"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"SearchField": {
|
||||||
|
"errorBackground": "#5B3C43"
|
||||||
|
},
|
||||||
|
"SearchMatch": {
|
||||||
|
"endBackground": "#FCCE40",
|
||||||
|
"startBackground": "#FFEAA2"
|
||||||
|
},
|
||||||
|
"Separator": {
|
||||||
|
"separatorColor": "colorSeparator"
|
||||||
|
},
|
||||||
|
"Settings": {
|
||||||
|
"Spotlight": {
|
||||||
|
"borderColor": "#9A670064"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"SidePanel": {
|
||||||
|
"background": "#0E4155"
|
||||||
|
},
|
||||||
|
"Slider": {
|
||||||
|
"buttonBorderColor": "#023B49",
|
||||||
|
"buttonColor": "#909E9E",
|
||||||
|
"tickColor": "#4C656D",
|
||||||
|
"trackColor": "#4C656D"
|
||||||
|
},
|
||||||
|
"SpeedSearch": {
|
||||||
|
"borderColor": "#6B8086",
|
||||||
|
"errorForeground": "#FA6060"
|
||||||
|
},
|
||||||
|
"Spinner": {},
|
||||||
|
"SplitPane": {
|
||||||
|
"darkShadow": "#628A9F",
|
||||||
|
"highlight": "colorBackground",
|
||||||
|
"shadow": "colorShadow"
|
||||||
|
},
|
||||||
|
"SplitPaneDivider": {
|
||||||
|
"draggingColor": "#193E49"
|
||||||
|
},
|
||||||
|
"StatusBar": {
|
||||||
|
"borderColor": "#204550",
|
||||||
|
"hoverBackground": "colorHoverBackground"
|
||||||
|
},
|
||||||
|
"TabbedPane": {
|
||||||
|
"contentAreaColor": "#04343F",
|
||||||
|
"disabledUnderlineColor": "#627880",
|
||||||
|
"focus": "colorAcceleratorForeground",
|
||||||
|
"focusColor": "#164864",
|
||||||
|
"hoverColor": "#003240",
|
||||||
|
"underlineColor": "#3985C7"
|
||||||
|
},
|
||||||
|
"Table": {
|
||||||
|
"dropLineColor": "colorAcceleratorForeground",
|
||||||
|
"dropLineShortColor": "#0C3542",
|
||||||
|
"focusCellBackground": "colorAlternativeBackground",
|
||||||
|
"focusCellForeground": "colorForeground",
|
||||||
|
"gridColor": "#284E5B",
|
||||||
|
"lightSelectionBackground": "#1B4755",
|
||||||
|
"lightSelectionForeground": "colorForeground",
|
||||||
|
"lightSelectionInactiveBackground": "#1B4755",
|
||||||
|
"lightSelectionInactiveForeground": "colorForeground",
|
||||||
|
"sortIconColor": "#839496",
|
||||||
|
"stripeColor": "#174351"
|
||||||
|
},
|
||||||
|
"TableHeader": {
|
||||||
|
"background": "#194553",
|
||||||
|
"bottomSeparatorColor": "#003442",
|
||||||
|
"focusCellBackground": "colorAlternativeBackground",
|
||||||
|
"separatorColor": "#003442"
|
||||||
|
},
|
||||||
|
"TextArea": {
|
||||||
|
"background": "colorAlternativeBackground"
|
||||||
|
},
|
||||||
|
"TextComponent": {},
|
||||||
|
"TextField": {
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"darkShadow": "#628A9F",
|
||||||
|
"highlight": "colorHighlight"
|
||||||
|
},
|
||||||
|
"TextPane": {},
|
||||||
|
"TitledBorder": {
|
||||||
|
"titleColor": "colorForeground"
|
||||||
|
},
|
||||||
|
"TitlePane": {
|
||||||
|
"Button": {
|
||||||
|
"hoverBackground": "#FFFFEB1A"
|
||||||
|
},
|
||||||
|
"inactiveInfoForeground": "#586E75",
|
||||||
|
"infoForeground": "#839496"
|
||||||
|
},
|
||||||
|
"ToggleButton": {
|
||||||
|
"borderColor": "#2E4E58",
|
||||||
|
"buttonColor": "#49636B",
|
||||||
|
"offBackground": "colorAlternativeBackground",
|
||||||
|
"offForeground": "colorDisabledForeground",
|
||||||
|
"onBackground": "#2B6955",
|
||||||
|
"onForeground": "colorForeground"
|
||||||
|
},
|
||||||
|
"ToolBar": {
|
||||||
|
"darkShadow": "#628A9F",
|
||||||
|
"floatingForeground": "#A2CAF1",
|
||||||
|
"highlight": "colorHighlight",
|
||||||
|
"light": "colorHighlight",
|
||||||
|
"shadow": "colorShadow"
|
||||||
|
},
|
||||||
|
"Toolbar": {
|
||||||
|
"Floating": {
|
||||||
|
"background": "#174857"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ToolTip": {
|
||||||
|
"Actions": {
|
||||||
|
"background": "#1A4653",
|
||||||
|
"infoForeground": "#7D8F92"
|
||||||
|
},
|
||||||
|
"background": "#254C57",
|
||||||
|
"borderColor": "#486671",
|
||||||
|
"infoForeground": "#778A8F",
|
||||||
|
"shortcutForeground": "#88999B"
|
||||||
|
},
|
||||||
|
"Tooltip": {
|
||||||
|
"separatorColor": "#38555E"
|
||||||
|
},
|
||||||
|
"ToolWindow": {
|
||||||
|
"Button": {
|
||||||
|
"hoverBackground": "#00151F30",
|
||||||
|
"selectedBackground": "#00151F5A",
|
||||||
|
"selectedForeground": "#CCCDC1"
|
||||||
|
},
|
||||||
|
"Header": {
|
||||||
|
"background": "#11435A",
|
||||||
|
"borderColor": "colorBorder",
|
||||||
|
"inactiveBackground": "colorBackground"
|
||||||
|
},
|
||||||
|
"HeaderCloseButton": {
|
||||||
|
"background": "#123E4F"
|
||||||
|
},
|
||||||
|
"HeaderTab": {
|
||||||
|
"selectedInactiveBackground": "#0D3340"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Tree": {
|
||||||
|
"errorForeground": "#FA6060",
|
||||||
|
"hash": "#2B515E",
|
||||||
|
"modifiedItemForeground": "#519AF2"
|
||||||
|
},
|
||||||
|
"UiDesigner": {
|
||||||
|
"Panel": {},
|
||||||
|
"Preview": {}
|
||||||
|
},
|
||||||
|
"ValidationTooltip": {
|
||||||
|
"errorBackground": "#353E4D",
|
||||||
|
"errorBorderColor": "#564755",
|
||||||
|
"warningBackground": "#384E3C",
|
||||||
|
"warningBorderColor": "#6E5209"
|
||||||
|
},
|
||||||
|
"VersionControl": {
|
||||||
|
"FileHistory": {
|
||||||
|
"Commit": {
|
||||||
|
"selectedBranchBackground": "#224849"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"GitLog": {
|
||||||
|
"headIconColor": "#DAC732",
|
||||||
|
"localBranchIconColor": "#2AB15E",
|
||||||
|
"otherIconColor": "#7D8F92",
|
||||||
|
"remoteBranchIconColor": "#8D78B9",
|
||||||
|
"tagIconColor": "#7D8F92"
|
||||||
|
},
|
||||||
|
"HgLog": {
|
||||||
|
"bookmarkIconColor": "#8D78B9",
|
||||||
|
"branchIconColor": "#2AB15E",
|
||||||
|
"closedBranchIconColor": "#FD5C6C",
|
||||||
|
"headIconColor": "#B51D8F",
|
||||||
|
"localTagIconColor": "#00F1F0",
|
||||||
|
"mqTagIconColor": "#0050F8",
|
||||||
|
"tagIconColor": "#7D8F92",
|
||||||
|
"tipIconColor": "#DAC732"
|
||||||
|
},
|
||||||
|
"Log": {
|
||||||
|
"Commit": {
|
||||||
|
"currentBranchBackground": "#044452",
|
||||||
|
"unmatchedForeground": "#657B83"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"RefLabel": {
|
||||||
|
"backgroundBase": "#FFFFEB",
|
||||||
|
"foreground": "#7D8F92"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Viewport": {},
|
||||||
|
"WelcomeScreen": {
|
||||||
|
"background": "#1D4553",
|
||||||
|
"borderColor": "#31535F",
|
||||||
|
"captionBackground": "#294953",
|
||||||
|
"captionForeground": "#C2C5BC",
|
||||||
|
"footerBackground": "#294953",
|
||||||
|
"footerForeground": "#C2C5BC",
|
||||||
|
"groupIconBorderColor": "#0A3844",
|
||||||
|
"headerBackground": "#294953",
|
||||||
|
"headerForeground": "#C2C5BC",
|
||||||
|
"Projects": {
|
||||||
|
"background": "#113842",
|
||||||
|
"selectionBackground": "#396AB0",
|
||||||
|
"selectionInactiveBackground": "#1E434E"
|
||||||
|
},
|
||||||
|
"separatorColor": "#244A57"
|
||||||
|
},
|
||||||
|
"Window": {
|
||||||
|
"border": "colorBorder"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"icons": {
|
||||||
|
"ColorPalette": {
|
||||||
|
"Actions.Red": "#DC322F",
|
||||||
|
"Actions.Yellow": "#B58900",
|
||||||
|
"Actions.Green": "#859900",
|
||||||
|
"Actions.Blue": "#268BD2",
|
||||||
|
"Actions.Grey": "#93A1A1",
|
||||||
|
"Actions.GreyInline.Dark": "#93A1A1",
|
||||||
|
"Objects.Grey": "#93A1A1",
|
||||||
|
"Objects.Blue": "#268BD2",
|
||||||
|
"Objects.Green": "#859900",
|
||||||
|
"Objects.Yellow": "#B58900",
|
||||||
|
"Objects.YellowDark": "#CB4B16",
|
||||||
|
"Objects.Purple": "#6C71C4",
|
||||||
|
"Objects.Pink": "#D33682",
|
||||||
|
"Objects.Red": "#DC322F",
|
||||||
|
"Objects.RedStatus": "#DC322F",
|
||||||
|
"Objects.BlackText": "#002B36FF",
|
||||||
|
"Objects.GreenAndroid": "#859900",
|
||||||
|
"Checkbox.Background.Default.Dark": "#1B4854",
|
||||||
|
"Checkbox.Border.Default.Dark": "#476069",
|
||||||
|
"Checkbox.Background.Selected.Dark": "#1B4854",
|
||||||
|
"Checkbox.Border.Selected.Dark": "#42646D",
|
||||||
|
"Checkbox.Foreground.Selected.Dark": "#A9B3AE",
|
||||||
|
"Checkbox.Background.Disabled.Dark": "#0E3C4A",
|
||||||
|
"Checkbox.Border.Disabled.Dark": "#476069",
|
||||||
|
"Checkbox.Foreground.Disabled.Dark": "#476069",
|
||||||
|
"Checkbox.Focus.Thin.Default.Dark": "#296996",
|
||||||
|
"Checkbox.Focus.Thin.Selected.Dark": "#296996",
|
||||||
|
"Checkbox.Focus.Wide.Dark": "#296996"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,675 @@
|
|||||||
|
{
|
||||||
|
"name": "Solarized Light",
|
||||||
|
"dark": false,
|
||||||
|
"author": "4lex4",
|
||||||
|
"editorScheme": "/editor/SolarizedLight.xml",
|
||||||
|
"colors": {
|
||||||
|
"colorBackground": "#EEE8D5",
|
||||||
|
"colorForeground": "#2E4E58",
|
||||||
|
"colorInactiveForeground": "#657B83",
|
||||||
|
"colorSelectionBackground": "#3570CD",
|
||||||
|
"colorSelectionBackgroundInactive": "#D3D2C6",
|
||||||
|
"colorSelectionForeground": "#FFFFEB",
|
||||||
|
"colorSelectionForegroundInactive": "#2E4E58",
|
||||||
|
"colorHoverBackground": "#D9D7CA",
|
||||||
|
"colorBorder": "#C8CAC0",
|
||||||
|
"colorDisabledForeground": "#839496",
|
||||||
|
"colorAlternativeBackground": "#FDF6E3",
|
||||||
|
"colorSeparator": "#C8CAC0",
|
||||||
|
"colorAcceleratorForeground": "#617EB3",
|
||||||
|
"colorAcceleratorSelectionForeground": "#FFFFEB",
|
||||||
|
"colorHighlight": "#FFFFEB",
|
||||||
|
"colorShadow": "#B5C7CF"
|
||||||
|
},
|
||||||
|
"ui": {
|
||||||
|
"*": {
|
||||||
|
"acceleratorForeground": "colorAcceleratorForeground",
|
||||||
|
"acceleratorSelectionForeground": "colorAcceleratorSelectionForeground",
|
||||||
|
"background": "colorBackground",
|
||||||
|
"caretForeground": "colorForeground",
|
||||||
|
"disabledForeground": "colorDisabledForeground",
|
||||||
|
"disabledText": "colorDisabledForeground",
|
||||||
|
"foreground": "colorForeground",
|
||||||
|
"inactiveBackground": "colorBackground",
|
||||||
|
"inactiveForeground": "colorInactiveForeground",
|
||||||
|
"selectionBackground": "colorSelectionBackground",
|
||||||
|
"selectionBackgroundInactive": "colorSelectionBackgroundInactive",
|
||||||
|
"selectionForeground": "colorSelectionForeground",
|
||||||
|
"selectionForegroundInactive": "colorSelectionForegroundInactive",
|
||||||
|
"selectionInactiveBackground": "colorSelectionBackgroundInactive",
|
||||||
|
"selectionInactiveForeground": "colorSelectionForegroundInactive",
|
||||||
|
"textBackground": "colorBackground",
|
||||||
|
"textForeground": "colorForeground"
|
||||||
|
},
|
||||||
|
"ActionButton": {
|
||||||
|
"hoverBackground": "colorHoverBackground",
|
||||||
|
"hoverBorderColor": "colorHoverBackground",
|
||||||
|
"pressedBackground": "#C6C7BD",
|
||||||
|
"pressedBorderColor": "#C6C7BD"
|
||||||
|
},
|
||||||
|
"Borders": {
|
||||||
|
"color": "colorBorder",
|
||||||
|
"ContrastBorderColor": "colorBorder"
|
||||||
|
},
|
||||||
|
"Button": {
|
||||||
|
"default": {
|
||||||
|
"endBackground": "#4681BB",
|
||||||
|
"endBorderColor": "#3065A7",
|
||||||
|
"focusedBorderColor": "#A5C7E2",
|
||||||
|
"foreground": "#FDF6E3",
|
||||||
|
"shadowColor": "#000E1B0F",
|
||||||
|
"startBackground": "#4681BB",
|
||||||
|
"startBorderColor": "#4676B2"
|
||||||
|
},
|
||||||
|
"disabledBorderColor": "#C6C7BD",
|
||||||
|
"endBackground": "colorAlternativeBackground",
|
||||||
|
"endBorderColor": "#A7B0AC",
|
||||||
|
"focusedBorderColor": "#86ABCB",
|
||||||
|
"shadowColor": "#000E1B0F",
|
||||||
|
"startBackground": "colorAlternativeBackground",
|
||||||
|
"startBorderColor": "#B4BAB5"
|
||||||
|
},
|
||||||
|
"CheckBox": {},
|
||||||
|
"CheckBoxMenuItem": {},
|
||||||
|
"ColorChooser": {
|
||||||
|
"swatchesDefaultRecentColor": "#CFD0C3"
|
||||||
|
},
|
||||||
|
"ComboBox": {
|
||||||
|
"ArrowButton": {
|
||||||
|
"background": "#F7F0DD",
|
||||||
|
"disabledIconColor": "#A1ABA8",
|
||||||
|
"iconColor": "#4E6770",
|
||||||
|
"nonEditableBackground": "colorAlternativeBackground"
|
||||||
|
},
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"disabledBackground": "colorBackground",
|
||||||
|
"modifiedItemForeground": "#3961FA",
|
||||||
|
"nonEditableBackground": "colorAlternativeBackground"
|
||||||
|
},
|
||||||
|
"ComboBoxButton": {
|
||||||
|
"background": "colorAlternativeBackground"
|
||||||
|
},
|
||||||
|
"ComboPopup": {
|
||||||
|
"border": "1,1,1,1,C8CAC0"
|
||||||
|
},
|
||||||
|
"CompletionPopup": {
|
||||||
|
"foreground": "colorForeground",
|
||||||
|
"matchForeground": "#4975B9",
|
||||||
|
"selectionBackground": "#BED8F0",
|
||||||
|
"selectionInactiveBackground": "#D9D7CA"
|
||||||
|
},
|
||||||
|
"Component": {
|
||||||
|
"borderColor": "#BAC0B8",
|
||||||
|
"disabledBorderColor": "#C6C7BD",
|
||||||
|
"errorFocusColor": "#DE3641",
|
||||||
|
"focusColor": "#95BDE1",
|
||||||
|
"focusedBorderColor": "#86ABCB",
|
||||||
|
"hoverIconColor": "#4E6770",
|
||||||
|
"iconColor": "#4E6770",
|
||||||
|
"inactiveErrorFocusColor": "#E8B4A6",
|
||||||
|
"inactiveWarningFocusColor": "#F6CA7C",
|
||||||
|
"infoForeground": "#839496",
|
||||||
|
"warningFocusColor": "#DC9E2F"
|
||||||
|
},
|
||||||
|
"Counter": {
|
||||||
|
"background": "#99A6A5B0",
|
||||||
|
"foreground": "#002B36"
|
||||||
|
},
|
||||||
|
"Debugger": {
|
||||||
|
"Variables": {
|
||||||
|
"changedValueForeground": "#3961FA",
|
||||||
|
"collectingDataForeground": "#586E75",
|
||||||
|
"errorMessageForeground": "#F94A26",
|
||||||
|
"evaluatingExpressionForeground": "#586E75",
|
||||||
|
"exceptionForeground": "#F94A26",
|
||||||
|
"modifyingValueForeground": "#3961FA",
|
||||||
|
"valueForeground": "#C44C30"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"DebuggerPopup": {
|
||||||
|
"borderColor": "colorBorder"
|
||||||
|
},
|
||||||
|
"DebuggerTabs": {},
|
||||||
|
"DefaultTabs": {
|
||||||
|
"borderColor": "colorBorder",
|
||||||
|
"hoverBackground": "#000E1B1A",
|
||||||
|
"inactiveUnderlineColor": "#92A4A7",
|
||||||
|
"underlineColor": "#3D7EC0",
|
||||||
|
"underlinedTabBackground": "colorBackground",
|
||||||
|
"underlinedTabForeground": "colorForeground"
|
||||||
|
},
|
||||||
|
"DragAndDrop": {
|
||||||
|
"areaBackground": "#DEE3DE",
|
||||||
|
"areaBorderColor": "#88ACCD",
|
||||||
|
"areaForeground": "#657B83"
|
||||||
|
},
|
||||||
|
"Editor": {
|
||||||
|
"background": "#B5B0A2",
|
||||||
|
"foreground": "#36525B",
|
||||||
|
"shortcutForeground": "#516091"
|
||||||
|
},
|
||||||
|
"EditorPane": {
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"inactiveBackground": "colorAlternativeBackground"
|
||||||
|
},
|
||||||
|
"EditorTabs": {
|
||||||
|
"inactiveColoredFileBackground": "#0B080112",
|
||||||
|
"underlinedTabBackground": "colorAlternativeBackground"
|
||||||
|
},
|
||||||
|
"FileColor": {
|
||||||
|
"Blue": "#E8EEE5",
|
||||||
|
"Green": "#EDF2CE",
|
||||||
|
"Orange": "#F2E0C2",
|
||||||
|
"Rose": "#F0D4C2",
|
||||||
|
"Violet": "#E4D8D8",
|
||||||
|
"Yellow": "#FBF4C9"
|
||||||
|
},
|
||||||
|
"FlameGraph": {
|
||||||
|
"JavaCell": {
|
||||||
|
"background": "#F8D583",
|
||||||
|
"foreground": "#073642",
|
||||||
|
"hoverBackground": "#E5C67B",
|
||||||
|
"hoverForeground": "#073642",
|
||||||
|
"hoverInactiveBackground": "#C9A95A",
|
||||||
|
"hoverInactiveForeground": "#073642",
|
||||||
|
"inactiveBackground": "#DBB969",
|
||||||
|
"inactiveForeground": "#657B83",
|
||||||
|
"searchFailBackground": "#C0A86D",
|
||||||
|
"searchFailHoverBackground": "#9A865B",
|
||||||
|
"searchFailHoverInactiveBackground": "#7F6D43",
|
||||||
|
"searchFailInactiveBackground": "#A48E54",
|
||||||
|
"searchOkBackground": "#F8D583",
|
||||||
|
"searchOkHoverBackground": "#E5C67B",
|
||||||
|
"searchOkHoverInactiveBackground": "#C7AA60",
|
||||||
|
"searchOkInactiveBackground": "#DBB969"
|
||||||
|
},
|
||||||
|
"NativeCell": {
|
||||||
|
"background": "#A7D1DD",
|
||||||
|
"foreground": "#073642",
|
||||||
|
"hoverBackground": "#98BBCD",
|
||||||
|
"hoverForeground": "#073642",
|
||||||
|
"hoverInactiveBackground": "#7CA5B1",
|
||||||
|
"hoverInactiveForeground": "#073642",
|
||||||
|
"inactiveBackground": "#8CB5C1",
|
||||||
|
"inactiveForeground": "#657B83",
|
||||||
|
"searchFailBackground": "#8DADBA",
|
||||||
|
"searchFailHoverBackground": "#72858C",
|
||||||
|
"searchFailHoverInactiveBackground": "#596B72",
|
||||||
|
"searchFailInactiveBackground": "#75939F",
|
||||||
|
"searchOkBackground": "#A7D1DD",
|
||||||
|
"searchOkHoverBackground": "#98BBCD",
|
||||||
|
"searchOkHoverInactiveBackground": "#7FA1B2",
|
||||||
|
"searchOkInactiveBackground": "#8CB5C1"
|
||||||
|
},
|
||||||
|
"ParentCell": {
|
||||||
|
"background": "#D3D2C6",
|
||||||
|
"foreground": "#073642",
|
||||||
|
"hoverBackground": "#BEC2B9",
|
||||||
|
"hoverForeground": "#073642",
|
||||||
|
"hoverInactiveBackground": "#9DA8A7",
|
||||||
|
"hoverInactiveForeground": "#073642",
|
||||||
|
"inactiveBackground": "#B1B8B2",
|
||||||
|
"inactiveForeground": "#657B83",
|
||||||
|
"searchFailBackground": "#7B8C8F",
|
||||||
|
"searchFailHoverBackground": "#9DA8A7",
|
||||||
|
"searchFailHoverInactiveBackground": "#7D8F92",
|
||||||
|
"searchFailInactiveBackground": "#5D737B",
|
||||||
|
"searchOkBackground": "#D3D2C6",
|
||||||
|
"searchOkHoverBackground": "#BEC2B9",
|
||||||
|
"searchOkHoverInactiveBackground": "#9DA8A7",
|
||||||
|
"searchOkInactiveBackground": "#B1B8B2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"FormattedTextField": {
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"inactiveBackground": "colorAlternativeBackground"
|
||||||
|
},
|
||||||
|
"Group": {
|
||||||
|
"disabledSeparatorColor": "colorSeparator",
|
||||||
|
"separatorColor": "colorSeparator"
|
||||||
|
},
|
||||||
|
"GutterTooltip": {
|
||||||
|
"infoForeground": "#657B83",
|
||||||
|
"lineSeparatorColor": "colorBorder"
|
||||||
|
},
|
||||||
|
"HelpTooltip": {
|
||||||
|
"borderColor": "#A1ABA8"
|
||||||
|
},
|
||||||
|
"InformationHint": {
|
||||||
|
"borderColor": "colorBorder"
|
||||||
|
},
|
||||||
|
"InplaceRefactoringPopup": {
|
||||||
|
"borderColor": "colorBorder"
|
||||||
|
},
|
||||||
|
"Label": {
|
||||||
|
"errorForeground": "#F95551",
|
||||||
|
"infoForeground": "#657B83",
|
||||||
|
"selectedForeground": "colorForeground"
|
||||||
|
},
|
||||||
|
"Link": {
|
||||||
|
"activeForeground": "#4975B9",
|
||||||
|
"hoverForeground": "#4975B9",
|
||||||
|
"pressedForeground": "#2857A1",
|
||||||
|
"secondaryForeground": "#7598AF",
|
||||||
|
"visitedForeground": "#516091"
|
||||||
|
},
|
||||||
|
"List": {
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"dropLineColor": "colorAcceleratorForeground"
|
||||||
|
},
|
||||||
|
"MemoryIndicator": {
|
||||||
|
"allocatedBackground": "#CFD0C3",
|
||||||
|
"usedBackground": "#ADB5AF"
|
||||||
|
},
|
||||||
|
"Menu": {
|
||||||
|
"borderColor": "#D3D2C6",
|
||||||
|
"disabledBackground": "colorBackground",
|
||||||
|
"separatorColor": "colorSeparator"
|
||||||
|
},
|
||||||
|
"MenuBar": {
|
||||||
|
"borderColor": "colorSeparator",
|
||||||
|
"disabledBackground": "colorBackground",
|
||||||
|
"highlight": "colorHighlight",
|
||||||
|
"shadow": "colorShadow"
|
||||||
|
},
|
||||||
|
"MenuItem": {
|
||||||
|
"acceleratorForeground": "#49636B",
|
||||||
|
"disabledBackground": "colorBackground"
|
||||||
|
},
|
||||||
|
"NavBar": {
|
||||||
|
"borderColor": "colorSeparator"
|
||||||
|
},
|
||||||
|
"Notification": {
|
||||||
|
"borderColor": "#A7B0ACCD",
|
||||||
|
"errorBackground": "#F2DED1",
|
||||||
|
"errorBorderColor": "#DDA195",
|
||||||
|
"errorForeground": "colorForeground",
|
||||||
|
"MoreButton": {
|
||||||
|
"background": "#DDDACB",
|
||||||
|
"foreground": "#586E75",
|
||||||
|
"innerBorderColor": "#D3D2C6"
|
||||||
|
},
|
||||||
|
"ToolWindow": {
|
||||||
|
"errorBackground": "#F8C4C5",
|
||||||
|
"errorBorderColor": "#D49084",
|
||||||
|
"errorForeground": "colorForeground",
|
||||||
|
"informativeBackground": "#B4E4A2",
|
||||||
|
"informativeBorderColor": "#9DB88A",
|
||||||
|
"informativeForeground": "colorForeground",
|
||||||
|
"warningBackground": "#F7F280",
|
||||||
|
"warningBorderColor": "#B4B21A",
|
||||||
|
"warningForeground": "colorForeground"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"OptionPane": {
|
||||||
|
"messageForeground": "colorForeground"
|
||||||
|
},
|
||||||
|
"Panel": {},
|
||||||
|
"ParameterInfo": {
|
||||||
|
"background": "#F5F1E5",
|
||||||
|
"borderColor": "#D9D7CA",
|
||||||
|
"currentOverloadBackground": "#D9D7CA",
|
||||||
|
"currentParameterForeground": "colorForeground",
|
||||||
|
"disabledForeground": "#A3ADAB",
|
||||||
|
"infoForeground": "#657B83",
|
||||||
|
"lineSeparatorColor": "#D9D7CA"
|
||||||
|
},
|
||||||
|
"PasswordField": {
|
||||||
|
"background": "colorAlternativeBackground"
|
||||||
|
},
|
||||||
|
"Plugins": {
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"Button": {
|
||||||
|
"installBackground": "colorAlternativeBackground",
|
||||||
|
"installBorderColor": "#81BA5C",
|
||||||
|
"installFillBackground": "#81BA5C",
|
||||||
|
"installFillForeground": "colorAlternativeBackground",
|
||||||
|
"installFocusedBackground": "#DFEEC2",
|
||||||
|
"installForeground": "#81BA5C",
|
||||||
|
"updateBackground": "#5F9DE7",
|
||||||
|
"updateBorderColor": "#5F9DE7",
|
||||||
|
"updateForeground": "colorAlternativeBackground"
|
||||||
|
},
|
||||||
|
"disabledForeground": "#A3ADAB",
|
||||||
|
"eapTagBackground": "#EECAB6",
|
||||||
|
"lightSelectionBackground": "#F3F1E3",
|
||||||
|
"SearchField": {
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"borderColor": "#B4BAB5"
|
||||||
|
},
|
||||||
|
"SectionHeader": {
|
||||||
|
"background": "#F4EDDA",
|
||||||
|
"foreground": "#627880"
|
||||||
|
},
|
||||||
|
"Tab": {},
|
||||||
|
"tagBackground": "#E8E2D2",
|
||||||
|
"tagForeground": "#627880"
|
||||||
|
},
|
||||||
|
"Popup": {
|
||||||
|
"Advertiser": {
|
||||||
|
"borderColor": "colorBorder"
|
||||||
|
},
|
||||||
|
"borderColor": "#A1ABA8",
|
||||||
|
"Header": {
|
||||||
|
"activeBackground": "#E2DCCA",
|
||||||
|
"inactiveBackground": "#EBE5D2"
|
||||||
|
},
|
||||||
|
"inactiveBorderColor": "#9DA8A7",
|
||||||
|
"separatorColor": "#D3D2C6",
|
||||||
|
"separatorForeground": "#6B8086",
|
||||||
|
"Toolbar": {
|
||||||
|
"borderColor": "#F7F0DD"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PopupMenu": {
|
||||||
|
"translucentBackground": "colorBackground"
|
||||||
|
},
|
||||||
|
"ProgressBar": {
|
||||||
|
"failedColor": "#D14943",
|
||||||
|
"failedEndColor": "#F6887C",
|
||||||
|
"indeterminateEndColor": "#6B8086",
|
||||||
|
"indeterminateStartColor": "#BAC0B8",
|
||||||
|
"passedColor": "#2DAA66",
|
||||||
|
"passedEndColor": "#77DF92",
|
||||||
|
"progressColor": "#6B8086",
|
||||||
|
"trackColor": "#BAC0B8"
|
||||||
|
},
|
||||||
|
"RadioButton": {},
|
||||||
|
"RadioButtonMenuItem": {},
|
||||||
|
"ScrollBar": {
|
||||||
|
"background": "#F5F0E3",
|
||||||
|
"hoverThumbBorderColor": "#4B5A5F47",
|
||||||
|
"hoverThumbColor": "#5D737B47",
|
||||||
|
"hoverTrackColor": "",
|
||||||
|
"Mac": {
|
||||||
|
"hoverThumbBorderColor": "#002B3680",
|
||||||
|
"hoverThumbColor": "#002B3680",
|
||||||
|
"hoverTrackColor": "",
|
||||||
|
"thumbBorderColor": "#002B3633",
|
||||||
|
"thumbColor": "#002B3633",
|
||||||
|
"trackColor": "",
|
||||||
|
"Transparent": {
|
||||||
|
"hoverThumbBorderColor": "#002B3680",
|
||||||
|
"hoverThumbColor": "#002B3680",
|
||||||
|
"hoverTrackColor": "#6D82891A",
|
||||||
|
"thumbBorderColor": "",
|
||||||
|
"thumbColor": "",
|
||||||
|
"trackColor": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"thumbBorderColor": "#4B5A5F33",
|
||||||
|
"thumbColor": "#5D737B33",
|
||||||
|
"trackColor": "",
|
||||||
|
"Transparent": {
|
||||||
|
"hoverThumbBorderColor": "#4B5A5F47",
|
||||||
|
"hoverThumbColor": "#5D737B47",
|
||||||
|
"hoverTrackColor": "#6D82891A",
|
||||||
|
"thumbBorderColor": "#4B5A5F33",
|
||||||
|
"thumbColor": "#5D737B33",
|
||||||
|
"trackColor": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ScrollPane": {},
|
||||||
|
"SearchEverywhere": {
|
||||||
|
"Advertiser": {
|
||||||
|
"foreground": "#6B8086"
|
||||||
|
},
|
||||||
|
"Header": {},
|
||||||
|
"List": {
|
||||||
|
"separatorColor": "#D7D5C7",
|
||||||
|
"separatorForeground": "#657B83"
|
||||||
|
},
|
||||||
|
"SearchField": {
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"borderColor": "#B4BAB5",
|
||||||
|
"infoForeground": "#6B8086"
|
||||||
|
},
|
||||||
|
"Tab": {
|
||||||
|
"selectedBackground": "#DAD5C3",
|
||||||
|
"selectedForeground": "colorForeground"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"SearchField": {
|
||||||
|
"errorBackground": "#FCC4B3"
|
||||||
|
},
|
||||||
|
"SearchMatch": {
|
||||||
|
"endBackground": "#F8C734",
|
||||||
|
"startBackground": "#FAE08D"
|
||||||
|
},
|
||||||
|
"Separator": {
|
||||||
|
"separatorColor": "colorSeparator"
|
||||||
|
},
|
||||||
|
"Settings": {
|
||||||
|
"Spotlight": {
|
||||||
|
"borderColor": "#F6C00064"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"SidePanel": {
|
||||||
|
"background": "#E2E2D4"
|
||||||
|
},
|
||||||
|
"Slider": {
|
||||||
|
"buttonBorderColor": "#95A3A4",
|
||||||
|
"buttonColor": "colorAlternativeBackground",
|
||||||
|
"tickColor": "#869798",
|
||||||
|
"trackColor": "#BEC2B9"
|
||||||
|
},
|
||||||
|
"SpeedSearch": {
|
||||||
|
"borderColor": "#6B8086",
|
||||||
|
"errorForeground": "#F94A26"
|
||||||
|
},
|
||||||
|
"Spinner": {},
|
||||||
|
"SplitPane": {
|
||||||
|
"darkShadow": "#78858B",
|
||||||
|
"highlight": "colorBackground",
|
||||||
|
"shadow": "colorShadow"
|
||||||
|
},
|
||||||
|
"SplitPaneDivider": {
|
||||||
|
"draggingColor": "#1E434E"
|
||||||
|
},
|
||||||
|
"StatusBar": {
|
||||||
|
"borderColor": "colorBorder",
|
||||||
|
"hoverBackground": "colorHoverBackground"
|
||||||
|
},
|
||||||
|
"TabbedPane": {
|
||||||
|
"contentAreaColor": "#B4BAB5",
|
||||||
|
"disabledUnderlineColor": "#A1ABA8",
|
||||||
|
"focus": "colorAcceleratorForeground",
|
||||||
|
"focusColor": "#D6DBD3",
|
||||||
|
"hoverColor": "#D3D2C6",
|
||||||
|
"underlineColor": "#3D7EC0"
|
||||||
|
},
|
||||||
|
"Table": {
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"dropLineColor": "colorAcceleratorForeground",
|
||||||
|
"dropLineShortColor": "#5F63A9",
|
||||||
|
"focusCellBackground": "colorAlternativeBackground",
|
||||||
|
"focusCellForeground": "colorForeground",
|
||||||
|
"gridColor": "#F4EDDA",
|
||||||
|
"lightSelectionBackground": "#E7E6DA",
|
||||||
|
"lightSelectionForeground": "colorForeground",
|
||||||
|
"lightSelectionInactiveBackground": "#F4EDDA",
|
||||||
|
"lightSelectionInactiveForeground": "colorForeground",
|
||||||
|
"sortIconColor": "colorShadow",
|
||||||
|
"stripeColor": "#F3EDDE"
|
||||||
|
},
|
||||||
|
"TableHeader": {
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"bottomSeparatorColor": "#E0DDCD",
|
||||||
|
"focusCellBackground": "colorAlternativeBackground",
|
||||||
|
"separatorColor": "#E0DDCD"
|
||||||
|
},
|
||||||
|
"TextArea": {
|
||||||
|
"background": "colorAlternativeBackground"
|
||||||
|
},
|
||||||
|
"TextComponent": {},
|
||||||
|
"TextField": {
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"darkShadow": "#73888C",
|
||||||
|
"highlight": "colorHighlight"
|
||||||
|
},
|
||||||
|
"TextPane": {},
|
||||||
|
"TitledBorder": {
|
||||||
|
"titleColor": "colorForeground"
|
||||||
|
},
|
||||||
|
"TitlePane": {
|
||||||
|
"Button": {
|
||||||
|
"hoverBackground": "#0001181A"
|
||||||
|
},
|
||||||
|
"inactiveInfoForeground": "#839496",
|
||||||
|
"infoForeground": "#586E75"
|
||||||
|
},
|
||||||
|
"ToggleButton": {
|
||||||
|
"borderColor": "#B7BDB6",
|
||||||
|
"buttonColor": "#BEC2B9",
|
||||||
|
"offBackground": "colorAlternativeBackground",
|
||||||
|
"offForeground": "colorDisabledForeground",
|
||||||
|
"onBackground": "#6FB460",
|
||||||
|
"onForeground": "colorForeground"
|
||||||
|
},
|
||||||
|
"ToolBar": {
|
||||||
|
"darkShadow": "#78858B",
|
||||||
|
"floatingForeground": "colorShadow",
|
||||||
|
"highlight": "colorHighlight",
|
||||||
|
"light": "colorHighlight",
|
||||||
|
"shadow": "colorShadow"
|
||||||
|
},
|
||||||
|
"Toolbar": {
|
||||||
|
"Floating": {
|
||||||
|
"background": "#EBE5D2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ToolTip": {
|
||||||
|
"Actions": {
|
||||||
|
"background": "#E9E2CF",
|
||||||
|
"infoForeground": "#93A1A1"
|
||||||
|
},
|
||||||
|
"background": "#F7F0DD",
|
||||||
|
"borderColor": "#A1ABA8",
|
||||||
|
"infoForeground": "#657B83",
|
||||||
|
"shortcutForeground": "#566C73"
|
||||||
|
},
|
||||||
|
"Tooltip": {
|
||||||
|
"separatorColor": "colorSeparator"
|
||||||
|
},
|
||||||
|
"ToolWindow": {
|
||||||
|
"Button": {
|
||||||
|
"hoverBackground": "#3B576025",
|
||||||
|
"selectedBackground": "#3B576050",
|
||||||
|
"selectedForeground": "#002B36"
|
||||||
|
},
|
||||||
|
"Header": {
|
||||||
|
"background": "#DEDDD1",
|
||||||
|
"borderColor": "colorBorder",
|
||||||
|
"inactiveBackground": "colorBackground"
|
||||||
|
},
|
||||||
|
"HeaderCloseButton": {
|
||||||
|
"background": "#ADB5AF"
|
||||||
|
},
|
||||||
|
"HeaderTab": {
|
||||||
|
"selectedInactiveBackground": "#D3D2C6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Tree": {
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"errorForeground": "#F94A26",
|
||||||
|
"hash": "#E0DDCD",
|
||||||
|
"modifiedItemForeground": "#3961FA"
|
||||||
|
},
|
||||||
|
"UiDesigner": {
|
||||||
|
"Panel": {},
|
||||||
|
"Preview": {}
|
||||||
|
},
|
||||||
|
"ValidationTooltip": {
|
||||||
|
"errorBackground": "#F2DED1",
|
||||||
|
"errorBorderColor": "#DDA195",
|
||||||
|
"warningBackground": "#F2E8D0",
|
||||||
|
"warningBorderColor": "#DDC794"
|
||||||
|
},
|
||||||
|
"VersionControl": {
|
||||||
|
"FileHistory": {
|
||||||
|
"Commit": {
|
||||||
|
"selectedBranchBackground": "#FBF4C7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"GitLog": {
|
||||||
|
"headIconColor": "#EABE00",
|
||||||
|
"localBranchIconColor": "#2DA54A",
|
||||||
|
"otherIconColor": "#627880",
|
||||||
|
"remoteBranchIconColor": "#976EA1",
|
||||||
|
"tagIconColor": "#627880"
|
||||||
|
},
|
||||||
|
"HgLog": {
|
||||||
|
"bookmarkIconColor": "#976EA1",
|
||||||
|
"branchIconColor": "#2DA54A",
|
||||||
|
"closedBranchIconColor": "#7B2A2D",
|
||||||
|
"headIconColor": "#832460",
|
||||||
|
"localTagIconColor": "#008687",
|
||||||
|
"mqTagIconColor": "#002C8B",
|
||||||
|
"tagIconColor": "#627880",
|
||||||
|
"tipIconColor": "#EABE00"
|
||||||
|
},
|
||||||
|
"Log": {
|
||||||
|
"Commit": {
|
||||||
|
"currentBranchBackground": "#E3F2E4",
|
||||||
|
"unmatchedForeground": "#6B8086"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"RefLabel": {
|
||||||
|
"backgroundBase": "#000118",
|
||||||
|
"foreground": "#627880"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Viewport": {},
|
||||||
|
"WelcomeScreen": {
|
||||||
|
"background": "#F7F0DD",
|
||||||
|
"borderColor": "#B4BAB5",
|
||||||
|
"captionBackground": "#CCCDC1",
|
||||||
|
"captionForeground": "colorForeground",
|
||||||
|
"footerBackground": "#CCCDC1",
|
||||||
|
"footerForeground": "colorForeground",
|
||||||
|
"groupIconBorderColor": "#B4BAB5",
|
||||||
|
"headerBackground": "#D9D7CA",
|
||||||
|
"headerForeground": "#36525B",
|
||||||
|
"Projects": {
|
||||||
|
"background": "colorAlternativeBackground",
|
||||||
|
"selectionInactiveBackground": "#D7D5C7"
|
||||||
|
},
|
||||||
|
"separatorColor": "#ECE5D3"
|
||||||
|
},
|
||||||
|
"Window": {
|
||||||
|
"border": "colorBorder"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"icons": {
|
||||||
|
"ColorPalette": {
|
||||||
|
"Actions.Red": "#DC322F",
|
||||||
|
"Actions.Yellow": "#B58900",
|
||||||
|
"Actions.Green": "#859900",
|
||||||
|
"Actions.Blue": "#268BD2",
|
||||||
|
"Actions.Grey": "#586E75",
|
||||||
|
"Actions.GreyInline": "#586E75",
|
||||||
|
"Objects.Grey": "#657B83",
|
||||||
|
"Objects.Blue": "#268BD2",
|
||||||
|
"Objects.Green": "#859900",
|
||||||
|
"Objects.Yellow": "#B58900",
|
||||||
|
"Objects.YellowDark": "#CB4B16",
|
||||||
|
"Objects.Purple": "#6C71C4",
|
||||||
|
"Objects.Pink": "#D33682",
|
||||||
|
"Objects.Red": "#DC322F",
|
||||||
|
"Objects.RedStatus": "#DC322F",
|
||||||
|
"Objects.BlackText": "#002B36FF",
|
||||||
|
"Objects.GreenAndroid": "#859900",
|
||||||
|
"Checkbox.Background.Default": "#FDF6E3",
|
||||||
|
"Checkbox.Border.Default": "#B4BAB5",
|
||||||
|
"Checkbox.Background.Selected": "#4984BE",
|
||||||
|
"Checkbox.Border.Selected": "#4984BE",
|
||||||
|
"Checkbox.Foreground.Selected": "#FDF6E3",
|
||||||
|
"Checkbox.Background.Disabled": "#EEE8D5",
|
||||||
|
"Checkbox.Border.Disabled": "#C6C7BD",
|
||||||
|
"Checkbox.Foreground.Disabled": "#C6C7BD",
|
||||||
|
"Checkbox.Focus.Thin.Default": "#86ABCB",
|
||||||
|
"Checkbox.Focus.Thin.Selected": "#86ABCB",
|
||||||
|
"Checkbox.Focus.Wide": "#86ABCB"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
"name": "Arc Theme - Orange",
|
"name": "Arc Theme - Orange",
|
||||||
"dark": false,
|
"dark": false,
|
||||||
"author": "Pavel Zlámal",
|
"author": "Pavel Zlámal",
|
||||||
|
"editorScheme": "/arc-theme-light.xml",
|
||||||
|
|
||||||
"ui": {
|
"ui": {
|
||||||
|
|
||||||
@@ -15,8 +16,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Borders": {
|
"Borders": {
|
||||||
"color": "#e1e3e6",
|
"color": "#C4C4C4",
|
||||||
"ContrastBorderColor": "#E1E3E6"
|
"ContrastBorderColor": "#C4C4C4"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Button": {
|
"Button": {
|
||||||
@@ -25,6 +26,8 @@
|
|||||||
"endBorderColor": "#C4C4C4",
|
"endBorderColor": "#C4C4C4",
|
||||||
"focusedBorderColor" : "#f57900",
|
"focusedBorderColor" : "#f57900",
|
||||||
"background" : "#F5F5F5",
|
"background" : "#F5F5F5",
|
||||||
|
"startBackground" : "#fcfdfd",
|
||||||
|
"endBackground" : "#fcfdfd",
|
||||||
"default": {
|
"default": {
|
||||||
"foreground": "#FFFFFF",
|
"foreground": "#FFFFFF",
|
||||||
"startBackground": "#f57900",
|
"startBackground": "#f57900",
|
||||||
@@ -36,6 +39,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"ActionButton.hoverBackground" : "#ffffff",
|
||||||
|
"ActionButton.hoverBorderColor" : "#C4C4C4",
|
||||||
|
"ActionButton.pressedBorderColor" : "#C4C4C4",
|
||||||
|
"ActionButton.pressedBackground" : "#ffffff",
|
||||||
|
"StatusBar.hoverBackground" : "#ffffff",
|
||||||
|
"StatusBar.borderColor" : "#C4C4C4",
|
||||||
|
"ToolBar.highlight" : "#ffffff",
|
||||||
"ToolBar.background" : "#F5F5F5",
|
"ToolBar.background" : "#F5F5F5",
|
||||||
"Popup.Toolbar.background" : "#F5F5F5",
|
"Popup.Toolbar.background" : "#F5F5F5",
|
||||||
"Panel.background": "#F5F5F5",
|
"Panel.background": "#F5F5F5",
|
||||||
@@ -92,6 +102,7 @@
|
|||||||
"TabbedPane.underlineColor" : "#f57900",
|
"TabbedPane.underlineColor" : "#f57900",
|
||||||
"TabbedPane.tabSelectionHeight" : 2,
|
"TabbedPane.tabSelectionHeight" : 2,
|
||||||
"TabbedPane.background" : "#F5F5F5",
|
"TabbedPane.background" : "#F5F5F5",
|
||||||
|
"TabbedPane.hoverColor" : "#ffffff",
|
||||||
|
|
||||||
"Link.hoverForeground" : "#f57900",
|
"Link.hoverForeground" : "#f57900",
|
||||||
"Link.activeForeground" : "#f57900",
|
"Link.activeForeground" : "#f57900",
|
||||||
@@ -111,6 +122,18 @@
|
|||||||
"Editor.background" : "#f5f5f5",
|
"Editor.background" : "#f5f5f5",
|
||||||
"EditorPane.background" : "#ffffff",
|
"EditorPane.background" : "#ffffff",
|
||||||
|
|
||||||
|
"Component.borderColor" : "#C4C4C4",
|
||||||
|
"HelpTooltip.borderColor" : "#C4C4C4",
|
||||||
|
"InplaceRefactoringPopup.borderColor" : "#C4C4C4",
|
||||||
|
"NavBar.borderColor" : "#C4C4C4",
|
||||||
|
"ComboPopup.border": "#C4C4C4",
|
||||||
|
"Popup.Header.activeBackground" : "#e7e8eb",
|
||||||
|
"Popup.borderColor" : "#C4C4C4",
|
||||||
|
"Popup.inactiveBorderColor" : "#C4C4C4",
|
||||||
|
"Popup.Advertiser.borderColor" : "#C4C4C4",
|
||||||
|
"Popup.Toolbar.borderColor" : "#C4C4C4",
|
||||||
|
"SpeedSearch.borderColor" : "#C4C4C4",
|
||||||
|
|
||||||
"CheckBox.background" : "#F5F5F5",
|
"CheckBox.background" : "#F5F5F5",
|
||||||
"RadioButton.background" : "#F5F5F5",
|
"RadioButton.background" : "#F5F5F5",
|
||||||
"Slider.background" : "#F5F5F5",
|
"Slider.background" : "#F5F5F5",
|
||||||
@@ -146,17 +169,25 @@
|
|||||||
|
|
||||||
"ToolWindow.Header.background" : "#e7e8eb",
|
"ToolWindow.Header.background" : "#e7e8eb",
|
||||||
"ToolWindow.HeaderTab.selectedBackground" : "#dddee1",
|
"ToolWindow.HeaderTab.selectedBackground" : "#dddee1",
|
||||||
"ToolWindow.HeaderTab.hoverInactiveBackground" : "#dddee1",
|
|
||||||
"ToolWindow.HeaderTab.selectedInactiveBackground" : "#dddee1",
|
"ToolWindow.HeaderTab.selectedInactiveBackground" : "#dddee1",
|
||||||
"ToolWindow.Button.selectedBackground" : "#dddee1",
|
"ToolWindow.Button.selectedBackground" : "#dddee1",
|
||||||
|
"ToolWindow.Button.hoverBackground" : "#ffffff",
|
||||||
"ToolWindow.HeaderTab.underlineHeight" : 2,
|
"ToolWindow.HeaderTab.underlineHeight" : 2,
|
||||||
"ToolWindow.HeaderTab.underlineColor" : "#f57900",
|
"ToolWindow.HeaderTab.underlineColor" : "#f57900",
|
||||||
|
"ToolWindow.HeaderTab.underlinedTabBackground" : "#F5F5F500",
|
||||||
|
"ToolWindow.HeaderTab.hoverBackground" : "#F5F5F5",
|
||||||
|
"ToolWindow.HeaderTab.hoverInactiveBackground" : "#F5F5F5",
|
||||||
"DefaultTabs.underlineHeight" : 2,
|
"DefaultTabs.underlineHeight" : 2,
|
||||||
"DefaultTabs.underlineColor" : "#f57900",
|
"DefaultTabs.underlineColor" : "#f57900",
|
||||||
|
"DefaultTabs.underlinedTabBackground" : "#ffffff",
|
||||||
"DefaultTabs.background" : "#F5F5F5",
|
"DefaultTabs.background" : "#F5F5F5",
|
||||||
|
"DefaultTabs.borderColor" : "#C4C4C4",
|
||||||
|
"DefaultTabs.hoverBackground" : "#ffffff90",
|
||||||
"EditorTabs.underlineHeight" : 2,
|
"EditorTabs.underlineHeight" : 2,
|
||||||
"EditorTabs.underlineColor" : "#f57900",
|
"EditorTabs.underlineColor" : "#f57900",
|
||||||
"EditorTabs.background" : "#F5F5F5",
|
"EditorTabs.background" : "#F5F5F5",
|
||||||
|
"EditorTabs.borderColor": "#C4C4C4",
|
||||||
|
"EditorTabs.hoverBackground" : "#ffffff",
|
||||||
|
|
||||||
"Notification.background" : "#F5F5F5",
|
"Notification.background" : "#F5F5F5",
|
||||||
"Notification.MoreButton.background" : "#dddee1",
|
"Notification.MoreButton.background" : "#dddee1",
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
"name": "Arc Theme",
|
"name": "Arc Theme",
|
||||||
"dark": false,
|
"dark": false,
|
||||||
"author": "Pavel Zlámal",
|
"author": "Pavel Zlámal",
|
||||||
|
"editorScheme": "/arc-theme-light.xml",
|
||||||
|
|
||||||
"ui": {
|
"ui": {
|
||||||
|
|
||||||
@@ -15,8 +16,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Borders": {
|
"Borders": {
|
||||||
"color": "#e1e3e6",
|
"color": "#C4C4C4",
|
||||||
"ContrastBorderColor": "#E1E3E6"
|
"ContrastBorderColor": "#C4C4C4"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Button": {
|
"Button": {
|
||||||
@@ -25,6 +26,8 @@
|
|||||||
"endBorderColor": "#C4C4C4",
|
"endBorderColor": "#C4C4C4",
|
||||||
"focusedBorderColor" : "#2679db",
|
"focusedBorderColor" : "#2679db",
|
||||||
"background" : "#F5F5F5",
|
"background" : "#F5F5F5",
|
||||||
|
"startBackground" : "#fcfdfd",
|
||||||
|
"endBackground" : "#fcfdfd",
|
||||||
"default": {
|
"default": {
|
||||||
"foreground": "#FFFFFF",
|
"foreground": "#FFFFFF",
|
||||||
"startBackground": "#2679db",
|
"startBackground": "#2679db",
|
||||||
@@ -36,6 +39,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"ActionButton.hoverBackground" : "#ffffff",
|
||||||
|
"ActionButton.hoverBorderColor" : "#C4C4C4",
|
||||||
|
"ActionButton.pressedBorderColor" : "#C4C4C4",
|
||||||
|
"ActionButton.pressedBackground" : "#ffffff",
|
||||||
|
"StatusBar.hoverBackground" : "#ffffff",
|
||||||
|
"StatusBar.borderColor" : "#C4C4C4",
|
||||||
|
"ToolBar.highlight" : "#ffffff",
|
||||||
"ToolBar.background" : "#F5F5F5",
|
"ToolBar.background" : "#F5F5F5",
|
||||||
"Popup.Toolbar.background" : "#F5F5F5",
|
"Popup.Toolbar.background" : "#F5F5F5",
|
||||||
"Panel.background": "#F5F5F5",
|
"Panel.background": "#F5F5F5",
|
||||||
@@ -92,6 +102,7 @@
|
|||||||
"TabbedPane.underlineColor" : "#2679db",
|
"TabbedPane.underlineColor" : "#2679db",
|
||||||
"TabbedPane.tabSelectionHeight" : 2,
|
"TabbedPane.tabSelectionHeight" : 2,
|
||||||
"TabbedPane.background" : "#F5F5F5",
|
"TabbedPane.background" : "#F5F5F5",
|
||||||
|
"TabbedPane.hoverColor" : "#ffffff",
|
||||||
|
|
||||||
"Link.hoverForeground" : "#2679db",
|
"Link.hoverForeground" : "#2679db",
|
||||||
"Link.activeForeground" : "#2679db",
|
"Link.activeForeground" : "#2679db",
|
||||||
@@ -111,6 +122,18 @@
|
|||||||
"Editor.background" : "#f5f5f5",
|
"Editor.background" : "#f5f5f5",
|
||||||
"EditorPane.background" : "#ffffff",
|
"EditorPane.background" : "#ffffff",
|
||||||
|
|
||||||
|
"Component.borderColor" : "#C4C4C4",
|
||||||
|
"HelpTooltip.borderColor" : "#C4C4C4",
|
||||||
|
"InplaceRefactoringPopup.borderColor" : "#C4C4C4",
|
||||||
|
"NavBar.borderColor" : "#C4C4C4",
|
||||||
|
"ComboPopup.border": "#C4C4C4",
|
||||||
|
"Popup.Header.activeBackground" : "#e7e8eb",
|
||||||
|
"Popup.borderColor" : "#C4C4C4",
|
||||||
|
"Popup.inactiveBorderColor" : "#C4C4C4",
|
||||||
|
"Popup.Advertiser.borderColor" : "#C4C4C4",
|
||||||
|
"Popup.Toolbar.borderColor" : "#C4C4C4",
|
||||||
|
"SpeedSearch.borderColor" : "#C4C4C4",
|
||||||
|
|
||||||
"CheckBox.background" : "#F5F5F5",
|
"CheckBox.background" : "#F5F5F5",
|
||||||
"RadioButton.background" : "#F5F5F5",
|
"RadioButton.background" : "#F5F5F5",
|
||||||
"Slider.background" : "#F5F5F5",
|
"Slider.background" : "#F5F5F5",
|
||||||
@@ -145,18 +168,26 @@
|
|||||||
"ToolTip.Actions.background" : "#F5F5F5",
|
"ToolTip.Actions.background" : "#F5F5F5",
|
||||||
|
|
||||||
"ToolWindow.Header.background" : "#e7e8eb",
|
"ToolWindow.Header.background" : "#e7e8eb",
|
||||||
"ToolWindow.HeaderTab.selectedBackground" : "#dddee1",
|
"ToolWindow.HeaderTab.selectedBackground" : "#fcfdfd",
|
||||||
"ToolWindow.HeaderTab.hoverInactiveBackground" : "#dddee1",
|
|
||||||
"ToolWindow.HeaderTab.selectedInactiveBackground" : "#dddee1",
|
"ToolWindow.HeaderTab.selectedInactiveBackground" : "#dddee1",
|
||||||
"ToolWindow.Button.selectedBackground" : "#dddee1",
|
"ToolWindow.Button.selectedBackground" : "#dddee1",
|
||||||
|
"ToolWindow.Button.hoverBackground" : "#ffffff",
|
||||||
"ToolWindow.HeaderTab.underlineHeight" : 2,
|
"ToolWindow.HeaderTab.underlineHeight" : 2,
|
||||||
"ToolWindow.HeaderTab.underlineColor" : "#2679db",
|
"ToolWindow.HeaderTab.underlineColor" : "#2679db",
|
||||||
|
"ToolWindow.HeaderTab.underlinedTabBackground" : "#F5F5F500",
|
||||||
|
"ToolWindow.HeaderTab.hoverBackground" : "#F5F5F5",
|
||||||
|
"ToolWindow.HeaderTab.hoverInactiveBackground" : "#F5F5F5",
|
||||||
"DefaultTabs.underlineHeight" : 2,
|
"DefaultTabs.underlineHeight" : 2,
|
||||||
"DefaultTabs.underlineColor" : "#2679db",
|
"DefaultTabs.underlineColor" : "#2679db",
|
||||||
|
"DefaultTabs.underlinedTabBackground" : "#ffffff",
|
||||||
"DefaultTabs.background" : "#F5F5F5",
|
"DefaultTabs.background" : "#F5F5F5",
|
||||||
|
"DefaultTabs.borderColor" : "#C4C4C4",
|
||||||
|
"DefaultTabs.hoverBackground" : "#ffffff90",
|
||||||
"EditorTabs.underlineHeight" : 2,
|
"EditorTabs.underlineHeight" : 2,
|
||||||
"EditorTabs.underlineColor" : "#2679db",
|
"EditorTabs.underlineColor" : "#2679db",
|
||||||
"EditorTabs.background" : "#F5F5F5",
|
"EditorTabs.background" : "#F5F5F5",
|
||||||
|
"EditorTabs.borderColor": "#C4C4C4",
|
||||||
|
"EditorTabs.hoverBackground" : "#ffffff",
|
||||||
|
|
||||||
"Notification.background" : "#F5F5F5",
|
"Notification.background" : "#F5F5F5",
|
||||||
"Notification.MoreButton.background" : "#dddee1",
|
"Notification.MoreButton.background" : "#dddee1",
|
||||||
|
|||||||
@@ -0,0 +1,275 @@
|
|||||||
|
{
|
||||||
|
"name": "Arc Theme Dark",
|
||||||
|
"dark": true,
|
||||||
|
"author": "Pavel Zlámal",
|
||||||
|
"editorScheme": "/arc-theme-dark.xml",
|
||||||
|
|
||||||
|
"ui": {
|
||||||
|
|
||||||
|
"*": {
|
||||||
|
"selectionBackground": "#2679db",
|
||||||
|
"selectionForeground": "#ffffff",
|
||||||
|
"selectionInactiveBackground": "#1e61b0",
|
||||||
|
"selectionBackgroundInactive": "#1e61b0",
|
||||||
|
"background" : "#383c4a",
|
||||||
|
"focusColor" : "#2679db",
|
||||||
|
"windowText" : "#d3dae3",
|
||||||
|
"darcula.foreground" : "#d3dae3"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Borders": {
|
||||||
|
"color": "#2b2e39",
|
||||||
|
"ContrastBorderColor": "#2b2e39"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Button": {
|
||||||
|
"shadowColor": "#383c4a20",
|
||||||
|
"startBorderColor": "#2b2e39",
|
||||||
|
"endBorderColor": "#2b2e39",
|
||||||
|
"focusedBorderColor" : "#2679db",
|
||||||
|
"background" : "#383c4a",
|
||||||
|
"startBackground" : "#474c5b",
|
||||||
|
"endBackground" : "#474c5b",
|
||||||
|
"default": {
|
||||||
|
"foreground": "#d3dae3",
|
||||||
|
"startBackground": "#2679db",
|
||||||
|
"endBackground": "#2679db",
|
||||||
|
"startBorderColor": "#2679db",
|
||||||
|
"endBorderColor": "#2679db",
|
||||||
|
"shadowColor": "#383c4a50",
|
||||||
|
"focusedBorderColor": "#2679db"
|
||||||
|
},
|
||||||
|
"disabledBorderColor" : "#2b2e39",
|
||||||
|
"disabledText" : "#9ba2ab"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ToolBar.background" : "#474c5b",
|
||||||
|
"ToolBar.highlight" : "#4e5467",
|
||||||
|
"Popup.Toolbar.borderColor" : "#2b2e39",
|
||||||
|
"ActionButton.hoverBorderColor" : "#2b2e39",
|
||||||
|
"ActionButton.hoverBackground" : "#4e5467",
|
||||||
|
"ActionButton.pressedBackground" : "#4e5467",
|
||||||
|
"ActionButton.pressedBorderColor" : "#2b2e39",
|
||||||
|
"StatusBar.hoverBackground" : "#4e5467",
|
||||||
|
"StatusBar.borderColor" : "#2b2e39",
|
||||||
|
"Popup.Toolbar.background" : "#474c5b",
|
||||||
|
"Panel.background": "#383c4a",
|
||||||
|
"Panel.foreground" : "#d3dae3",
|
||||||
|
"Window.border" : "1,1,1,1,#2b2e39",
|
||||||
|
"WelcomeScreen.background" : "#383c4a",
|
||||||
|
"WelcomeScreen.Projects.background" : "#474c5b",
|
||||||
|
|
||||||
|
"MenuBar.foreground" : "#d3dae3",
|
||||||
|
"MenuBar.borderColor" : "#2b2e39",
|
||||||
|
"Menu.background" : "#383c4a",
|
||||||
|
"Menu.separatorColor" : "#2b2e39",
|
||||||
|
"Menu.foreground" : "#d3dae3",
|
||||||
|
"Menu.borderColor" : "#2b2e39",
|
||||||
|
"MenuItem.foreground" : "#d3dae3",
|
||||||
|
"MenuItem.background" : "#383c4a",
|
||||||
|
"MenuItem.acceleratorForeground" : "#d3dae3",
|
||||||
|
"MenuItem.disabledForeground" : "#9ba2ab",
|
||||||
|
"PopupMenuSeparator.height" : "2",
|
||||||
|
"Separator.separatorColor" : "#9ba2ab",
|
||||||
|
"Group.separatorColor" : "#9ba2ab",
|
||||||
|
|
||||||
|
"Tree.background" : "#474c5b",
|
||||||
|
"Tree.foreground" : "#d3dae3",
|
||||||
|
|
||||||
|
"ProgressBar.background" : "#2679db",
|
||||||
|
"ProgressBar.foreground" : "#2679db",
|
||||||
|
"ProgressBar.progressColor" : "#2679db",
|
||||||
|
"ProgressBar.indeterminateStartColor" : "#2679db",
|
||||||
|
"ProgressBar.indeterminateEndColor" : "#2679db",
|
||||||
|
|
||||||
|
"Component.focusedBorderColor" : "#2679db",
|
||||||
|
"Component.focusColor" : "#2679db",
|
||||||
|
"Component.focusWidth" : "1",
|
||||||
|
"Component.arc" : "4",
|
||||||
|
"Button.arc" : "4",
|
||||||
|
|
||||||
|
"SidePanel.background" : "#383C4ACC",
|
||||||
|
|
||||||
|
"ParameterInfo.background" : "#fffae3",
|
||||||
|
"ParameterInfo.currentOverloadBackground" : "#fffae3",
|
||||||
|
|
||||||
|
"List.background" : "#474c5b",
|
||||||
|
"List.dropLineColor" : "#2679db",
|
||||||
|
"List.selectionBackground": "#2679db",
|
||||||
|
"List.selectionForeground": "#ffffff",
|
||||||
|
"List.selectionInactiveBackground": "#1e61b0",
|
||||||
|
|
||||||
|
"Table.background" : "#474c5b",
|
||||||
|
"Table.selectionBackground" : "#2679db",
|
||||||
|
"Table.selectionForeground" : "#ffffff",
|
||||||
|
"Table.lightSelectionBackground" : "#2679db",
|
||||||
|
"Table.lightSelectionForeground" : "#ffffff",
|
||||||
|
"Table.focusCellBackground" : "#2679db",
|
||||||
|
"Table.focusCellForeground" : "#ffffff",
|
||||||
|
"Table.dropLineColor": "#2679db",
|
||||||
|
"Table.dropLineShortColor": "#2679db",
|
||||||
|
"Table.gridColor" : "#383c4a",
|
||||||
|
|
||||||
|
"TabbedPane.underlineColor" : "#2679db",
|
||||||
|
"TabbedPane.tabSelectionHeight" : 2,
|
||||||
|
"TabbedPane.background" : "#383c4a",
|
||||||
|
"TabbedPane.hoverColor" : "#474c5b",
|
||||||
|
|
||||||
|
"Link.hoverForeground" : "#2679db",
|
||||||
|
"Link.activeForeground" : "#2679db",
|
||||||
|
"Link.pressedForeground" : "#2679db",
|
||||||
|
"Link.visitedForeground" : "#2679db",
|
||||||
|
"Link.secondaryForeground" : "#2679db",
|
||||||
|
"Hyperlink.linkColor" : "#2679db",
|
||||||
|
|
||||||
|
"ComboBox.background" : "#474c5b",
|
||||||
|
"ComboBox.nonEditableBackground" : "#474c5b",
|
||||||
|
"ComboBox.ArrowButton.background" : "#474c5b",
|
||||||
|
"ComboBox.ArrowButton.nonEditableBackground" : "#474c5b",
|
||||||
|
"ComboBoxButton.background" : "#474c5b",
|
||||||
|
|
||||||
|
"TextField.background" : "#474c5b",
|
||||||
|
"TextArea.background" : "#474c5b",
|
||||||
|
"TextPane.background" : "#474c5b",
|
||||||
|
"PasswordField.background" : "#474c5b",
|
||||||
|
"FormattedTextField.background" : "#474c5b",
|
||||||
|
"Editor.background" : "#474c5b",
|
||||||
|
"EditorPane.background" : "#474c5b",
|
||||||
|
|
||||||
|
"Component.borderColor" : "#2b2e39",
|
||||||
|
"HelpTooltip.borderColor" : "#2b2e39",
|
||||||
|
"InplaceRefactoringPopup.borderColor" : "#2b2e39",
|
||||||
|
"NavBar.borderColor" : "#2b2e39",
|
||||||
|
"ComboPopup.border": "#2b2e39",
|
||||||
|
"Popup.Header.activeBackground" : "#383c4a",
|
||||||
|
"Popup.Header.inactiveBackground" : "#383c4a",
|
||||||
|
"Popup.borderColor" : "#2b2e39",
|
||||||
|
"Popup.inactiveBorderColor" : "#2b2e39",
|
||||||
|
"Popup.Advertiser.borderColor" : "#2b2e39",
|
||||||
|
"SpeedSearch.borderColor" : "#2b2e39",
|
||||||
|
|
||||||
|
"CheckBox.background" : "#383c4a",
|
||||||
|
"RadioButton.background" : "#383c4a",
|
||||||
|
"Slider.background" : "#383c4a",
|
||||||
|
"Spinner.background" : "#383c4a",
|
||||||
|
"OptionPane.background" : "#383c4a",
|
||||||
|
|
||||||
|
"CompletionPopup": {
|
||||||
|
"selectionBackground" : "#2679db55",
|
||||||
|
"nonFocusedMask": false,
|
||||||
|
"matchForeground": "#2679db",
|
||||||
|
"selectionInactiveBackground": "#1e61b0"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Plugins.lightSelectionBackground" : "#4e5467",
|
||||||
|
"Plugins.SearchField.background" : "#4e5467",
|
||||||
|
"Plugins.background" : "#383c4a",
|
||||||
|
"Plugins.Button.installBackground" : "#2679db",
|
||||||
|
"Plugins.Button.installForeground" : "#ffffff",
|
||||||
|
"Plugins.Button.installBorderColor" : "#2679db",
|
||||||
|
"Plugins.Button.installFillBackground" : "#2679db",
|
||||||
|
"Plugins.Button.installFillForeground" : "#ffffff",
|
||||||
|
"Plugins.Button.updateBackground" : "#2679db",
|
||||||
|
"Plugins.Button.updateForeground" : "#ffffff",
|
||||||
|
"Plugins.Button.updateBorderColor" : "#2679db",
|
||||||
|
"Plugins.SearchField.borderColor" : "#2b2e39",
|
||||||
|
"Plugins.tagBackground" : "#4e5467",
|
||||||
|
"Plugins.eapTagBackground" : "#4e5467",
|
||||||
|
"Counter.background" : "#ffffff",
|
||||||
|
"Counter.foreground" : "#5c616c",
|
||||||
|
|
||||||
|
"SearchEverywhere.SearchField.background" : "#4e5467",
|
||||||
|
"SearchEverywhere.Header.background" : "#383c4a",
|
||||||
|
"SearchEverywhere.Tab.selectedBackground" : "#4e5467",
|
||||||
|
"SearchEverywhere.Advertiser.foreground" : "#d3dae3",
|
||||||
|
"SearchEverywhere.List.separatorColor" : "#d3dae3",
|
||||||
|
"SearchEverywhere.List.separatorForeground" : "#d3dae3",
|
||||||
|
"SearchEverywhere.SearchField.borderColor" : "#2b2e39",
|
||||||
|
|
||||||
|
"ToolTip.background" : "#4e5467",
|
||||||
|
"ToolTip.Actions.background" : "#383c4a",
|
||||||
|
"ToolTip.borderColor" : "#2b2e39",
|
||||||
|
"ToolTip.foreground" : "#d3dae3",
|
||||||
|
"Tooltip.separatorColor" : "#2b2e39",
|
||||||
|
|
||||||
|
"ToolWindow.Header.background" : "#383C4ACC",
|
||||||
|
"ToolWindow.Header.inactiveBackground" : "#383c4a",
|
||||||
|
"ToolWindow.HeaderTab.selectedBackground" : "#4e5467",
|
||||||
|
"ToolWindow.HeaderTab.hoverInactiveBackground" : "#4e5467",
|
||||||
|
"ToolWindow.HeaderTab.selectedInactiveBackground" : "#4e5467",
|
||||||
|
"ToolWindow.HeaderTab.underlineHeight" : 2,
|
||||||
|
"ToolWindow.HeaderTab.underlinedTabBackground" : "#383c4a",
|
||||||
|
"ToolWindow.HeaderTab.underlineColor" : "#2679db",
|
||||||
|
"ToolWindow.Button.selectedBackground" : "#474c5b",
|
||||||
|
"ToolWindow.Button.hoverBackground" : "#4e5467",
|
||||||
|
"DefaultTabs.underlineHeight" : 2,
|
||||||
|
"DefaultTabs.underlineColor" : "#2679db",
|
||||||
|
"DefaultTabs.background" : "#383c4a",
|
||||||
|
"DefaultTabs.underlinedTabForeground" : "#d3dae3",
|
||||||
|
"DefaultTabs.underlinedTabBackground" : "#474c5b",
|
||||||
|
"DefaultTabs.hoverBackground" : "#4e5467",
|
||||||
|
"EditorTabs.underlinedTabBackground" : "#474c5b99",
|
||||||
|
"EditorTabs.underlineHeight" : 2,
|
||||||
|
"EditorTabs.underlineColor" : "#2679db",
|
||||||
|
"EditorTabs.background" : "#383c4a",
|
||||||
|
"EditorTabs.underlinedTabForeground" : "#d3dae3",
|
||||||
|
"EditorTabs.hoverBackground" : "#4e5467",
|
||||||
|
|
||||||
|
"Notification.background" : "#4e5467",
|
||||||
|
"Notification.MoreButton.background" : "#383c4a",
|
||||||
|
"Notification.borderColor" : "#2b2e39",
|
||||||
|
"ScrollBar.background" : "#4e5467",
|
||||||
|
|
||||||
|
"Label.foreground" : "#d3dae3",
|
||||||
|
"Label.disabledForeground" : "#9ba2ab",
|
||||||
|
"Label.disabledText" : "#9ba2ab",
|
||||||
|
|
||||||
|
"MemoryIndicator.allocatedBackground" : "#474c5b",
|
||||||
|
"MemoryIndicator.usedBackground" : "#4e5467",
|
||||||
|
|
||||||
|
"FileColor.Blue" : "#111d53",
|
||||||
|
"FileColor.Green" : "#155221",
|
||||||
|
"FileColor.Orange" : "#522911",
|
||||||
|
"FileColor.Rose" : "#581226",
|
||||||
|
"FileColor.Violet" : "#411357",
|
||||||
|
"FileColor.Yellow" : "#5c4814",
|
||||||
|
|
||||||
|
"Component.infoForeground" : "#9ba2ab",
|
||||||
|
"SearchEverywhere.SearchField.infoForeground" : "#9ba2ab",
|
||||||
|
|
||||||
|
"ColorChooser.background" : "#383c4a",
|
||||||
|
"Popup.innerBorderColor" : "#383c4a",
|
||||||
|
"InformationHint.borderColor" : "#383c4a"
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
"icons": {
|
||||||
|
|
||||||
|
"ColorPalette": {
|
||||||
|
|
||||||
|
"Checkbox.Focus.Wide.Dark": "#2679db",
|
||||||
|
"Checkbox.Focus.Thin.Selected.Dark": "#2679db",
|
||||||
|
"Checkbox.Focus.Thin.Default.Dark": "#2679db",
|
||||||
|
"Checkbox.Background.Default.Dark": "#474c5b",
|
||||||
|
"Checkbox.Background.Disabled.Dark": "#383c4a",
|
||||||
|
"Checkbox.Background.Selected.Dark": "#474c5b",
|
||||||
|
"Checkbox.Foreground.Selected.Dark": "#ffffff",
|
||||||
|
"Checkbox.Border.Default.Dark": "#2b2e39",
|
||||||
|
"Checkbox.Border.Disabled.Dark": "#2b2e39",
|
||||||
|
"Checkbox.Border.Selected.Dark": "#2b2e39",
|
||||||
|
|
||||||
|
"#43494A": "#383c4a",
|
||||||
|
"#6B6B6B": "#8b9eb5",
|
||||||
|
"#A7A7A7": "#8b9eb5",
|
||||||
|
"#3D6185": "#42A5F5",
|
||||||
|
"#466D94": "#42A5F5",
|
||||||
|
"#3C3F41": "#4e5467",
|
||||||
|
"#545556": "#D3DAE3",
|
||||||
|
"#606060": "#D3DAE3",
|
||||||
|
"#9AA7B0": "#8b9eb5"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,273 @@
|
|||||||
|
{
|
||||||
|
"name": "Arc Theme Dark - Orange",
|
||||||
|
"dark": true,
|
||||||
|
"author": "Pavel Zlámal",
|
||||||
|
"editorScheme": "/arc-theme-dark.xml",
|
||||||
|
|
||||||
|
"ui": {
|
||||||
|
|
||||||
|
"*": {
|
||||||
|
"selectionBackground": "#f57900",
|
||||||
|
"selectionForeground": "#ffffff",
|
||||||
|
"selectionInactiveBackground": "#C36200",
|
||||||
|
"selectionBackgroundInactive": "#C36200",
|
||||||
|
"background" : "#383c4a",
|
||||||
|
"focusColor" : "#f57900",
|
||||||
|
"windowText" : "#d3dae3",
|
||||||
|
"darcula.foreground" : "#d3dae3"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Borders": {
|
||||||
|
"color": "#2b2e39",
|
||||||
|
"ContrastBorderColor": "#2b2e39"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Button": {
|
||||||
|
"shadowColor": "#383c4a20",
|
||||||
|
"startBorderColor": "#2b2e39",
|
||||||
|
"endBorderColor": "#2b2e39",
|
||||||
|
"focusedBorderColor" : "#f57900",
|
||||||
|
"background" : "#383c4a",
|
||||||
|
"startBackground" : "#474c5b",
|
||||||
|
"endBackground" : "#474c5b",
|
||||||
|
"default": {
|
||||||
|
"foreground": "#d3dae3",
|
||||||
|
"startBackground": "#f57900",
|
||||||
|
"endBackground": "#f57900",
|
||||||
|
"startBorderColor": "#f57900",
|
||||||
|
"endBorderColor": "#f57900",
|
||||||
|
"shadowColor": "#383c4a50",
|
||||||
|
"focusedBorderColor": "#f57900"
|
||||||
|
},
|
||||||
|
"disabledBorderColor" : "#2b2e39",
|
||||||
|
"disabledText" : "#9ba2ab"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ToolBar.background" : "#474c5b",
|
||||||
|
"ToolBar.highlight" : "#4e5467",
|
||||||
|
"Popup.Toolbar.borderColor" : "#2b2e39",
|
||||||
|
"ActionButton.hoverBorderColor" : "#2b2e39",
|
||||||
|
"ActionButton.hoverBackground" : "#4e5467",
|
||||||
|
"ActionButton.pressedBackground" : "#4e5467",
|
||||||
|
"ActionButton.pressedBorderColor" : "#2b2e39",
|
||||||
|
"StatusBar.hoverBackground" : "#4e5467",
|
||||||
|
"StatusBar.borderColor" : "#2b2e39",
|
||||||
|
"Popup.Toolbar.background" : "#474c5b",
|
||||||
|
"Panel.background": "#383c4a",
|
||||||
|
"Panel.foreground" : "#d3dae3",
|
||||||
|
"Window.border" : "1,1,1,1,#2b2e39",
|
||||||
|
"WelcomeScreen.background" : "#383c4a",
|
||||||
|
"WelcomeScreen.Projects.background" : "#474c5b",
|
||||||
|
|
||||||
|
"MenuBar.foreground" : "#d3dae3",
|
||||||
|
"MenuBar.borderColor" : "#2b2e39",
|
||||||
|
"Menu.background" : "#383c4a",
|
||||||
|
"Menu.separatorColor" : "#2b2e39",
|
||||||
|
"Menu.foreground" : "#d3dae3",
|
||||||
|
"Menu.borderColor" : "#2b2e39",
|
||||||
|
"MenuItem.foreground" : "#d3dae3",
|
||||||
|
"MenuItem.background" : "#383c4a",
|
||||||
|
"MenuItem.acceleratorForeground" : "#d3dae3",
|
||||||
|
"MenuItem.disabledForeground" : "#9ba2ab",
|
||||||
|
"PopupMenuSeparator.height" : "2",
|
||||||
|
"Separator.separatorColor" : "#9ba2ab",
|
||||||
|
"Group.separatorColor" : "#9ba2ab",
|
||||||
|
|
||||||
|
"Tree.background" : "#474c5b",
|
||||||
|
"Tree.foreground" : "#d3dae3",
|
||||||
|
|
||||||
|
"ProgressBar.background" : "#f57900",
|
||||||
|
"ProgressBar.foreground" : "#f57900",
|
||||||
|
"ProgressBar.progressColor" : "#f57900",
|
||||||
|
"ProgressBar.indeterminateStartColor" : "#f57900",
|
||||||
|
"ProgressBar.indeterminateEndColor" : "#f57900",
|
||||||
|
|
||||||
|
"Component.focusedBorderColor" : "#f57900",
|
||||||
|
"Component.focusColor" : "#f57900",
|
||||||
|
"Component.focusWidth" : "1",
|
||||||
|
"Component.arc" : "4",
|
||||||
|
"Button.arc" : "4",
|
||||||
|
|
||||||
|
"SidePanel.background" : "#383C4ACC",
|
||||||
|
|
||||||
|
"ParameterInfo.background" : "#fffae3",
|
||||||
|
"ParameterInfo.currentOverloadBackground" : "#fffae3",
|
||||||
|
|
||||||
|
"List.background" : "#474c5b",
|
||||||
|
"List.dropLineColor" : "#f57900",
|
||||||
|
"List.selectionBackground": "#f57900",
|
||||||
|
"List.selectionForeground": "#ffffff",
|
||||||
|
"List.selectionInactiveBackground": "#C36200",
|
||||||
|
|
||||||
|
"Table.background" : "#474c5b",
|
||||||
|
"Table.selectionBackground" : "#f57900",
|
||||||
|
"Table.selectionForeground" : "#ffffff",
|
||||||
|
"Table.lightSelectionBackground" : "#f57900",
|
||||||
|
"Table.lightSelectionForeground" : "#ffffff",
|
||||||
|
"Table.focusCellBackground" : "#f57900",
|
||||||
|
"Table.focusCellForeground" : "#ffffff",
|
||||||
|
"Table.dropLineColor": "#f57900",
|
||||||
|
"Table.dropLineShortColor": "#f57900",
|
||||||
|
|
||||||
|
"TabbedPane.underlineColor" : "#f57900",
|
||||||
|
"TabbedPane.tabSelectionHeight" : 2,
|
||||||
|
"TabbedPane.background" : "#383c4a",
|
||||||
|
"TabbedPane.hoverColor" : "#474c5b",
|
||||||
|
|
||||||
|
"Link.hoverForeground" : "#f57900",
|
||||||
|
"Link.activeForeground" : "#f57900",
|
||||||
|
"Link.pressedForeground" : "#f57900",
|
||||||
|
"Link.visitedForeground" : "#f57900",
|
||||||
|
"Link.secondaryForeground" : "#f57900",
|
||||||
|
"Hyperlink.linkColor" : "#f57900",
|
||||||
|
|
||||||
|
"ComboBox.background" : "#474c5b",
|
||||||
|
"ComboBox.nonEditableBackground" : "#474c5b",
|
||||||
|
"ComboBox.ArrowButton.background" : "#474c5b",
|
||||||
|
"ComboBox.ArrowButton.nonEditableBackground" : "#474c5b",
|
||||||
|
"ComboBoxButton.background" : "#474c5b",
|
||||||
|
|
||||||
|
"TextField.background" : "#474c5b",
|
||||||
|
"TextArea.background" : "#474c5b",
|
||||||
|
"TextPane.background" : "#474c5b",
|
||||||
|
"PasswordField.background" : "#474c5b",
|
||||||
|
"FormattedTextField.background" : "#474c5b",
|
||||||
|
"Editor.background" : "#474c5b",
|
||||||
|
"EditorPane.background" : "#474c5b",
|
||||||
|
|
||||||
|
"Component.borderColor" : "#2b2e39",
|
||||||
|
"HelpTooltip.borderColor" : "#2b2e39",
|
||||||
|
"InplaceRefactoringPopup.borderColor" : "#2b2e39",
|
||||||
|
"NavBar.borderColor" : "#2b2e39",
|
||||||
|
"ComboPopup.border": "#2b2e39",
|
||||||
|
"Popup.Header.activeBackground" : "#383c4a",
|
||||||
|
"Popup.Header.inactiveBackground" : "#383c4a",
|
||||||
|
"Popup.borderColor" : "#2b2e39",
|
||||||
|
"Popup.inactiveBorderColor" : "#383c4a",
|
||||||
|
"Popup.Advertiser.borderColor" : "#383c4a",
|
||||||
|
"SpeedSearch.borderColor" : "#2b2e39",
|
||||||
|
|
||||||
|
"CheckBox.background" : "#383c4a",
|
||||||
|
"RadioButton.background" : "#383c4a",
|
||||||
|
"Slider.background" : "#383c4a",
|
||||||
|
"Spinner.background" : "#383c4a",
|
||||||
|
"OptionPane.background" : "#383c4a",
|
||||||
|
|
||||||
|
"CompletionPopup": {
|
||||||
|
"selectionBackground" : "#f5790055",
|
||||||
|
"nonFocusedMask": false,
|
||||||
|
"matchForeground": "#f57900",
|
||||||
|
"selectionInactiveBackground": "#C36200"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Plugins.lightSelectionBackground" : "#4e5467",
|
||||||
|
"Plugins.SearchField.background" : "#4e5467",
|
||||||
|
"Plugins.background" : "#383c4a",
|
||||||
|
"Plugins.Button.installBackground" : "#f57900",
|
||||||
|
"Plugins.Button.installForeground" : "#ffffff",
|
||||||
|
"Plugins.Button.installBorderColor" : "#f57900",
|
||||||
|
"Plugins.Button.installFillBackground" : "#f57900",
|
||||||
|
"Plugins.Button.installFillForeground" : "#ffffff",
|
||||||
|
"Plugins.Button.updateBackground" : "#f57900",
|
||||||
|
"Plugins.Button.updateForeground" : "#ffffff",
|
||||||
|
"Plugins.Button.updateBorderColor" : "#f57900",
|
||||||
|
"Plugins.SearchField.borderColor" : "#2b2e39",
|
||||||
|
"Plugins.tagBackground" : "#4e5467",
|
||||||
|
"Plugins.eapTagBackground" : "#4e5467",
|
||||||
|
"Counter.background" : "#ffffff",
|
||||||
|
"Counter.foreground" : "#5c616c",
|
||||||
|
|
||||||
|
"SearchEverywhere.SearchField.background" : "#4e5467",
|
||||||
|
"SearchEverywhere.Header.background" : "#383c4a",
|
||||||
|
"SearchEverywhere.Tab.selectedBackground" : "#4e5467",
|
||||||
|
"SearchEverywhere.Advertiser.foreground" : "#d3dae3",
|
||||||
|
"SearchEverywhere.List.separatorColor" : "#d3dae3",
|
||||||
|
"SearchEverywhere.List.separatorForeground" : "#d3dae3",
|
||||||
|
"SearchEverywhere.SearchField.borderColor" : "#2b2e39",
|
||||||
|
|
||||||
|
"ToolTip.background" : "#4e5467",
|
||||||
|
"ToolTip.Actions.background" : "#383c4a",
|
||||||
|
"ToolTip.borderColor" : "#2b2e39",
|
||||||
|
"ToolTip.foreground" : "#d3dae3",
|
||||||
|
"Tooltip.separatorColor" : "#2b2e39",
|
||||||
|
|
||||||
|
"ToolWindow.Header.background" : "#383C4ACC",
|
||||||
|
"ToolWindow.Header.inactiveBackground" : "#383c4a",
|
||||||
|
"ToolWindow.HeaderTab.selectedBackground" : "#4e5467",
|
||||||
|
"ToolWindow.HeaderTab.hoverInactiveBackground" : "#4e5467",
|
||||||
|
"ToolWindow.HeaderTab.selectedInactiveBackground" : "#4e5467",
|
||||||
|
"ToolWindow.HeaderTab.underlineHeight" : 2,
|
||||||
|
"ToolWindow.HeaderTab.underlinedTabBackground" : "#383c4a",
|
||||||
|
"ToolWindow.HeaderTab.underlineColor" : "#f57900",
|
||||||
|
"ToolWindow.Button.selectedBackground" : "#474c5b",
|
||||||
|
"ToolWindow.Button.hoverBackground" : "#4e5467",
|
||||||
|
"DefaultTabs.underlineHeight" : 2,
|
||||||
|
"DefaultTabs.underlineColor" : "#f57900",
|
||||||
|
"DefaultTabs.background" : "#383c4a",
|
||||||
|
"DefaultTabs.underlinedTabForeground" : "#d3dae3",
|
||||||
|
"DefaultTabs.underlinedTabBackground" : "#474c5b",
|
||||||
|
"DefaultTabs.hoverBackground" : "#4e5467",
|
||||||
|
"EditorTabs.underlinedTabBackground" : "#474c5b99",
|
||||||
|
"EditorTabs.underlineHeight" : 2,
|
||||||
|
"EditorTabs.underlineColor" : "#f57900",
|
||||||
|
"EditorTabs.background" : "#383c4a",
|
||||||
|
"EditorTabs.underlinedTabForeground" : "#d3dae3",
|
||||||
|
"EditorTabs.hoverBackground" : "#4e5467",
|
||||||
|
|
||||||
|
"Notification.background" : "#4e5467",
|
||||||
|
"Notification.MoreButton.background" : "#383c4a",
|
||||||
|
"Notification.borderColor" : "#2b2e39",
|
||||||
|
"ScrollBar.background" : "#4e5467",
|
||||||
|
|
||||||
|
"Label.foreground" : "#d3dae3",
|
||||||
|
"Label.disabledForeground" : "#9ba2ab",
|
||||||
|
"Label.disabledText" : "#9ba2ab",
|
||||||
|
|
||||||
|
"MemoryIndicator.allocatedBackground" : "#474c5b",
|
||||||
|
"MemoryIndicator.usedBackground" : "#4e5467",
|
||||||
|
|
||||||
|
"FileColor.Blue" : "#111d53",
|
||||||
|
"FileColor.Green" : "#155221",
|
||||||
|
"FileColor.Orange" : "#522911",
|
||||||
|
"FileColor.Rose" : "#581226",
|
||||||
|
"FileColor.Violet" : "#411357",
|
||||||
|
"FileColor.Yellow" : "#5c4814",
|
||||||
|
|
||||||
|
"Component.infoForeground" : "#9ba2ab",
|
||||||
|
"SearchEverywhere.SearchField.infoForeground" : "#9ba2ab",
|
||||||
|
|
||||||
|
"ColorChooser.background" : "#383c4a",
|
||||||
|
"Popup.innerBorderColor" : "#383c4a",
|
||||||
|
"InformationHint.borderColor" : "#383c4a"
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
"icons": {
|
||||||
|
|
||||||
|
"ColorPalette": {
|
||||||
|
|
||||||
|
"Checkbox.Focus.Wide.Dark": "#f57900",
|
||||||
|
"Checkbox.Focus.Thin.Selected.Dark": "#f57900",
|
||||||
|
"Checkbox.Focus.Thin.Default.Dark": "#f57900",
|
||||||
|
"Checkbox.Background.Default.Dark": "#474c5b",
|
||||||
|
"Checkbox.Background.Disabled.Dark": "#383c4a",
|
||||||
|
"Checkbox.Background.Selected.Dark": "#474c5b",
|
||||||
|
"Checkbox.Foreground.Selected.Dark": "#ffffff",
|
||||||
|
"Checkbox.Border.Default.Dark": "#2b2e39",
|
||||||
|
"Checkbox.Border.Disabled.Dark": "#2b2e39",
|
||||||
|
"Checkbox.Border.Selected.Dark": "#2b2e39",
|
||||||
|
|
||||||
|
"#43494A": "#383c4a",
|
||||||
|
"#6B6B6B": "#8b9eb5",
|
||||||
|
"#A7A7A7": "#8b9eb5",
|
||||||
|
"#3D6185": "#f57900",
|
||||||
|
"#466D94": "#f57900",
|
||||||
|
"#3C3F41": "#4e5467",
|
||||||
|
"#545556": "#D3DAE3",
|
||||||
|
"#606060": "#D3DAE3",
|
||||||
|
"#9AA7B0": "#8b9eb5"
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "One Dark",
|
"name": "One Dark",
|
||||||
"dark": true,
|
"dark": true,
|
||||||
"author": "Mark Skelton",
|
"author": "Mark Skelton",
|
||||||
"editorScheme": "/themes/one_dark.xml",
|
"editorScheme": "/themes/one_dark.xml",
|
||||||
|
"colors": {
|
||||||
|
"accentColor": "#568AF2"
|
||||||
|
},
|
||||||
"ui": {
|
"ui": {
|
||||||
"*": {
|
"*": {
|
||||||
"background": "#21252b",
|
"background": "#21252b",
|
||||||
@@ -27,7 +29,7 @@
|
|||||||
"borderColor": "#333841",
|
"borderColor": "#333841",
|
||||||
"disabledBorderColor": "#2d3137",
|
"disabledBorderColor": "#2d3137",
|
||||||
"focusColor": "#21252b",
|
"focusColor": "#21252b",
|
||||||
"focusedBorderColor": "#568AF2",
|
"focusedBorderColor": "accentColor",
|
||||||
|
|
||||||
"separatorColor": "#32363c"
|
"separatorColor": "#32363c"
|
||||||
},
|
},
|
||||||
@@ -50,10 +52,10 @@
|
|||||||
|
|
||||||
"default": {
|
"default": {
|
||||||
"foreground": "#ffffff",
|
"foreground": "#ffffff",
|
||||||
"startBackground": "#568AF2",
|
"startBackground": "accentColor",
|
||||||
"endBackground": "#568AF2",
|
"endBackground": "accentColor",
|
||||||
"startBorderColor": "#568AF2",
|
"startBorderColor": "accentColor",
|
||||||
"endBorderColor": "#568AF2",
|
"endBorderColor": "accentColor",
|
||||||
"focusedBorderColor": "#4269b9",
|
"focusedBorderColor": "#4269b9",
|
||||||
"focusColor": "#4269b9"
|
"focusColor": "#4269b9"
|
||||||
}
|
}
|
||||||
@@ -78,7 +80,7 @@
|
|||||||
"ComboPopup.border": "1,1,1,1,2d3137",
|
"ComboPopup.border": "1,1,1,1,2d3137",
|
||||||
|
|
||||||
"CompletionPopup": {
|
"CompletionPopup": {
|
||||||
"matchForeground": "#568AF2"
|
"matchForeground": "accentColor"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Component": {
|
"Component": {
|
||||||
@@ -94,7 +96,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"DefaultTabs": {
|
"DefaultTabs": {
|
||||||
"underlineColor": "#568AF2",
|
"underlineColor": "accentColor",
|
||||||
"inactiveUnderlineColor": "#4269b9",
|
"inactiveUnderlineColor": "#4269b9",
|
||||||
"hoverBackground": "#323844"
|
"hoverBackground": "#323844"
|
||||||
},
|
},
|
||||||
@@ -108,7 +110,7 @@
|
|||||||
"Editor": {
|
"Editor": {
|
||||||
"background": "#282c34",
|
"background": "#282c34",
|
||||||
"foreground": "#abb2bf",
|
"foreground": "#abb2bf",
|
||||||
"shortcutForeground": "#568AF2"
|
"shortcutForeground": "accentColor"
|
||||||
},
|
},
|
||||||
|
|
||||||
"EditorPane.inactiveBackground": "#282c34",
|
"EditorPane.inactiveBackground": "#282c34",
|
||||||
@@ -179,13 +181,13 @@
|
|||||||
"tagForeground": "#abb2bf",
|
"tagForeground": "#abb2bf",
|
||||||
|
|
||||||
"Button": {
|
"Button": {
|
||||||
"installForeground": "#568AF2",
|
"installForeground": "accentColor",
|
||||||
"installBorderColor":"#568AF2",
|
"installBorderColor":"accentColor",
|
||||||
"installFillForeground": "#ffffff",
|
"installFillForeground": "#ffffff",
|
||||||
"installFillBackground": "#568AF2",
|
"installFillBackground": "accentColor",
|
||||||
"updateForeground":"#ffffff",
|
"updateForeground":"#ffffff",
|
||||||
"updateBackground": "#568AF2",
|
"updateBackground": "accentColor",
|
||||||
"updateBorderColor": "#568AF2"
|
"updateBorderColor": "accentColor"
|
||||||
},
|
},
|
||||||
|
|
||||||
"SearchField": {
|
"SearchField": {
|
||||||
@@ -215,8 +217,8 @@
|
|||||||
|
|
||||||
"ProgressBar": {
|
"ProgressBar": {
|
||||||
"trackColor": "#1D1D26",
|
"trackColor": "#1D1D26",
|
||||||
"progressColor": "#568AF2",
|
"progressColor": "accentColor",
|
||||||
"indeterminateStartColor": "#568AF2",
|
"indeterminateStartColor": "accentColor",
|
||||||
"indeterminateEndColor": "#313469",
|
"indeterminateEndColor": "#313469",
|
||||||
"failedColor": "#bd3c5f",
|
"failedColor": "#bd3c5f",
|
||||||
"failedEndColor": "#472c33",
|
"failedEndColor": "#472c33",
|
||||||
@@ -240,8 +242,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"SearchMatch": {
|
"SearchMatch": {
|
||||||
"startBackground": "#568AF2",
|
"startBackground": "accentColor",
|
||||||
"endBackground": "#568AF2"
|
"endBackground": "accentColor"
|
||||||
},
|
},
|
||||||
|
|
||||||
"SpeedSearch": {
|
"SpeedSearch": {
|
||||||
@@ -251,8 +253,10 @@
|
|||||||
"errorForeground": "#e06c75"
|
"errorForeground": "#e06c75"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"Settings.Spotlight.borderColor": "accentColor",
|
||||||
|
|
||||||
"TabbedPane": {
|
"TabbedPane": {
|
||||||
"underlineColor": "#568AF2",
|
"underlineColor": "accentColor",
|
||||||
"contentAreaColor": "#323844",
|
"contentAreaColor": "#323844",
|
||||||
"hoverColor": "#323844"
|
"hoverColor": "#323844"
|
||||||
},
|
},
|
||||||
@@ -285,7 +289,7 @@
|
|||||||
|
|
||||||
"ToggleButton": {
|
"ToggleButton": {
|
||||||
"onForeground": "#ffffff",
|
"onForeground": "#ffffff",
|
||||||
"onBackground": "#568AF2",
|
"onBackground": "accentColor",
|
||||||
"offForeground": "#9f9fa6",
|
"offForeground": "#9f9fa6",
|
||||||
"offBackground": "#3d424b",
|
"offBackground": "#3d424b",
|
||||||
"borderColor": "#3d424b",
|
"borderColor": "#3d424b",
|
||||||
@@ -318,7 +322,7 @@
|
|||||||
|
|
||||||
"Tree": {
|
"Tree": {
|
||||||
"selectionBackground": "#4d78cc",
|
"selectionBackground": "#4d78cc",
|
||||||
"modifiedItemForeground": "#568AF2",
|
"modifiedItemForeground": "accentColor",
|
||||||
"rowHeight": 20
|
"rowHeight": 20
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -353,9 +357,9 @@
|
|||||||
"Checkbox.Background.Default.Dark": "#282c34",
|
"Checkbox.Background.Default.Dark": "#282c34",
|
||||||
"Checkbox.Border.Default.Dark": "#414855",
|
"Checkbox.Border.Default.Dark": "#414855",
|
||||||
"Checkbox.Foreground.Selected.Dark": "#abb2bf",
|
"Checkbox.Foreground.Selected.Dark": "#abb2bf",
|
||||||
"Checkbox.Focus.Wide.Dark": "#568AF2",
|
"Checkbox.Focus.Wide.Dark": "accentColor",
|
||||||
"Checkbox.Focus.Thin.Default.Dark": "#568AF2",
|
"Checkbox.Focus.Thin.Default.Dark": "accentColor",
|
||||||
"Checkbox.Focus.Thin.Selected.Dark": "#568AF2",
|
"Checkbox.Focus.Thin.Selected.Dark": "accentColor",
|
||||||
"Checkbox.Background.Disabled.Dark": "#21252b",
|
"Checkbox.Background.Disabled.Dark": "#21252b",
|
||||||
"Checkbox.Border.Disabled.Dark": "#2c313a",
|
"Checkbox.Border.Disabled.Dark": "#2c313a",
|
||||||
"Checkbox.Foreground.Disabled.Dark": "#5c6370"
|
"Checkbox.Foreground.Disabled.Dark": "#5c6370"
|
||||||
|
|||||||
@@ -1,433 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Solarized Dark",
|
|
||||||
"dark": true,
|
|
||||||
"author": "Tyler Thrailkill",
|
|
||||||
"editorScheme": "/themes/solarizedDark.xml",
|
|
||||||
"colors": {
|
|
||||||
"background": "#002b36",
|
|
||||||
"backgroundEmpty": "#00212c",
|
|
||||||
"backgroundHighlights": "#073642",
|
|
||||||
"backgroundHighlightsShading": "#073642ab",
|
|
||||||
"primaryText": "#839496",
|
|
||||||
"inverseBackground": "#fdf6e3",
|
|
||||||
"inverseBackgroundHighlights": "#eee8d5",
|
|
||||||
"inversePrimaryText": "#657b83",
|
|
||||||
"inverseSecondaryText": "#93a1a1",
|
|
||||||
"inverseEmphasizedContent": "#586e75",
|
|
||||||
"secondaryText": "#586e75",
|
|
||||||
"backgroundHighlightsShade1": "#074855",
|
|
||||||
"backgroundHighlightsShade2": "#0A677A",
|
|
||||||
"backgroundHighlightsShade2Shading": "#0A677Ac3",
|
|
||||||
"emphasizedContent": "#93a1a1",
|
|
||||||
"yellow": "#074855",
|
|
||||||
"green": "#213d37",
|
|
||||||
"blue": "#2aa198",
|
|
||||||
"violet": "#6c71c4",
|
|
||||||
"orange": "#cb4b16",
|
|
||||||
"rose": "#dc322f",
|
|
||||||
"maskColor": "#0d0d0d"
|
|
||||||
},
|
|
||||||
"ui": {
|
|
||||||
"*": {
|
|
||||||
"background": "backgroundHighlights",
|
|
||||||
"foreground": "primaryText",
|
|
||||||
|
|
||||||
"infoForeground": "secondaryText",
|
|
||||||
|
|
||||||
"selectionBackground": "inverseEmphasizedContent",
|
|
||||||
"selectionForeground": "inverseBackground",
|
|
||||||
"selectionInactiveBackground": "backgroundHighlightsShade1",
|
|
||||||
"selectionBackgroundInactive": "backgroundHighlightsShade1",
|
|
||||||
|
|
||||||
"lightSelectionBackground": "backgroundHighlightsShade1",
|
|
||||||
"lightSelectionForeground": "primaryText",
|
|
||||||
"lightSelectionInactiveBackground": "backgroundHighlights",
|
|
||||||
"lightSelectionInactiveForeground":"primaryText",
|
|
||||||
|
|
||||||
"disabledBackground": "background",
|
|
||||||
"inactiveBackground": "background",
|
|
||||||
|
|
||||||
"disabledForeground": "secondaryText",
|
|
||||||
"disabledText": "secondaryText",
|
|
||||||
"inactiveForeground": "secondaryText",
|
|
||||||
|
|
||||||
"acceleratorForeground": "primaryText",
|
|
||||||
"acceleratorSelectionForeground": "primaryText",
|
|
||||||
|
|
||||||
"errorForeground": "#dd3962",
|
|
||||||
|
|
||||||
"borderColor": "emphasizedContent",
|
|
||||||
"disabledBorderColor": "secondaryText",
|
|
||||||
|
|
||||||
"focusColor": "#778282",
|
|
||||||
"focusedBorderColor": "emphasizedContent",
|
|
||||||
|
|
||||||
"separatorForeground": "secondaryText",
|
|
||||||
"separatorColor": "backgroundHighlightsShade1",
|
|
||||||
"lineSeparatorColor": "#55506b",
|
|
||||||
|
|
||||||
"modifiedItemForeground": "#b279f2"
|
|
||||||
},
|
|
||||||
|
|
||||||
"//": "affects buttons like the 'Play' or 'Debug' buttons",
|
|
||||||
"ActionButton": {
|
|
||||||
"hoverBackground": "backgroundHighlightsShade1",
|
|
||||||
"hoverBorderColor": "backgroundHighlightsShade1",
|
|
||||||
"pressedBackground": "backgroundHighlightsShade1",
|
|
||||||
"pressedBorderColor": "backgroundHighlightsShade1"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Button": {
|
|
||||||
"startBackground": "backgroundHighlightsShade1",
|
|
||||||
"endBackground": "backgroundHighlightsShade1",
|
|
||||||
"startBorderColor": "backgroundHighlights",
|
|
||||||
"endBorderColor": "backgroundHighlights",
|
|
||||||
"shadowColor": "background",
|
|
||||||
|
|
||||||
"default": {
|
|
||||||
"foreground": "inverseBackground",
|
|
||||||
"startBackground": "backgroundHighlightsShade2",
|
|
||||||
"endBackground": "backgroundHighlightsShade2",
|
|
||||||
"startBorderColor": "backgroundHighlightsShade2Shading",
|
|
||||||
"endBorderColor": "backgroundHighlightsShade2Shading",
|
|
||||||
"focusedBorderColor": "primaryText",
|
|
||||||
"focusColor": "#778282",
|
|
||||||
"shadowColor": "background"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"Borders": {
|
|
||||||
"color": "backgroundHighlights",
|
|
||||||
"ContrastBorderColor": "background"
|
|
||||||
},
|
|
||||||
|
|
||||||
"CheckBox": {
|
|
||||||
"background": "background"
|
|
||||||
},
|
|
||||||
|
|
||||||
"COMMENT:": "you can put comments in like this",
|
|
||||||
"ComboBox": {
|
|
||||||
"nonEditableBackground": "backgroundHighlightsShade1",
|
|
||||||
"background": "backgroundHighlightsShading",
|
|
||||||
"ArrowButton": {
|
|
||||||
"iconColor": "emphasizedContent",
|
|
||||||
"disabledIconColor": "primaryText",
|
|
||||||
"nonEditableBackground": "backgroundHighlightsShade1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"ComboPopup.border": "1,1,1,1,64647A",
|
|
||||||
|
|
||||||
"CompletionPopup": {
|
|
||||||
"matchForeground": "#ED94FF",
|
|
||||||
"matchSelectionForeground": "#ED94FF"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Component": {
|
|
||||||
"errorFocusColor": "#993750",
|
|
||||||
"inactiveErrorFocusColor": "#522530",
|
|
||||||
"warningFocusColor": "#8c812b",
|
|
||||||
"inactiveWarningFocusColor": "#47441f",
|
|
||||||
"iconColor": "#77728fCC",
|
|
||||||
"hoverIconColor": "#8b85a6"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Counter": {
|
|
||||||
"background": "#FFFFFF80",
|
|
||||||
"foreground": "#000000"
|
|
||||||
},
|
|
||||||
|
|
||||||
"DebuggerPopup.borderColor": "#524e66",
|
|
||||||
|
|
||||||
"DefaultTabs": {
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"borderColor": "backgroundHighlightsShade1",
|
|
||||||
"hoverBackground": "backgroundHighlightsShade2",
|
|
||||||
"inactiveUnderlineColor": "backgroundHighlightsShade2",
|
|
||||||
"underlineColor": "backgroundHighlightsShade2",
|
|
||||||
"underlinedTabBackground": "backgroundHighlights",
|
|
||||||
"underlinedTabForeground": "primaryText",
|
|
||||||
"underlineHeight": 5
|
|
||||||
},
|
|
||||||
|
|
||||||
"DragAndDrop": {
|
|
||||||
"areaForeground": "primaryText",
|
|
||||||
"areaBackground": "#702F91",
|
|
||||||
"areaBorderColor": "#343142"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Editor": {
|
|
||||||
"background": "background",
|
|
||||||
"foreground": "emphasizedContent",
|
|
||||||
"shortcutForeground": "#2aa198"
|
|
||||||
},
|
|
||||||
|
|
||||||
"EditorPane.inactiveBackground": "background",
|
|
||||||
|
|
||||||
"EditorTabs": {
|
|
||||||
"borderColor": "background",
|
|
||||||
"underlineColor": "backgroundHighlights",
|
|
||||||
"inactiveUnderlineColor": "background",
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"underlinedTabBackground": "background",
|
|
||||||
"hoverMaskColor": "backgroundHighlightsShade2",
|
|
||||||
"underlinedTabForeground": "primaryText",
|
|
||||||
"inactiveColoredFileBackground": "backgroundHighlightsShade1",
|
|
||||||
"underlineHeight": 0
|
|
||||||
},
|
|
||||||
|
|
||||||
"FileColor": {
|
|
||||||
"Yellow": "yellow",
|
|
||||||
"Green": "green",
|
|
||||||
"Blue": "blue",
|
|
||||||
"Violet": "violet",
|
|
||||||
"Orange": "orange",
|
|
||||||
"Rose": "rose"
|
|
||||||
},
|
|
||||||
|
|
||||||
"InplaceRefactoringPopup.borderColor": "#474359",
|
|
||||||
|
|
||||||
"Link": {
|
|
||||||
"activeForeground": "#7094ff",
|
|
||||||
"hoverForeground": "#7094FF",
|
|
||||||
"pressedForeground": "#7094FF",
|
|
||||||
"visitedForeground": "#7094FF"
|
|
||||||
},
|
|
||||||
|
|
||||||
"NavBar.borderColor": "#1a1721",
|
|
||||||
|
|
||||||
"Notification": {
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"borderColor": "backgroundHighlights",
|
|
||||||
|
|
||||||
"errorForeground": "primaryText",
|
|
||||||
"errorBackground": "#4d232e",
|
|
||||||
"errorBorderColor": "#802e44",
|
|
||||||
|
|
||||||
"MoreButton.innerBorderColor": "#1a1721",
|
|
||||||
|
|
||||||
"ToolWindow": {
|
|
||||||
"informativeForeground": "primaryText",
|
|
||||||
"informativeBackground": "#2e4280",
|
|
||||||
"informativeBorderColor": "#17254d",
|
|
||||||
|
|
||||||
"warningForeground": "primaryText",
|
|
||||||
"warningBackground": "backgroundHighlights",
|
|
||||||
"warningBorderColor": "#403013",
|
|
||||||
|
|
||||||
"errorForeground": "primaryText",
|
|
||||||
"errorBackground": "#802d43",
|
|
||||||
"errorBorderColor": "#4d1c2b"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"Panel": {
|
|
||||||
"background": "background"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ParameterInfo": {
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"foreground": "primaryText",
|
|
||||||
"infoForeground": "ababb3",
|
|
||||||
"currentOverloadBackground": "backgroundHighlights",
|
|
||||||
"currentParameterForeground": "primaryText"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Plugins": {
|
|
||||||
"SearchField.borderColor": "emphasizedContent",
|
|
||||||
"SearchField.background": "background",
|
|
||||||
"SectionHeader.background": "backgroundHighlights",
|
|
||||||
"tagBackground": "backgroundHighlightsShade1",
|
|
||||||
"tagForeground": "primaryText",
|
|
||||||
|
|
||||||
"Button": {
|
|
||||||
"installForeground": "primaryText",
|
|
||||||
"installBorderColor":"backgroundHighlightsShade1",
|
|
||||||
"installFillForeground": "primaryText",
|
|
||||||
"installFillBackground": "#713a91",
|
|
||||||
"updateForeground":"primaryText",
|
|
||||||
"updateBackground": "backgroundHighlightsShade1",
|
|
||||||
"updateBorderColor": "secondaryText"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"Popup": {
|
|
||||||
"paintBorder": true,
|
|
||||||
"borderColor": "backgroundHighlightsShade1",
|
|
||||||
"inactiveBorderColor": "backgroundHighlights",
|
|
||||||
"Toolbar.borderColor": "#1a1721",
|
|
||||||
"Header.activeBackground": "backgroundHighlightsShade1",
|
|
||||||
"Header.inactiveBackground": "backgroundHighlightsShade1",
|
|
||||||
"Advertiser": {
|
|
||||||
"foreground": "secondaryText",
|
|
||||||
"borderColor": "backgroundHighlightsShade1",
|
|
||||||
"borderInsets": "4,8,3,0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"PopupMenu": {
|
|
||||||
"borderWidth": 1,
|
|
||||||
"borderInsets": "4,1,4,1"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ProgressBar": {
|
|
||||||
"trackColor": "#1D1D26",
|
|
||||||
"progressColor": "#268bd2",
|
|
||||||
"indeterminateStartColor": "#268bd2",
|
|
||||||
"indeterminateEndColor": "#2aa198",
|
|
||||||
"failedColor": "#bd3c5f",
|
|
||||||
"failedEndColor": "#472c33",
|
|
||||||
"passedColor": "#239E62",
|
|
||||||
"passedEndColor": "#2b4242"
|
|
||||||
},
|
|
||||||
|
|
||||||
"SearchEverywhere": {
|
|
||||||
"Header.background": "backgroundHighlights",
|
|
||||||
"Tab": {
|
|
||||||
"selectedForeground": "primaryText",
|
|
||||||
"selectedBackground": "backgroundHighlightsShade1"
|
|
||||||
},
|
|
||||||
"SearchField":{
|
|
||||||
"background": "background",
|
|
||||||
"borderColor": "#1a1721"
|
|
||||||
},
|
|
||||||
"Advertiser.foreground": "#8785a6"
|
|
||||||
},
|
|
||||||
|
|
||||||
"SearchMatch": {
|
|
||||||
"startBackground": "#cca929",
|
|
||||||
"endBackground": "#cca929"
|
|
||||||
},
|
|
||||||
|
|
||||||
"SpeedSearch": {
|
|
||||||
"foreground": "primaryText",
|
|
||||||
"borderColor": "backgroundHighlights",
|
|
||||||
"background": "background",
|
|
||||||
"errorForeground": "#ff80a1"
|
|
||||||
},
|
|
||||||
|
|
||||||
"StatusBar.borderColor": "background",
|
|
||||||
|
|
||||||
"TabbedPane": {
|
|
||||||
"underlineColor": "backgroundHighlightsShade2",
|
|
||||||
"disabledUnderlineColor": "backgroundHighlightsShade2",
|
|
||||||
"contentAreaColor": "backgroundHighlights",
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"foreground": "primaryText",
|
|
||||||
"disabledForeground": "primaryText",
|
|
||||||
"focusColor": "backgroundHighlights",
|
|
||||||
"hoverColor": "backgroundHighlightsShade2"
|
|
||||||
},
|
|
||||||
|
|
||||||
"TableHeader.cellBorder": "3,0,3,0",
|
|
||||||
|
|
||||||
"Table.stripeColor": "backgroundHighlightsShade1",
|
|
||||||
|
|
||||||
"TextArea": {
|
|
||||||
"background": "backgroundHighlights",
|
|
||||||
"selectionBackground": "backgroundHighlightsShade2"
|
|
||||||
},
|
|
||||||
|
|
||||||
"TextField": {
|
|
||||||
"background": "backgroundHighlights",
|
|
||||||
"selectionBackground": "backgroundHighlightsShade2"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ToggleButton": {
|
|
||||||
"onForeground": "primaryText",
|
|
||||||
"onBackground": "#543073",
|
|
||||||
"offForeground": "#9f9fa6",
|
|
||||||
"offBackground": "background",
|
|
||||||
"buttonColor": "#666380",
|
|
||||||
"borderColor": "#666380"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ToolTip": {
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"Actions.background": "#323245"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ToolWindow": {
|
|
||||||
"Header": {
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"inactiveBackground": "backgroundHighlights",
|
|
||||||
"borderColor": "backgroundHighlights"
|
|
||||||
},
|
|
||||||
|
|
||||||
"HeaderTab": {
|
|
||||||
"selectedBackground": "#0a0a0a66",
|
|
||||||
"selectedInactiveBackground": "#0a0a0a4D",
|
|
||||||
"hoverBackground": "#0a0a0a66",
|
|
||||||
"hoverInactiveBackground": "#0a0a0a66"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Button": {
|
|
||||||
"hoverBackground": "backgroundHighlightsShade1",
|
|
||||||
"selectedBackground": "backgroundHighlightsShade1",
|
|
||||||
"selectedForeground": "primaryText"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"Tree": {
|
|
||||||
"rowHeight": 20,
|
|
||||||
"background": "backgroundEmpty"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ValidationTooltip": {
|
|
||||||
"errorBackground": "#802d43",
|
|
||||||
"errorBorderColor": "#4d1c2b",
|
|
||||||
"warningBackground": "#735822",
|
|
||||||
"warningBorderColor": "#403013"
|
|
||||||
},
|
|
||||||
|
|
||||||
"VersionControl": {
|
|
||||||
"Log.Commit": {
|
|
||||||
"currentBranchBackground": "green",
|
|
||||||
"unmatchedForeground": "#6d6a80"
|
|
||||||
},
|
|
||||||
"FileHistory.Commit.selectedBranchBackground": "#202340"
|
|
||||||
},
|
|
||||||
|
|
||||||
"WelcomeScreen": {
|
|
||||||
"comments": "#713a91",
|
|
||||||
"separatorColor": "backgroundHighlights",
|
|
||||||
"Projects": {
|
|
||||||
"background": "backgroundHighlights",
|
|
||||||
"selectionBackground": "backgroundHighlightsShade1",
|
|
||||||
"selectionInactiveBackground": "backgroundHighlightsShade1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"icons": {
|
|
||||||
"ColorPalette": {
|
|
||||||
"Actions.Grey": "#a4a1b3",
|
|
||||||
"Actions.Red": "#cb4b16",
|
|
||||||
"Actions.Yellow": "#b58900",
|
|
||||||
"Actions.Green": "#5c65b8",
|
|
||||||
"Actions.Blue": "#268bd2",
|
|
||||||
"Actions.GreyInline.Dark": "#9f99bfb3",
|
|
||||||
|
|
||||||
"Objects.Grey": "#9790ad",
|
|
||||||
"Objects.RedStatus": "#dd3962",
|
|
||||||
"Objects.Red": "#c63a5d",
|
|
||||||
"Objects.Pink": "#f98b9e",
|
|
||||||
"Objects.Yellow": "#caba2d",
|
|
||||||
"Objects.Green": "#239e62",
|
|
||||||
"Objects.Blue": "#598bff",
|
|
||||||
"Objects.Purple": "#af71e0",
|
|
||||||
"Objects.BlackText": "#000000ff",
|
|
||||||
"Objects.YellowDark": "#988c26",
|
|
||||||
"Objects.GreenAndroid": "#78c257",
|
|
||||||
|
|
||||||
"Checkbox.Background.Default.Dark": "backgroundHighlightsShade1",
|
|
||||||
"Checkbox.Border.Default.Dark": "secondaryText",
|
|
||||||
"Checkbox.Foreground.Selected.Dark": "#a4a1b3",
|
|
||||||
"Checkbox.Focus.Wide.Dark": "emphasizedContent",
|
|
||||||
"Checkbox.Focus.Thin.Default.Dark": "primaryText",
|
|
||||||
"Checkbox.Focus.Thin.Selected.Dark": "primaryText",
|
|
||||||
"Checkbox.Background.Disabled.Dark": "backgroundHighlights",
|
|
||||||
"Checkbox.Border.Disabled.Dark": "backgroundHighlightsShade1",
|
|
||||||
"Checkbox.Foreground.Disabled.Dark": "secondaryText"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
Copyright 2019 Tyler B. Thrailkill
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
@@ -1,433 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Solarized Light",
|
|
||||||
"dark": false,
|
|
||||||
"author": "Tyler Thrailkill",
|
|
||||||
"editorScheme": "/themes/solarizedLight.xml",
|
|
||||||
"colors": {
|
|
||||||
"background": "#fdf6e3",
|
|
||||||
"backgroundEmpty": "#eee8d4",
|
|
||||||
"backgroundHighlights": "#eee8d5",
|
|
||||||
"backgroundHighlightsShading": "#073642ab",
|
|
||||||
"primaryText": "#657b83",
|
|
||||||
"inverseBackground": "#002b36",
|
|
||||||
"inverseBackgroundHighlights": "#073642",
|
|
||||||
"inversePrimaryText": "#839496",
|
|
||||||
"inverseSecondaryText": "#586e75",
|
|
||||||
"inverseEmphasizedContent": "#93a1a1",
|
|
||||||
"secondaryText": "#93a1a1",
|
|
||||||
"backgroundHighlightsShade1": "#cdc8b7",
|
|
||||||
"backgroundHighlightsShade2": "#A4A092",
|
|
||||||
"backgroundHighlightsShade2Shading": "#0A677Ac3",
|
|
||||||
"emphasizedContent": "#586e75",
|
|
||||||
"yellow": "#b5890066",
|
|
||||||
"green": "#baebda",
|
|
||||||
"blue": "#2aa198",
|
|
||||||
"violet": "#6c71c4",
|
|
||||||
"orange": "#cb4b16",
|
|
||||||
"rose": "#dc322f",
|
|
||||||
"maskColor": "#b58900"
|
|
||||||
},
|
|
||||||
"ui": {
|
|
||||||
"*": {
|
|
||||||
"background": "backgroundHighlights",
|
|
||||||
"foreground": "primaryText",
|
|
||||||
|
|
||||||
"infoForeground": "secondaryText",
|
|
||||||
|
|
||||||
"selectionBackground": "inverseEmphasizedContent",
|
|
||||||
"selectionForeground": "inverseBackground",
|
|
||||||
"selectionInactiveBackground": "backgroundHighlightsShade1",
|
|
||||||
"selectionBackgroundInactive": "backgroundHighlightsShade1",
|
|
||||||
|
|
||||||
"lightSelectionBackground": "backgroundHighlightsShade1",
|
|
||||||
"lightSelectionForeground": "primaryText",
|
|
||||||
"lightSelectionInactiveBackground": "backgroundHighlights",
|
|
||||||
"lightSelectionInactiveForeground":"primaryText",
|
|
||||||
|
|
||||||
"disabledBackground": "background",
|
|
||||||
"inactiveBackground": "background",
|
|
||||||
|
|
||||||
"disabledForeground": "secondaryText",
|
|
||||||
"disabledText": "secondaryText",
|
|
||||||
"inactiveForeground": "secondaryText",
|
|
||||||
|
|
||||||
"acceleratorForeground": "primaryText",
|
|
||||||
"acceleratorSelectionForeground": "primaryText",
|
|
||||||
|
|
||||||
"errorForeground": "#dd3962",
|
|
||||||
|
|
||||||
"borderColor": "emphasizedContent",
|
|
||||||
"disabledBorderColor": "secondaryText",
|
|
||||||
|
|
||||||
"focusColor": "#778282",
|
|
||||||
"focusedBorderColor": "emphasizedContent",
|
|
||||||
|
|
||||||
"separatorForeground": "secondaryText",
|
|
||||||
"separatorColor": "backgroundHighlightsShade1",
|
|
||||||
"lineSeparatorColor": "#55506b",
|
|
||||||
|
|
||||||
"modifiedItemForeground": "#b279f2"
|
|
||||||
},
|
|
||||||
|
|
||||||
"//": "affects buttons like the 'Play' or 'Debug' buttons",
|
|
||||||
"ActionButton": {
|
|
||||||
"hoverBackground": "backgroundHighlightsShade1",
|
|
||||||
"hoverBorderColor": "backgroundHighlightsShade1",
|
|
||||||
"pressedBackground": "backgroundHighlightsShade1",
|
|
||||||
"pressedBorderColor": "backgroundHighlightsShade1"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Button": {
|
|
||||||
"startBackground": "backgroundHighlightsShade1",
|
|
||||||
"endBackground": "backgroundHighlightsShade1",
|
|
||||||
"startBorderColor": "backgroundHighlights",
|
|
||||||
"endBorderColor": "backgroundHighlights",
|
|
||||||
"shadowColor": "background",
|
|
||||||
|
|
||||||
"default": {
|
|
||||||
"foreground": "inverseBackground",
|
|
||||||
"startBackground": "backgroundHighlightsShade2",
|
|
||||||
"endBackground": "backgroundHighlightsShade2",
|
|
||||||
"startBorderColor": "backgroundHighlightsShade2Shading",
|
|
||||||
"endBorderColor": "backgroundHighlightsShade2Shading",
|
|
||||||
"focusedBorderColor": "primaryText",
|
|
||||||
"focusColor": "#778282",
|
|
||||||
"shadowColor": "background"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"Borders": {
|
|
||||||
"color": "backgroundHighlights",
|
|
||||||
"ContrastBorderColor": "background"
|
|
||||||
},
|
|
||||||
|
|
||||||
"CheckBox": {
|
|
||||||
"background": "background"
|
|
||||||
},
|
|
||||||
|
|
||||||
"COMMENT:": "you can put comments in like this",
|
|
||||||
"ComboBox": {
|
|
||||||
"nonEditableBackground": "backgroundHighlightsShade1",
|
|
||||||
"background": "backgroundHighlightsShading",
|
|
||||||
"ArrowButton": {
|
|
||||||
"iconColor": "emphasizedContent",
|
|
||||||
"disabledIconColor": "primaryText",
|
|
||||||
"nonEditableBackground": "backgroundHighlightsShade1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"ComboPopup.border": "1,1,1,1,64647A",
|
|
||||||
|
|
||||||
"CompletionPopup": {
|
|
||||||
"matchForeground": "#ED94FF",
|
|
||||||
"matchSelectionForeground": "#ED94FF"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Component": {
|
|
||||||
"errorFocusColor": "#993750",
|
|
||||||
"inactiveErrorFocusColor": "#522530",
|
|
||||||
"warningFocusColor": "#8c812b",
|
|
||||||
"inactiveWarningFocusColor": "#47441f",
|
|
||||||
"iconColor": "#77728fCC",
|
|
||||||
"hoverIconColor": "#8b85a6"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Counter": {
|
|
||||||
"background": "#FFFFFF80",
|
|
||||||
"foreground": "#000000"
|
|
||||||
},
|
|
||||||
|
|
||||||
"DebuggerPopup.borderColor": "#524e66",
|
|
||||||
|
|
||||||
"DefaultTabs": {
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"borderColor": "backgroundHighlightsShade1",
|
|
||||||
"hoverBackground": "backgroundHighlightsShade2",
|
|
||||||
"inactiveUnderlineColor": "backgroundHighlightsShade2",
|
|
||||||
"underlineColor": "backgroundHighlightsShade2",
|
|
||||||
"underlinedTabBackground": "backgroundHighlights",
|
|
||||||
"underlinedTabForeground": "primaryText",
|
|
||||||
"underlineHeight": 5
|
|
||||||
},
|
|
||||||
|
|
||||||
"DragAndDrop": {
|
|
||||||
"areaForeground": "primaryText",
|
|
||||||
"areaBackground": "#702F91",
|
|
||||||
"areaBorderColor": "#343142"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Editor": {
|
|
||||||
"background": "background",
|
|
||||||
"foreground": "emphasizedContent",
|
|
||||||
"shortcutForeground": "#2aa198"
|
|
||||||
},
|
|
||||||
|
|
||||||
"EditorPane.inactiveBackground": "background",
|
|
||||||
|
|
||||||
"EditorTabs": {
|
|
||||||
"borderColor": "background",
|
|
||||||
"underlineColor": "backgroundHighlights",
|
|
||||||
"inactiveUnderlineColor": "background",
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"underlinedTabBackground": "background",
|
|
||||||
"hoverMaskColor": "backgroundHighlightsShade2",
|
|
||||||
"underlinedTabForeground": "primaryText",
|
|
||||||
"inactiveColoredFileBackground": "backgroundHighlightsShade1",
|
|
||||||
"underlineHeight": 0
|
|
||||||
},
|
|
||||||
|
|
||||||
"FileColor": {
|
|
||||||
"Yellow": "yellow",
|
|
||||||
"Green": "green",
|
|
||||||
"Blue": "blue",
|
|
||||||
"Violet": "violet",
|
|
||||||
"Orange": "orange",
|
|
||||||
"Rose": "rose"
|
|
||||||
},
|
|
||||||
|
|
||||||
"InplaceRefactoringPopup.borderColor": "#474359",
|
|
||||||
|
|
||||||
"Link": {
|
|
||||||
"activeForeground": "#7094ff",
|
|
||||||
"hoverForeground": "#7094FF",
|
|
||||||
"pressedForeground": "#7094FF",
|
|
||||||
"visitedForeground": "#7094FF"
|
|
||||||
},
|
|
||||||
|
|
||||||
"NavBar.borderColor": "#1a1721",
|
|
||||||
|
|
||||||
"Notification": {
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"borderColor": "backgroundHighlights",
|
|
||||||
|
|
||||||
"errorForeground": "primaryText",
|
|
||||||
"errorBackground": "#4d232e",
|
|
||||||
"errorBorderColor": "#802e44",
|
|
||||||
|
|
||||||
"MoreButton.innerBorderColor": "#1a1721",
|
|
||||||
|
|
||||||
"ToolWindow": {
|
|
||||||
"informativeForeground": "primaryText",
|
|
||||||
"informativeBackground": "#2e4280",
|
|
||||||
"informativeBorderColor": "#17254d",
|
|
||||||
|
|
||||||
"warningForeground": "primaryText",
|
|
||||||
"warningBackground": "backgroundHighlights",
|
|
||||||
"warningBorderColor": "#403013",
|
|
||||||
|
|
||||||
"errorForeground": "primaryText",
|
|
||||||
"errorBackground": "#802d43",
|
|
||||||
"errorBorderColor": "#4d1c2b"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"Panel": {
|
|
||||||
"background": "background"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ParameterInfo": {
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"foreground": "primaryText",
|
|
||||||
"infoForeground": "ababb3",
|
|
||||||
"currentOverloadBackground": "backgroundHighlights",
|
|
||||||
"currentParameterForeground": "primaryText"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Plugins": {
|
|
||||||
"SearchField.borderColor": "emphasizedContent",
|
|
||||||
"SearchField.background": "background",
|
|
||||||
"SectionHeader.background": "backgroundHighlights",
|
|
||||||
"tagBackground": "backgroundHighlightsShade1",
|
|
||||||
"tagForeground": "primaryText",
|
|
||||||
|
|
||||||
"Button": {
|
|
||||||
"installForeground": "primaryText",
|
|
||||||
"installBorderColor":"backgroundHighlightsShade1",
|
|
||||||
"installFillForeground": "primaryText",
|
|
||||||
"installFillBackground": "#713a91",
|
|
||||||
"updateForeground":"primaryText",
|
|
||||||
"updateBackground": "backgroundHighlightsShade1",
|
|
||||||
"updateBorderColor": "secondaryText"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"Popup": {
|
|
||||||
"paintBorder": true,
|
|
||||||
"borderColor": "backgroundHighlightsShade1",
|
|
||||||
"inactiveBorderColor": "backgroundHighlights",
|
|
||||||
"Toolbar.borderColor": "#1a1721",
|
|
||||||
"Header.activeBackground": "backgroundHighlightsShade1",
|
|
||||||
"Header.inactiveBackground": "backgroundHighlightsShade1",
|
|
||||||
"Advertiser": {
|
|
||||||
"foreground": "secondaryText",
|
|
||||||
"borderColor": "backgroundHighlightsShade1",
|
|
||||||
"borderInsets": "4,8,3,0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"PopupMenu": {
|
|
||||||
"borderWidth": 1,
|
|
||||||
"borderInsets": "4,1,4,1"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ProgressBar": {
|
|
||||||
"trackColor": "#1D1D26",
|
|
||||||
"progressColor": "#268bd2",
|
|
||||||
"indeterminateStartColor": "#268bd2",
|
|
||||||
"indeterminateEndColor": "#2aa198",
|
|
||||||
"failedColor": "#bd3c5f",
|
|
||||||
"failedEndColor": "#472c33",
|
|
||||||
"passedColor": "#239E62",
|
|
||||||
"passedEndColor": "#2b4242"
|
|
||||||
},
|
|
||||||
|
|
||||||
"SearchEverywhere": {
|
|
||||||
"Header.background": "backgroundHighlights",
|
|
||||||
"Tab": {
|
|
||||||
"selectedForeground": "primaryText",
|
|
||||||
"selectedBackground": "backgroundHighlightsShade1"
|
|
||||||
},
|
|
||||||
"SearchField":{
|
|
||||||
"background": "background",
|
|
||||||
"borderColor": "#1a1721"
|
|
||||||
},
|
|
||||||
"Advertiser.foreground": "#8785a6"
|
|
||||||
},
|
|
||||||
|
|
||||||
"SearchMatch": {
|
|
||||||
"startBackground": "#cca929",
|
|
||||||
"endBackground": "#cca929"
|
|
||||||
},
|
|
||||||
|
|
||||||
"SpeedSearch": {
|
|
||||||
"foreground": "primaryText",
|
|
||||||
"borderColor": "backgroundHighlights",
|
|
||||||
"background": "background",
|
|
||||||
"errorForeground": "#ff80a1"
|
|
||||||
},
|
|
||||||
|
|
||||||
"StatusBar.borderColor": "background",
|
|
||||||
|
|
||||||
"TabbedPane": {
|
|
||||||
"underlineColor": "backgroundHighlightsShade2",
|
|
||||||
"disabledUnderlineColor": "backgroundHighlightsShade2",
|
|
||||||
"contentAreaColor": "backgroundHighlights",
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"foreground": "primaryText",
|
|
||||||
"disabledForeground": "primaryText",
|
|
||||||
"focusColor": "backgroundHighlights",
|
|
||||||
"hoverColor": "backgroundHighlightsShade2"
|
|
||||||
},
|
|
||||||
|
|
||||||
"TableHeader.cellBorder": "3,0,3,0",
|
|
||||||
|
|
||||||
"Table.stripeColor": "backgroundHighlightsShade1",
|
|
||||||
|
|
||||||
"TextArea": {
|
|
||||||
"background": "backgroundHighlights",
|
|
||||||
"selectionBackground": "backgroundHighlightsShade2"
|
|
||||||
},
|
|
||||||
|
|
||||||
"TextField": {
|
|
||||||
"background": "backgroundHighlights",
|
|
||||||
"selectionBackground": "backgroundHighlightsShade2"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ToggleButton": {
|
|
||||||
"onForeground": "primaryText",
|
|
||||||
"onBackground": "#543073",
|
|
||||||
"offForeground": "#9f9fa6",
|
|
||||||
"offBackground": "background",
|
|
||||||
"buttonColor": "#666380",
|
|
||||||
"borderColor": "#666380"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ToolTip": {
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"Actions.background": "#323245"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ToolWindow": {
|
|
||||||
"Header": {
|
|
||||||
"background": "backgroundHighlightsShade1",
|
|
||||||
"inactiveBackground": "backgroundHighlights",
|
|
||||||
"borderColor": "backgroundHighlights"
|
|
||||||
},
|
|
||||||
|
|
||||||
"HeaderTab": {
|
|
||||||
"selectedBackground": "#0a0a0a66",
|
|
||||||
"selectedInactiveBackground": "#0a0a0a4D",
|
|
||||||
"hoverBackground": "#0a0a0a16",
|
|
||||||
"hoverInactiveBackground": "#0a0a0a16"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Button": {
|
|
||||||
"hoverBackground": "backgroundHighlightsShade1",
|
|
||||||
"selectedBackground": "backgroundHighlightsShade1",
|
|
||||||
"selectedForeground": "primaryText"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"Tree": {
|
|
||||||
"rowHeight": 20,
|
|
||||||
"background": "backgroundEmpty"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ValidationTooltip": {
|
|
||||||
"errorBackground": "#802d43",
|
|
||||||
"errorBorderColor": "#4d1c2b",
|
|
||||||
"warningBackground": "#735822",
|
|
||||||
"warningBorderColor": "#403013"
|
|
||||||
},
|
|
||||||
|
|
||||||
"VersionControl": {
|
|
||||||
"Log.Commit": {
|
|
||||||
"currentBranchBackground": "green",
|
|
||||||
"unmatchedForeground": "#6d6a80"
|
|
||||||
},
|
|
||||||
"FileHistory.Commit.selectedBranchBackground": "#202340"
|
|
||||||
},
|
|
||||||
|
|
||||||
"WelcomeScreen": {
|
|
||||||
"comments": "#713a91",
|
|
||||||
"separatorColor": "backgroundHighlights",
|
|
||||||
"Projects": {
|
|
||||||
"background": "backgroundHighlights",
|
|
||||||
"selectionBackground": "backgroundHighlightsShade1",
|
|
||||||
"selectionInactiveBackground": "backgroundHighlightsShade1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"icons": {
|
|
||||||
"ColorPalette": {
|
|
||||||
"Actions.Grey": "#a4a1b3",
|
|
||||||
"Actions.Red": "#cb4b16",
|
|
||||||
"Actions.Yellow": "#b58900",
|
|
||||||
"Actions.Green": "#859900",
|
|
||||||
"Actions.Blue": "#268bd2",
|
|
||||||
"Actions.GreyInline.Dark": "#9f99bfb3",
|
|
||||||
|
|
||||||
"Objects.Grey": "#9790ad",
|
|
||||||
"Objects.RedStatus": "#dd3962",
|
|
||||||
"Objects.Red": "#c63a5d",
|
|
||||||
"Objects.Pink": "#f98b9e",
|
|
||||||
"Objects.Yellow": "#caba2d",
|
|
||||||
"Objects.Green": "#239e62",
|
|
||||||
"Objects.Blue": "#598bff",
|
|
||||||
"Objects.Purple": "#af71e0",
|
|
||||||
"Objects.BlackText": "#000000ff",
|
|
||||||
"Objects.YellowDark": "#988c26",
|
|
||||||
"Objects.GreenAndroid": "#78c257",
|
|
||||||
|
|
||||||
"Checkbox.Background.Default.Dark": "backgroundHighlightsShade1",
|
|
||||||
"Checkbox.Border.Default.Dark": "secondaryText",
|
|
||||||
"Checkbox.Foreground.Selected.Dark": "#a4a1b3",
|
|
||||||
"Checkbox.Focus.Wide.Dark": "emphasizedContent",
|
|
||||||
"Checkbox.Focus.Thin.Default.Dark": "primaryText",
|
|
||||||
"Checkbox.Focus.Thin.Selected.Dark": "primaryText",
|
|
||||||
"Checkbox.Background.Disabled.Dark": "backgroundHighlights",
|
|
||||||
"Checkbox.Border.Disabled.Dark": "backgroundHighlightsShade1",
|
|
||||||
"Checkbox.Foreground.Disabled.Dark": "secondaryText"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -82,9 +82,10 @@
|
|||||||
"ComboPopup.border": "1,1,1,1,303a45",
|
"ComboPopup.border": "1,1,1,1,303a45",
|
||||||
|
|
||||||
"CompletionPopup": {
|
"CompletionPopup": {
|
||||||
"matchForeground": "#f43b6c",
|
"foreground": "#c9cbcf",
|
||||||
"selectionBackground": "#202831",
|
"matchForeground": "#0d9660",
|
||||||
"selectionInactiveBackground": "#202831"
|
"selectionBackground": "#0c1014",
|
||||||
|
"selectionInactiveBackground": "#0c1014"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Component": {
|
"Component": {
|
||||||
@@ -103,7 +104,6 @@
|
|||||||
|
|
||||||
"DebuggerPopup.borderColor": "#202831",
|
"DebuggerPopup.borderColor": "#202831",
|
||||||
|
|
||||||
"DebuggerTabs.selectedBackground": "#303a45",
|
|
||||||
"DebuggerTabs.underlineHeight": 1,
|
"DebuggerTabs.underlineHeight": 1,
|
||||||
|
|
||||||
"DefaultTabs": {
|
"DefaultTabs": {
|
||||||
@@ -254,14 +254,14 @@
|
|||||||
"Transparent": {
|
"Transparent": {
|
||||||
"thumbColor": "#303a45",
|
"thumbColor": "#303a45",
|
||||||
"thumbBorderColor": "#303a45",
|
"thumbBorderColor": "#303a45",
|
||||||
"hoverThumbColor": "#434e5b",
|
"hoverThumbColor": "#9ca2aa",
|
||||||
"hoverThumbBorderColor": "#434e5b",
|
"hoverThumbBorderColor": "#9ca2aa",
|
||||||
"hoverTrackColor": "#434e5b"
|
"hoverTrackColor": "#434e5b"
|
||||||
},
|
},
|
||||||
"thumbColor": "#303a45",
|
"thumbColor": "#303a45",
|
||||||
"thumbBorderColor": "#303a45",
|
"thumbBorderColor": "#303a45",
|
||||||
"hoverThumbColor": "#434e5b",
|
"hoverThumbColor": "#9ca2aa",
|
||||||
"hoverThumbBorderColor": "#434e5b",
|
"hoverThumbBorderColor": "#9ca2aa",
|
||||||
"trackColor": "#434e5b",
|
"trackColor": "#434e5b",
|
||||||
"hoverTrackColor": "#434e5b",
|
"hoverTrackColor": "#434e5b",
|
||||||
|
|
||||||
@@ -269,14 +269,14 @@
|
|||||||
"Transparent": {
|
"Transparent": {
|
||||||
"thumbColor": "#303a45",
|
"thumbColor": "#303a45",
|
||||||
"thumbBorderColor": "#303a45",
|
"thumbBorderColor": "#303a45",
|
||||||
"hoverThumbColor": "#434e5b",
|
"hoverThumbColor": "#9ca2aa",
|
||||||
"hoverThumbBorderColor": "#434e5b",
|
"hoverThumbBorderColor": "#9ca2aa",
|
||||||
"hoverTrackColor": "#434e5b"
|
"hoverTrackColor": "#434e5b"
|
||||||
},
|
},
|
||||||
"thumbColor": "#303a45",
|
"thumbColor": "#303a45",
|
||||||
"thumbBorderColor": "#303a45",
|
"thumbBorderColor": "#303a45",
|
||||||
"hoverThumbColor": "#434e5b",
|
"hoverThumbColor": "#9ca2aa",
|
||||||
"hoverThumbBorderColor": "#434e5b",
|
"hoverThumbBorderColor": "#9ca2aa",
|
||||||
"trackColor": "#434e5b",
|
"trackColor": "#434e5b",
|
||||||
"hoverTrackColor": "#434e5b"
|
"hoverTrackColor": "#434e5b"
|
||||||
}
|
}
|
||||||
@@ -349,7 +349,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"HeaderTab": {
|
"HeaderTab": {
|
||||||
"selectedBackground": "#303a45",
|
|
||||||
"selectedInactiveBackground": "#303a45",
|
"selectedInactiveBackground": "#303a45",
|
||||||
"hoverBackground": "#303a45",
|
"hoverBackground": "#303a45",
|
||||||
"hoverInactiveBackground": "#303a45",
|
"hoverInactiveBackground": "#303a45",
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class FlatDatePickerBorder
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean isTableCellEditor( Component c ) {
|
protected boolean isCellEditor( Component c ) {
|
||||||
return c.getParent() instanceof JTable;
|
return c.getParent() instanceof JTable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,124 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 FormDev Software GmbH
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import javax.swing.*;
|
||||||
|
import com.formdev.flatlaf.util.Animator;
|
||||||
|
import com.formdev.flatlaf.util.CubicBezierEasing;
|
||||||
|
import net.miginfocom.swing.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Karl Tauber
|
||||||
|
*/
|
||||||
|
public class FlatAnimatorTest
|
||||||
|
extends FlatTestPanel
|
||||||
|
{
|
||||||
|
private Animator linearAnimator;
|
||||||
|
private Animator easeInOutAnimator;
|
||||||
|
|
||||||
|
public static void main( String[] args ) {
|
||||||
|
SwingUtilities.invokeLater( () -> {
|
||||||
|
FlatTestFrame frame = FlatTestFrame.create( args, "FlatAnimatorTest" );
|
||||||
|
frame.showFrame( FlatAnimatorTest::new );
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
FlatAnimatorTest() {
|
||||||
|
initComponents();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void start() {
|
||||||
|
startLinear();
|
||||||
|
startEaseInOut();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startLinear() {
|
||||||
|
if( linearAnimator != null ) {
|
||||||
|
linearAnimator.stop();
|
||||||
|
linearAnimator.start();
|
||||||
|
} else {
|
||||||
|
linearAnimator = new Animator( 1000, fraction -> {
|
||||||
|
linearScrollBar.setValue( Math.round( fraction * linearScrollBar.getMaximum() ) );
|
||||||
|
} );
|
||||||
|
linearAnimator.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startEaseInOut() {
|
||||||
|
if( easeInOutAnimator != null ) {
|
||||||
|
easeInOutAnimator.stop();
|
||||||
|
easeInOutAnimator.start();
|
||||||
|
} else {
|
||||||
|
easeInOutAnimator = new Animator( 1000, fraction -> {
|
||||||
|
easeInOutScrollBar.setValue( Math.round( fraction * easeInOutScrollBar.getMaximum() ) );
|
||||||
|
} );
|
||||||
|
easeInOutAnimator.setInterpolator( CubicBezierEasing.EASE_IN_OUT );
|
||||||
|
easeInOutAnimator.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initComponents() {
|
||||||
|
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
||||||
|
JLabel label1 = new JLabel();
|
||||||
|
linearScrollBar = new JScrollBar();
|
||||||
|
JLabel label2 = new JLabel();
|
||||||
|
easeInOutScrollBar = new JScrollBar();
|
||||||
|
startButton = new JButton();
|
||||||
|
|
||||||
|
//======== this ========
|
||||||
|
setLayout(new MigLayout(
|
||||||
|
"ltr,insets dialog,hidemode 3",
|
||||||
|
// columns
|
||||||
|
"[fill]" +
|
||||||
|
"[grow,fill]",
|
||||||
|
// rows
|
||||||
|
"[]" +
|
||||||
|
"[]" +
|
||||||
|
"[]"));
|
||||||
|
|
||||||
|
//---- label1 ----
|
||||||
|
label1.setText("Linear:");
|
||||||
|
add(label1, "cell 0 0");
|
||||||
|
|
||||||
|
//---- linearScrollBar ----
|
||||||
|
linearScrollBar.setOrientation(Adjustable.HORIZONTAL);
|
||||||
|
linearScrollBar.setBlockIncrement(1);
|
||||||
|
add(linearScrollBar, "cell 1 0");
|
||||||
|
|
||||||
|
//---- label2 ----
|
||||||
|
label2.setText("Ease in out:");
|
||||||
|
add(label2, "cell 0 1");
|
||||||
|
|
||||||
|
//---- easeInOutScrollBar ----
|
||||||
|
easeInOutScrollBar.setOrientation(Adjustable.HORIZONTAL);
|
||||||
|
easeInOutScrollBar.setBlockIncrement(1);
|
||||||
|
add(easeInOutScrollBar, "cell 1 1");
|
||||||
|
|
||||||
|
//---- startButton ----
|
||||||
|
startButton.setText("Start");
|
||||||
|
startButton.addActionListener(e -> start());
|
||||||
|
add(startButton, "cell 0 2");
|
||||||
|
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||||
|
}
|
||||||
|
|
||||||
|
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
||||||
|
private JScrollBar linearScrollBar;
|
||||||
|
private JScrollBar easeInOutScrollBar;
|
||||||
|
private JButton startButton;
|
||||||
|
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
JFDML JFormDesigner: "7.0.2.0.298" Java: "14.0.2" encoding: "UTF-8"
|
||||||
|
|
||||||
|
new FormModel {
|
||||||
|
contentType: "form/swing"
|
||||||
|
root: new FormRoot {
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.defaultVariableLocal": true
|
||||||
|
}
|
||||||
|
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
|
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
||||||
|
"$columnConstraints": "[fill][grow,fill]"
|
||||||
|
"$rowConstraints": "[][][]"
|
||||||
|
} ) {
|
||||||
|
name: "this"
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "label1"
|
||||||
|
"text": "Linear:"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 0"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JScrollBar" ) {
|
||||||
|
name: "linearScrollBar"
|
||||||
|
"orientation": 0
|
||||||
|
"blockIncrement": 1
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 0"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
|
name: "label2"
|
||||||
|
"text": "Ease in out:"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JScrollBar" ) {
|
||||||
|
name: "easeInOutScrollBar"
|
||||||
|
"orientation": 0
|
||||||
|
"blockIncrement": 1
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 1 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JButton" ) {
|
||||||
|
name: "startButton"
|
||||||
|
"text": "Start"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "start", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 2"
|
||||||
|
} )
|
||||||
|
}, new FormLayoutConstraints( null ) {
|
||||||
|
"location": new java.awt.Point( 0, 0 )
|
||||||
|
"size": new java.awt.Dimension( 415, 350 )
|
||||||
|
} )
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,6 +16,9 @@
|
|||||||
|
|
||||||
package com.formdev.flatlaf.testing;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.EventQueue;
|
||||||
import java.awt.datatransfer.DataFlavor;
|
import java.awt.datatransfer.DataFlavor;
|
||||||
import java.awt.datatransfer.StringSelection;
|
import java.awt.datatransfer.StringSelection;
|
||||||
import java.awt.datatransfer.Transferable;
|
import java.awt.datatransfer.Transferable;
|
||||||
@@ -91,6 +94,33 @@ public class FlatComponents2Test
|
|||||||
table1.setColumnSelectionAllowed( columnSelectionCheckBox.isSelected() );
|
table1.setColumnSelectionAllowed( columnSelectionCheckBox.isSelected() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showHorizontalLinesChanged() {
|
||||||
|
table1.setShowHorizontalLines( showHorizontalLinesCheckBox.isSelected() );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showVerticalLinesChanged() {
|
||||||
|
table1.setShowVerticalLines( showVerticalLinesCheckBox.isSelected() );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void intercellSpacingChanged() {
|
||||||
|
table1.setIntercellSpacing( intercellSpacingCheckBox.isSelected() ? new Dimension( 1, 1 ) : new Dimension() );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void redGridColorChanged() {
|
||||||
|
table1.setGridColor( redGridColorCheckBox.isSelected() ? Color.red : UIManager.getColor( "Table.gridColor" ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateUI() {
|
||||||
|
super.updateUI();
|
||||||
|
|
||||||
|
EventQueue.invokeLater( () -> {
|
||||||
|
showHorizontalLinesChanged();
|
||||||
|
showVerticalLinesChanged();
|
||||||
|
intercellSpacingChanged();
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings( { "unchecked", "rawtypes" } )
|
@SuppressWarnings( { "unchecked", "rawtypes" } )
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
||||||
@@ -114,6 +144,10 @@ public class FlatComponents2Test
|
|||||||
tableHeaderButtonCheckBox = new JCheckBox();
|
tableHeaderButtonCheckBox = new JCheckBox();
|
||||||
rowSelectionCheckBox = new JCheckBox();
|
rowSelectionCheckBox = new JCheckBox();
|
||||||
columnSelectionCheckBox = new JCheckBox();
|
columnSelectionCheckBox = new JCheckBox();
|
||||||
|
showHorizontalLinesCheckBox = new JCheckBox();
|
||||||
|
showVerticalLinesCheckBox = new JCheckBox();
|
||||||
|
intercellSpacingCheckBox = new JCheckBox();
|
||||||
|
redGridColorCheckBox = new JCheckBox();
|
||||||
|
|
||||||
//======== this ========
|
//======== this ========
|
||||||
setLayout(new MigLayout(
|
setLayout(new MigLayout(
|
||||||
@@ -127,6 +161,7 @@ public class FlatComponents2Test
|
|||||||
"[]" +
|
"[]" +
|
||||||
"[::200]" +
|
"[::200]" +
|
||||||
"[150,grow]" +
|
"[150,grow]" +
|
||||||
|
"[]" +
|
||||||
"[]"));
|
"[]"));
|
||||||
|
|
||||||
//---- textFieldLabel ----
|
//---- textFieldLabel ----
|
||||||
@@ -333,6 +368,26 @@ public class FlatComponents2Test
|
|||||||
columnSelectionCheckBox.setText("column selection");
|
columnSelectionCheckBox.setText("column selection");
|
||||||
columnSelectionCheckBox.addActionListener(e -> columnSelectionChanged());
|
columnSelectionCheckBox.addActionListener(e -> columnSelectionChanged());
|
||||||
add(columnSelectionCheckBox, "cell 0 4 3 1");
|
add(columnSelectionCheckBox, "cell 0 4 3 1");
|
||||||
|
|
||||||
|
//---- showHorizontalLinesCheckBox ----
|
||||||
|
showHorizontalLinesCheckBox.setText("show horizontal lines");
|
||||||
|
showHorizontalLinesCheckBox.addActionListener(e -> showHorizontalLinesChanged());
|
||||||
|
add(showHorizontalLinesCheckBox, "cell 0 5 3 1");
|
||||||
|
|
||||||
|
//---- showVerticalLinesCheckBox ----
|
||||||
|
showVerticalLinesCheckBox.setText("show vertical lines");
|
||||||
|
showVerticalLinesCheckBox.addActionListener(e -> showVerticalLinesChanged());
|
||||||
|
add(showVerticalLinesCheckBox, "cell 0 5 3 1");
|
||||||
|
|
||||||
|
//---- intercellSpacingCheckBox ----
|
||||||
|
intercellSpacingCheckBox.setText("intercell spacing");
|
||||||
|
intercellSpacingCheckBox.addActionListener(e -> intercellSpacingChanged());
|
||||||
|
add(intercellSpacingCheckBox, "cell 0 5 3 1");
|
||||||
|
|
||||||
|
//---- redGridColorCheckBox ----
|
||||||
|
redGridColorCheckBox.setText("red grid color");
|
||||||
|
redGridColorCheckBox.addActionListener(e -> redGridColorChanged());
|
||||||
|
add(redGridColorCheckBox, "cell 0 5 3 1");
|
||||||
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||||
|
|
||||||
((JComboBox)((DefaultCellEditor)table1.getColumnModel().getColumn( 3 ).getCellEditor()).getComponent()).setEditable( true );
|
((JComboBox)((DefaultCellEditor)table1.getColumnModel().getColumn( 3 ).getCellEditor()).getComponent()).setEditable( true );
|
||||||
@@ -349,6 +404,10 @@ public class FlatComponents2Test
|
|||||||
private JCheckBox tableHeaderButtonCheckBox;
|
private JCheckBox tableHeaderButtonCheckBox;
|
||||||
private JCheckBox rowSelectionCheckBox;
|
private JCheckBox rowSelectionCheckBox;
|
||||||
private JCheckBox columnSelectionCheckBox;
|
private JCheckBox columnSelectionCheckBox;
|
||||||
|
private JCheckBox showHorizontalLinesCheckBox;
|
||||||
|
private JCheckBox showVerticalLinesCheckBox;
|
||||||
|
private JCheckBox intercellSpacingCheckBox;
|
||||||
|
private JCheckBox redGridColorCheckBox;
|
||||||
// JFormDesigner - End of variables declaration //GEN-END:variables
|
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||||
|
|
||||||
//---- class DummyTransferHandler -----------------------------------------
|
//---- class DummyTransferHandler -----------------------------------------
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
|
JFDML JFormDesigner: "7.0.2.0.298" Java: "14" encoding: "UTF-8"
|
||||||
|
|
||||||
new FormModel {
|
new FormModel {
|
||||||
contentType: "form/swing"
|
contentType: "form/swing"
|
||||||
@@ -9,7 +9,7 @@ new FormModel {
|
|||||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||||
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
||||||
"$columnConstraints": "[][200][200]"
|
"$columnConstraints": "[][200][200]"
|
||||||
"$rowConstraints": "[][][::200][150,grow][]"
|
"$rowConstraints": "[][][::200][150,grow][][]"
|
||||||
} ) {
|
} ) {
|
||||||
name: "this"
|
name: "this"
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
@@ -316,6 +316,46 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 0 4 3 1"
|
"value": "cell 0 4 3 1"
|
||||||
} )
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
|
name: "showHorizontalLinesCheckBox"
|
||||||
|
"text": "show horizontal lines"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showHorizontalLinesChanged", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 5 3 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
|
name: "showVerticalLinesCheckBox"
|
||||||
|
"text": "show vertical lines"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "showVerticalLinesChanged", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 5 3 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
|
name: "intercellSpacingCheckBox"
|
||||||
|
"text": "intercell spacing"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "intercellSpacingChanged", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 5 3 1"
|
||||||
|
} )
|
||||||
|
add( new FormComponent( "javax.swing.JCheckBox" ) {
|
||||||
|
name: "redGridColorCheckBox"
|
||||||
|
"text": "red grid color"
|
||||||
|
auxiliary() {
|
||||||
|
"JavaCodeGenerator.variableLocal": false
|
||||||
|
}
|
||||||
|
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "redGridColorChanged", false ) )
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 0 5 3 1"
|
||||||
|
} )
|
||||||
}, new FormLayoutConstraints( null ) {
|
}, new FormLayoutConstraints( null ) {
|
||||||
"location": new java.awt.Point( 0, 0 )
|
"location": new java.awt.Point( 0, 0 )
|
||||||
"size": new java.awt.Dimension( 790, 715 )
|
"size": new java.awt.Dimension( 790, 715 )
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ public class FlatComponentsTest
|
|||||||
JLabel labelLabel = new JLabel();
|
JLabel labelLabel = new JLabel();
|
||||||
JLabel label1 = new JLabel();
|
JLabel label1 = new JLabel();
|
||||||
JLabel label2 = new JLabel();
|
JLabel label2 = new JLabel();
|
||||||
|
FlatComponentsTest.TestMultiLineLabel testMultiLineLabel1 = new FlatComponentsTest.TestMultiLineLabel();
|
||||||
JLabel buttonLabel = new JLabel();
|
JLabel buttonLabel = new JLabel();
|
||||||
JButton button1 = new JButton();
|
JButton button1 = new JButton();
|
||||||
JButton button17 = new JButton();
|
JButton button17 = new JButton();
|
||||||
@@ -367,6 +368,10 @@ public class FlatComponentsTest
|
|||||||
label2.setEnabled(false);
|
label2.setEnabled(false);
|
||||||
add(label2, "cell 2 0");
|
add(label2, "cell 2 0");
|
||||||
|
|
||||||
|
//---- testMultiLineLabel1 ----
|
||||||
|
testMultiLineLabel1.setText("Multi-line label based on JTextArea\n2nd line");
|
||||||
|
add(testMultiLineLabel1, "cell 3 0 2 1");
|
||||||
|
|
||||||
//---- buttonLabel ----
|
//---- buttonLabel ----
|
||||||
buttonLabel.setText("JButton:");
|
buttonLabel.setText("JButton:");
|
||||||
add(buttonLabel, "cell 0 1");
|
add(buttonLabel, "cell 0 1");
|
||||||
@@ -1402,4 +1407,24 @@ public class FlatComponentsTest
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---- class TestMultiLineLabel -------------------------------------------
|
||||||
|
|
||||||
|
private static class TestMultiLineLabel
|
||||||
|
extends JTextArea
|
||||||
|
{
|
||||||
|
public TestMultiLineLabel() {
|
||||||
|
setEditable( false );
|
||||||
|
setFocusable( false );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateUI() {
|
||||||
|
super.updateUI();
|
||||||
|
setBackground( UIManager.getColor( "Label.background" ) );
|
||||||
|
setForeground( UIManager.getColor( "Label.foreground" ) );
|
||||||
|
setFont( UIManager.getFont( "Label.font" ) );
|
||||||
|
setBorder( null );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,12 @@ new FormModel {
|
|||||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
"value": "cell 2 0"
|
"value": "cell 2 0"
|
||||||
} )
|
} )
|
||||||
|
add( new FormComponent( "com.formdev.flatlaf.testing.FlatComponentsTest$TestMultiLineLabel" ) {
|
||||||
|
name: "testMultiLineLabel1"
|
||||||
|
"text": "Multi-line label based on JTextArea\n2nd line"
|
||||||
|
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||||
|
"value": "cell 3 0 2 1"
|
||||||
|
} )
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "buttonLabel"
|
name: "buttonLabel"
|
||||||
"text": "JButton:"
|
"text": "JButton:"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user