Compare commits

..

73 Commits
0.37 ... 0.40

Author SHA1 Message Date
Karl Tauber
f1fd6dcdd2 release 0.40 2020-08-11 11:32:05 +02:00
Karl Tauber
2975ed2eae FlatComponents2Test: added checkboxes to enable/configure table grid lines 2020-08-07 22:46:26 +02:00
Karl Tauber
5a27d03faa IntelliJ Themes: fixed NPE in Solarized themes on scroll bar hover 2020-08-07 17:34:23 +02:00
Karl Tauber
8bcf9dbcaf - 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
- ComboBox, Spinner and TextField: support disabling round border style per component, if globally enabled
(issue #148)
2020-08-07 11:27:27 +02:00
Karl Tauber
56ebd26361 Window decorations: make embedded menu bar make smaller if horizontal space is rare to avoid that embedded menu bar overlaps buttons 2020-08-06 23:10:54 +02:00
Karl Tauber
b0426b81a7 Window decorations: embedded menu bar did not always respond to mouse events after adding menus and when running in JetBrains Runtime (issue #151) 2020-08-06 11:45:47 +02:00
Karl Tauber
368fbcdeb0 release 0.39 2020-08-03 16:20:57 +02:00
Karl Tauber
30747b7776 UIScale: added system property "flatlaf.uiScale.enabled" (replaces "hidpi" property) to disable user scaling mode 2020-08-02 14:08:18 +02:00
Karl Tauber
4eb4ddf5d8 FlatTestFrame: do not use sun.java2d.uiScale for user scale factor 2020-08-02 11:43:46 +02:00
Karl Tauber
b1d24680b2 ToolTip: fixed truncated text in HTML formatted tooltip on HiDPI displays (issue #142) 2020-08-01 22:53:09 +02:00
Karl Tauber
ef38f3805e IntelliJ Themes: fixed text colors in ProgressBar (issue #138) 2020-08-01 00:31:20 +02:00
Karl Tauber
2f5ca20ca4 fixed compile error caused by previous checkin (issue #143) 2020-07-31 19:28:58 +02:00
Karl Tauber
f29d3d84d4 FileChooser: fixed too small text field when renaming a file/directory in Flat IntelliJ/Darcula themes (issue #143) 2020-07-31 19:17:49 +02:00
Karl Tauber
02132c5fcd MenuItem on macOS: removed plus characters from accelerator text and made modifier key order conform with macOS standard (issue #141) 2020-07-31 13:02:01 +02:00
Karl Tauber
7057e3c6ad IntelliJ Themes: added "Carbon" and "Cobalt 2" themes 2020-07-30 23:11:37 +02:00
Karl Tauber
a8f4c8e843 Demo: added combo box above themes list to show only light or dark themes 2020-07-30 19:41:56 +02:00
Karl Tauber
a2b6e66a13 CHANGELOG.md: split change log of last version into "New features" and "Fixed bugs" sections 2020-07-30 19:26:50 +02:00
Karl Tauber
e3b3cc2896 IntelliJ Themes: replaced "Solarized" themes with much better ones from 4lex4 2020-07-30 16:30:56 +02:00
Karl Tauber
a5b2c50f24 IntelliJ Themes:
- added "Arc Dark" and "Arc Dark - Orange" themes
- updated themes to newest versions (used IJThemesUpdater)
2020-07-30 15:00:31 +02:00
Karl Tauber
5ebdf64d30 ComboBox: fixed width of popup, which was too small if popup is wider than combo box and vertical scroll bar is visible (issue #137) 2020-07-30 13:30:50 +02:00
Karl Tauber
2640ab2e8b ComboBox: changed maximum row count of popup list to 15 (was 20) (issue #124) 2020-07-30 12:11:15 +02:00
Karl Tauber
e29436da04 Button: support specifying button border width 2020-07-28 23:51:02 +02:00
Karl Tauber
7b35325f9a Flat IntelliJ theme: use color functions for selected checkbox/radio button hover/pressed background 2020-07-28 22:14:08 +02:00
Karl Tauber
f2ab7fafcf ToolTip: do not show empty tooltip component if tooltip text is an empty string (issue #134) 2020-07-28 11:10:34 +02:00
Karl Tauber
e3cda9905a Table: allow disabling swapped behavior of Home/End and Ctrl+Home/End with Table.consistentHomeEndKeyBehavior=false (issue #95) 2020-07-27 17:55:31 +02:00
Karl Tauber
a8423f7741 ScrollBar: increased minimum thumb size on macOS and Linux to 18px and on Windows to 10px; also include ScrollBar.thumbInsets in minimum size calculation (issue #131) 2020-07-27 14:41:01 +02:00
Karl Tauber
5a9e620c17 Animator: added constructor that allows passing a runnable that is invoked at the end of the animation, which allows using lambdas in most cases 2020-07-25 10:53:06 +02:00
Karl Tauber
9f41ec3986 ScrollPane: support disabling smooth scrolling per component via client property "JScrollPane.smoothScrolling" 2020-07-25 10:27:06 +02:00
Karl Tauber
5a2c0672d4 Window decorations: avoid possible endless restore/maximize in WindowStateListener in case of behavior changes in Java (issue #129) 2020-07-23 10:43:24 +02:00
Karl Tauber
38d853b5b2 Window decorations: fixed maximized window bounds with Java 11.0.8 and 13.0.4, which has fixes backported from Java 15 (issue #129) 2020-07-22 23:23:46 +02:00
Karl Tauber
5166d4bb0f SystemInfo:
- renamed public fields from upper-case to mixed-case
- added public fields for osVersion and javaVersion
- fixed Mac -> MacOS
- added orLater to Mojave
2020-07-22 22:01:19 +02:00
Karl Tauber
2ffd5437a9 animated Laf changing added to flatlaf-extras, used in Demo 2020-07-22 12:56:42 +02:00
Karl Tauber
797830ff96 InternalFrame: title pane height was too small when iconify, maximize and close buttons are hidden (issue #132) 2020-07-21 18:23:57 +02:00
Karl Tauber
008ecabd21 animator and cubic bezier easing classes added (for future animations) (issue #66) 2020-07-21 17:53:53 +02:00
Karl Tauber
2cdcde8a5e Window decorations: fixed maximized window bounds when programmatically maximizing window before showing window (issue #129) 2020-07-18 14:21:19 +02:00
Karl Tauber
e7ec3988e2 Window decorations: fixed maximized window bounds when programmatically maximizing window (issue #129) 2020-07-17 00:08:21 +02:00
Karl Tauber
093dd9f3ef README.md: added jAlbum to list of projects that use FlatLaf 2020-07-15 19:37:47 +02:00
Karl Tauber
b491202ec7 UIDefaultsLoader: fixed NPE on syntax error in color function 2020-07-15 11:57:40 +02:00
Karl Tauber
8603ca827e Theme Editor: auto-completion improvements:
- include reference completions in value completions (if already entered text is empty)
- order completions: 1st color functions, 2nd @refs, 3rd $refs
- exclude platform specific keys from reference provider
2020-07-11 13:35:59 +02:00
Karl Tauber
6b148a59da Theme Editor: added auto-completion for "amount" and "options" parameters of color functions 2020-07-11 13:01:59 +02:00
Karl Tauber
de6d45fee6 Theme Editor: fixed NPE in FlatCompletionProvider.isAutoActivateOkay() 2020-07-10 16:10:43 +02:00
Karl Tauber
65e2071937 CHANGELOG.md: added regression note 2020-07-10 15:58:04 +02:00
Karl Tauber
8a6242d9ea release 0.38 2020-07-10 15:45:35 +02:00
Karl Tauber
82294b68eb CheckBox: fixed colors in light IntelliJ themes (issue #126) 2020-07-10 15:35:02 +02:00
Karl Tauber
c232de1996 Window decorations: fixed cursor of components (issue #125) 2020-07-10 11:39:17 +02:00
Karl Tauber
dc18c8178d Theme Editor: fixed typo 2020-07-10 10:54:09 +02:00
Karl Tauber
6662714277 Theme Editor: auto-completion improved:
- reference completion shows all keys defined in current and base files
- support auto-activate for value provider
- do not auto-complete single choices
2020-07-10 10:33:10 +02:00
Karl Tauber
c404a0d1a9 Theme Editor:
- auto-activate key completion on any letter
- special completion provider for references
2020-07-08 19:15:52 +02:00
Karl Tauber
990da2b412 Theme Editor:
- auto-activate completion popup when '$' is pressed
- use keys auto-complete in value if value contains '$'
- more fine grained detection what completion provider should be used
2020-07-08 18:07:37 +02:00
Karl Tauber
1b974379c8 UIDefaultsLoader: check for endless recursion in resolveValue() 2020-07-08 17:57:40 +02:00
Karl Tauber
835faf9773 Theme Editor: auto-completion depending on caret position (none for comments, keys and values); added color functions 2020-07-08 14:29:11 +02:00
Karl Tauber
80deecb73e Theme Editor: close input streams when reading base properties files 2020-07-08 10:59:40 +02:00
Karl Tauber
64328ab9cc UIDefaultsLoader: trim value in resolveValue() to ignore spaces at the end of references/variables 2020-07-08 10:47:36 +02:00
Karl Tauber
eafad942e7 Theme Editor: added basic auto-complete for keys 2020-07-08 10:43:24 +02:00
Karl Tauber
eb5a3168b9 Theme Editor: support loading/resolving base properties 2020-07-07 21:42:10 +02:00
Karl Tauber
ac8225d8fb Theme Editor: support saving file; added inspector 2020-07-07 16:17:31 +02:00
Karl Tauber
6f71e4ada0 Theme Editor: use deferred properties loading 2020-07-07 14:21:31 +02:00
Karl Tauber
7ed90cddf8 Theme Editor: support color preview for color functions
UIDefaultsLoader: made some private methods package private and return parsed valued type
2020-07-07 14:03:39 +02:00
Karl Tauber
283ba83cef Window decorations: use derived color for RootPane.inactiveBorderColor in FlatLightLaf.properties to be consistent with FlatDarkLaf.properties 2020-07-06 15:47:44 +02:00
Karl Tauber
468c66e842 Window decorations: hide window icon if InternalFrame.icon is null or its width or height is zero 2020-07-06 14:45:52 +02:00
Karl Tauber
f22862b0a4 InternalFrame: use default icon in internal frames (issue #122) 2020-07-06 14:41:17 +02:00
Karl Tauber
9e731cb67a Tree: fixed cell editor border 2020-07-06 12:01:53 +02:00
Karl Tauber
7f911b61a2 Window decorations: no longer honor minimum size of frames on resizing window, but still do for dialogs 2020-07-06 11:30:49 +02:00
Karl Tauber
cace4a9bfd Window decorations: center title if menu bar is embedded 2020-07-05 11:01:58 +02:00
Karl Tauber
0992e97a1a README.md: added Mapton, Pseudo Assembler IDE, Sound Analysis and RemoteLight to list of projects that use FlatLaf 2020-07-04 23:47:47 +02:00
Karl Tauber
eee101f279 Merge remote-tracking branch 'uwemock/patch-1' 2020-07-04 21:46:08 +02:00
Karl Tauber
4b9f204951 Tree: fixed selection colors when used as cell renderer in another component (e.g. in Rhino JavaScript debugger) (issue #120) 2020-07-04 17:51:13 +02:00
Karl Tauber
019804407b Window decorations: hide window border if window is maximized 2020-07-01 12:11:53 +02:00
Karl Tauber
65b54ced7a Window decorations: made most fields protected for extending/subclassing 2020-07-01 10:49:18 +02:00
Karl Tauber
a308114b2f Window decorations:
- use window border color from UI defaults
- support "active" and "inactive" window border colors
- better window border colors for dark themes
2020-07-01 10:37:08 +02:00
Karl Tauber
41da023bdd hide focus indicator when the containing window became inactive 2020-07-01 00:21:22 +02:00
Karl Tauber
19fcb6a82c refactored some anonymous classes into nested classes for easier extending/subclassing 2020-06-30 17:02:48 +02:00
uwemock
221a18c119 Update README.md
Added my project that uses FlatLaf
2020-05-20 07:20:42 +02:00
114 changed files with 6923 additions and 1346 deletions

View File

@@ -1,6 +1,74 @@
FlatLaf Change Log
==================
## 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
- Custom window decorations (Windows 10 only; PR #108; issues #47 and #82)

View File

@@ -82,6 +82,7 @@ Projects using FlatLaf
- [jclasslib bytecode viewer](https://github.com/ingokegel/jclasslib) 5.5
- [KeyStore Explorer](https://keystore-explorer.org/) 5.4.3
- [OWASP Zed Attack Proxy (ZAP)](https://www.zaproxy.org/) (in weekly releases)
- ![New](images/new.svg) [jAlbum](https://jalbum.net/) 21 (commercial)
- [XMLmind XML Editor](https://www.xmlmind.com/xmleditor/) 9.3 (commercial)
- [Total Validator](https://www.totalvalidator.com/) 15 (commercial)
- [j-lawyer](https://github.com/jlawyerorg/j-lawyer-org)
@@ -98,8 +99,15 @@ Projects using FlatLaf
[mendelson AS2](https://mendelson-e-c.com/as2/),
[AS4](https://mendelson-e-c.com/as4/) and
[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)
- [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...

View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/
val releaseVersion = "0.37"
val developmentVersion = "0.38-SNAPSHOT"
val releaseVersion = "0.40"
val developmentVersion = "0.41-SNAPSHOT"
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion

View File

@@ -200,6 +200,14 @@ public interface FlatClientProperties
*/
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.
* <p>
@@ -306,6 +314,15 @@ public interface FlatClientProperties
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.
* If the client property is not set, or not an integer, defaultValue is returned.

View File

@@ -22,9 +22,11 @@ import javax.swing.KeyStroke;
import javax.swing.LookAndFeel;
import javax.swing.UIDefaults;
import javax.swing.UIDefaults.LazyValue;
import javax.swing.UIManager;
import javax.swing.plaf.InputMapUIResource;
import com.formdev.flatlaf.util.SystemInfo;
import static javax.swing.text.DefaultEditorKit.*;
import java.util.function.BooleanSupplier;
/**
* @author Karl Tauber
@@ -35,7 +37,7 @@ class FlatInputMaps
initBasicInputMaps( defaults );
initTextComponentInputMaps( defaults );
if( SystemInfo.IS_MAC )
if( SystemInfo.isMacOS )
initMacInputMaps( defaults );
}
@@ -59,7 +61,7 @@ class FlatInputMaps
mac( "alt KP_DOWN", null ), "togglePopup"
);
if( !SystemInfo.IS_MAC ) {
if( !SystemInfo.isMacOS ) {
modifyInputMap( defaults, "FileChooser.ancestorInputMap",
"F2", "editFileName",
"BACK_SPACE", "Go Up"
@@ -81,8 +83,11 @@ class FlatInputMaps
"shift ctrl TAB", "navigatePrevious"
);
modifyInputMap( defaults, "Table.ancestorInputMap",
// swap to make it consistent with List and Tree
// swap Home/End with Ctrl+Home/End to make it consistent with List and Tree
modifyInputMap( () -> {
return UIManager.getBoolean( "Table.consistentHomeEndKeyBehavior" );
},
defaults, "Table.ancestorInputMap",
"HOME", "selectFirstRow",
"END", "selectLastRow",
"shift HOME", "selectFirstRowExtendSelection",
@@ -93,7 +98,7 @@ class FlatInputMaps
mac( "shift ctrl END", null ), "selectLastColumnExtendSelection"
);
if( !SystemInfo.IS_MAC ) {
if( !SystemInfo.isMacOS ) {
modifyInputMap( defaults, "Tree.focusInputMap",
"ADD", "expand",
"SUBTRACT", "collapse"
@@ -164,7 +169,7 @@ class FlatInputMaps
"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)
"ctrl B", backwardAction,
"ctrl F", forwardAction,
@@ -211,7 +216,7 @@ class FlatInputMaps
"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)
"UP", beginLineAction,
"DOWN", endLineAction,
@@ -289,7 +294,7 @@ class FlatInputMaps
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)
"ctrl N", downAction,
"ctrl P", upAction,
@@ -574,12 +579,16 @@ class FlatInputMaps
}
private static void modifyInputMap( UIDefaults defaults, String key, Object... bindings ) {
// Note: not using `defaults.get(key)` here because this would resolve the lazy value
defaults.put( key, new LazyModifyInputMap( defaults.remove( key ), bindings ) );
modifyInputMap( null, defaults, 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 ) {
return SystemInfo.IS_MAC ? macValue : value;
return SystemInfo.isMacOS ? macValue : value;
}
//---- class LazyInputMapEx -----------------------------------------------
@@ -614,10 +623,12 @@ class FlatInputMaps
private static class LazyModifyInputMap
implements LazyValue
{
private final BooleanSupplier condition;
private final Object baseInputMap;
private final Object[] bindings;
LazyModifyInputMap( Object baseInputMap, Object[] bindings ) {
LazyModifyInputMap( BooleanSupplier condition, Object baseInputMap, Object[] bindings ) {
this.condition = condition;
this.baseInputMap = baseInputMap;
this.bindings = bindings;
}
@@ -629,6 +640,9 @@ class FlatInputMaps
? (InputMap) ((LazyValue)baseInputMap).createValue( table )
: (InputMap) baseInputMap;
if( condition != null && !condition.getAsBoolean() )
return inputMap;
// modify input map (replace or remove)
for( int i = 0; i < bindings.length; i += 2 ) {
KeyStroke keyStroke = KeyStroke.getKeyStroke( (String) bindings[i] );

View File

@@ -147,12 +147,12 @@ public abstract class FlatLaf
*/
@Override
public boolean getSupportsWindowDecorations() {
if( SystemInfo.IS_JETBRAINS_JVM_11_OR_LATER &&
SystemInfo.IS_WINDOWS_10_OR_LATER &&
if( SystemInfo.isJetBrainsJVM_11_orLater &&
SystemInfo.isWindows_10_orLater &&
JBRCustomDecorations.isSupported() )
return false;
return SystemInfo.IS_WINDOWS_10_OR_LATER;
return SystemInfo.isWindows_10_orLater;
}
@Override
@@ -187,7 +187,7 @@ public abstract class FlatLaf
@Override
public void initialize() {
if( SystemInfo.IS_MAC )
if( SystemInfo.isMacOS )
initializeAqua();
super.initialize();
@@ -201,11 +201,11 @@ public abstract class FlatLaf
mnemonicHandler.install();
// 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:
// Settings > Ease of Access > Display > Make text bigger (100% - 225%)
desktopPropertyName = "win.messagebox.font";
} else if( SystemInfo.IS_LINUX ) {
} else if( SystemInfo.isLinux ) {
// Linux/Gnome allows changing font in "Tweaks" app
desktopPropertyName = "gnome.Gtk/FontName";
@@ -315,7 +315,7 @@ public abstract class FlatLaf
String aquaLafClassName = "com.apple.laf.AquaLookAndFeel";
BasicLookAndFeel aquaLaf;
try {
if( SystemInfo.IS_JAVA_9_OR_LATER ) {
if( SystemInfo.isJava_9_orLater ) {
Method m = UIManager.class.getMethod( "createLookAndFeel", String.class );
aquaLaf = (BasicLookAndFeel) m.invoke( null, "Mac OS X" );
} else
@@ -391,7 +391,7 @@ public abstract class FlatLaf
UIDefaultsLoader.loadDefaultsFromProperties( getClass(), addons, getAdditionalDefaults(), isDark(), defaults );
// 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" );
// add defaults necessary for AquaMenuBarUI
@@ -435,17 +435,17 @@ public abstract class FlatLaf
private void initFonts( UIDefaults defaults ) {
FontUIResource uiFont = null;
if( SystemInfo.IS_WINDOWS ) {
if( SystemInfo.isWindows ) {
Font winFont = (Font) Toolkit.getDefaultToolkit().getDesktopProperty( "win.messagebox.font" );
if( winFont != null )
uiFont = createCompositeFont( winFont.getFamily(), winFont.getStyle(), winFont.getSize() );
} else if( SystemInfo.IS_MAC ) {
} else if( SystemInfo.isMacOS ) {
String fontName;
if( SystemInfo.IS_MAC_OS_10_15_CATALINA_OR_LATER ) {
if( SystemInfo.isMacOS_10_15_Catalina_orLater ) {
// use Helvetica Neue font
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
fontName = ".SF NS Text";
} else {
@@ -455,7 +455,7 @@ public abstract class FlatLaf
uiFont = createCompositeFont( fontName, Font.PLAIN, 13 );
} else if( SystemInfo.IS_LINUX ) {
} else if( SystemInfo.isLinux ) {
Font font = LinuxFontPolicy.getFont();
uiFont = (font instanceof FontUIResource) ? (FontUIResource) font : new FontUIResource( font );
}
@@ -515,7 +515,7 @@ public abstract class FlatLaf
}
private void putAATextInfo( UIDefaults defaults ) {
if( SystemInfo.IS_JAVA_9_OR_LATER ) {
if( SystemInfo.isJava_9_orLater ) {
Object desktopHints = Toolkit.getDefaultToolkit().getDesktopProperty( DESKTOPFONTHINTS );
if( desktopHints instanceof Map ) {
@SuppressWarnings( "unchecked" )

View File

@@ -39,6 +39,14 @@ public interface FlatSystemProperties
*/
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.
* By default, if not running in a JetBrains Runtime, the Liberation Sans font

View File

@@ -147,6 +147,10 @@ public class IntelliJTheme
applyColorPalette( 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
Object panelBackground = defaults.get( "Panel.background" );
defaults.put( "Button.disabledBackground", panelBackground );
@@ -259,6 +263,9 @@ public class IntelliJTheme
for( Map.Entry<String, Object> e : ((Map<String, Object>)value).entrySet() )
apply( key + '.' + e.getKey(), e.getValue(), defaults, defaultsKeysCache, uiKeys );
} else {
if( "".equals( value ) )
return; // ignore empty value
uiKeys.add( key );
// fix ComboBox size and Spinner border in all Material UI Lite themes
@@ -412,6 +419,10 @@ public class IntelliJTheme
String newKey = checkboxKeyMapping.get( key );
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 );
if( color != null ) {
defaults.put( newKey, color );
@@ -444,17 +455,24 @@ public class IntelliJTheme
// remove hover and pressed colors
if( checkboxModified ) {
defaults.remove( "CheckBox.icon.focusWidth" );
defaults.remove( "CheckBox.icon.hoverBorderColor" );
defaults.remove( "CheckBox.icon.focusedBackground" );
defaults.remove( "CheckBox.icon.hoverBackground" );
defaults.remove( "CheckBox.icon.pressedBackground" );
defaults.remove( "CheckBox.icon.selectedFocusedBackground" );
defaults.remove( "CheckBox.icon.selectedHoverBackground" );
defaults.remove( "CheckBox.icon.selectedPressedBackground" );
}
// copy values
for( Map.Entry<String, String> e : uiKeyCopying.entrySet() )
defaults.put( e.getKey(), defaults.get( e.getValue() ) );
defaults.remove( "CheckBox.icon[filled].focusWidth" );
defaults.remove( "CheckBox.icon[filled].hoverBorderColor" );
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<>();
@@ -499,6 +517,8 @@ public class IntelliJTheme
uiKeyMapping.put( "ProgressBar.foreground", "" ); // ignore
uiKeyMapping.put( "ProgressBar.trackColor", "ProgressBar.background" );
uiKeyMapping.put( "ProgressBar.progressColor", "ProgressBar.foreground" );
uiKeyCopying.put( "ProgressBar.selectionForeground", "ProgressBar.background" );
uiKeyCopying.put( "ProgressBar.selectionBackground", "ProgressBar.foreground" );
// ScrollBar
uiKeyMapping.put( "ScrollBar.trackColor", "ScrollBar.track" );

View File

@@ -39,7 +39,7 @@ import com.formdev.flatlaf.util.UIScale;
class LinuxFontPolicy
{
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)
// --> use Liberation Sans font
if( family.startsWith( "Ubuntu" ) &&
!SystemInfo.IS_JETBRAINS_JVM &&
!SystemInfo.isJetBrainsJVM &&
!FlatSystemProperties.getBoolean( FlatSystemProperties.USE_UBUNTU_FONT, false ) )
family = "Liberation Sans";

View File

@@ -71,13 +71,13 @@ class MnemonicHandler
@Override
public boolean postProcessKeyEvent( KeyEvent e ) {
int keyCode = e.getKeyCode();
if( SystemInfo.IS_MAC ) {
if( SystemInfo.isMacOS ) {
// Ctrl+Alt keys must be pressed on Mac
if( keyCode == KeyEvent.VK_CONTROL || keyCode == KeyEvent.VK_ALT )
showMnemonics( shouldShowMnemonics( e ) && e.isControlDown() && e.isAltDown(), e.getComponent() );
} else {
// Alt key must be pressed on Windows and Linux
if( SystemInfo.IS_WINDOWS )
if( SystemInfo.isWindows )
return processKeyEventOnWindows( e );
if( keyCode == KeyEvent.VK_ALT )

View File

@@ -144,9 +144,9 @@ class UIDefaultsLoader
// handle platform specific properties
String platformPrefix =
SystemInfo.IS_WINDOWS ? "[win]" :
SystemInfo.IS_MAC ? "[mac]" :
SystemInfo.IS_LINUX ? "[linux]" : "[unknown]";
SystemInfo.isWindows ? "[win]" :
SystemInfo.isMacOS ? "[mac]" :
SystemInfo.isLinux ? "[linux]" : "[unknown]";
for( String key : platformSpecificKeys ) {
Object value = properties.remove( key );
if( key.startsWith( platformPrefix ) )
@@ -154,8 +154,11 @@ class UIDefaultsLoader
}
}
Function<String, String> propertiesGetter = key -> {
return properties.getProperty( key );
};
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
@@ -165,9 +168,10 @@ class UIDefaultsLoader
if( !key.startsWith( GLOBAL_PREFIX ) )
continue;
String value = resolveValue( properties, (String) e.getValue() );
String value = resolveValue( (String) e.getValue(), propertiesGetter );
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 ) {
logParseError( Level.SEVERE, key, value, ex );
}
@@ -190,9 +194,9 @@ class UIDefaultsLoader
if( key.startsWith( VARIABLE_PREFIX ) || key.startsWith( GLOBAL_PREFIX ) )
continue;
String value = resolveValue( properties, (String) e.getValue() );
String value = resolveValue( (String) e.getValue(), propertiesGetter );
try {
defaults.put( key, parseValue( key, value, resolver, addonClassLoaders ) );
defaults.put( key, parseValue( key, value, null, resolver, addonClassLoaders ) );
} catch( RuntimeException ex ) {
logParseError( Level.SEVERE, key, value, ex );
}
@@ -206,7 +210,10 @@ class UIDefaultsLoader
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 ) )
value = value.substring( PROPERTY_PREFIX.length() );
else if( !value.startsWith( VARIABLE_PREFIX ) )
@@ -218,7 +225,7 @@ class UIDefaultsLoader
optional = true;
}
String newValue = properties.getProperty( value );
String newValue = propertiesGetter.apply( value );
if( newValue == null ) {
if( optional )
return "null";
@@ -226,29 +233,40 @@ class UIDefaultsLoader
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,
SCALEDINTEGER, SCALEDFLOAT, SCALEDINSETS, SCALEDDIMENSION, INSTANCE, CLASS, GRAYFILTER }
enum ValueType { UNKNOWN, STRING, BOOLEAN, CHARACTER, INTEGER, FLOAT, BORDER, ICON, INSETS, DIMENSION, COLOR,
SCALEDINTEGER, SCALEDFLOAT, SCALEDINSETS, SCALEDDIMENSION, INSTANCE, CLASS, GRAYFILTER, NULL, LAZY }
private static ValueType[] tempResultValueType = new ValueType[1];
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();
// null, false, true
switch( value ) {
case "null": return null;
case "false": return false;
case "true": return true;
case "null": resultValueType[0] = ValueType.NULL; return null;
case "false": resultValueType[0] = ValueType.BOOLEAN; return false;
case "true": resultValueType[0] = ValueType.BOOLEAN; return true;
}
// check for function "lazy"
// Syntax: lazy(uiKey)
if( value.startsWith( "lazy(" ) && value.endsWith( ")" ) ) {
resultValueType[0] = ValueType.LAZY;
String uiKey = value.substring( 5, value.length() - 1 ).trim();
return (LazyValue) t -> {
return lazyUIManagerGet( uiKey );
@@ -301,6 +319,8 @@ class UIDefaultsLoader
valueType = ValueType.GRAYFILTER;
}
resultValueType[0] = valueType;
// parse value
switch( valueType ) {
case STRING: return value;
@@ -323,20 +343,27 @@ class UIDefaultsLoader
default:
// colors
Object color = parseColorOrFunction( value, resolver, false );
if( color != null )
if( color != null ) {
resultValueType[0] = ValueType.COLOR;
return color;
}
// integer
Integer integer = parseInteger( value, false );
if( integer != null )
if( integer != null ) {
resultValueType[0] = ValueType.INTEGER;
return integer;
}
// float
Float f = parseFloat( value, false );
if( f != null )
if( f != null ) {
resultValueType[0] = ValueType.FLOAT;
return f;
}
// string
resultValueType[0] = ValueType.STRING;
return value;
}
}
@@ -612,6 +639,8 @@ class UIDefaultsLoader
// parse base color
String resolvedColorStr = resolver.apply( colorStr );
ColorUIResource baseColor = (ColorUIResource) parseColorOrFunction( resolvedColorStr, resolver, reportError );
if( baseColor == null )
return null;
// apply this function to base color
Color newColor = ColorFunctions.applyFunctions( baseColor, function );

View File

@@ -43,24 +43,24 @@ import com.formdev.flatlaf.util.DerivedColor;
* 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,
* 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
* {@link FlatUIUtils#paintParentBackground} to paint the empty space correctly.
*
* @uiDefault Component.focusWidth int
* @uiDefault Component.innerFocusWidth int or float
* @uiDefault Component.focusColor Color
* @uiDefault Component.borderColor Color
* @uiDefault Component.disabledBorderColor Color
* @uiDefault Component.focusedBorderColor Color
* @uiDefault Component.focusWidth int
* @uiDefault Component.innerFocusWidth int or float
* @uiDefault Component.focusColor Color
* @uiDefault Component.borderColor Color
* @uiDefault Component.disabledBorderColor Color
* @uiDefault Component.focusedBorderColor Color
*
* @uiDefault Component.error.borderColor Color
* @uiDefault Component.error.focusedBorderColor Color
* @uiDefault Component.warning.borderColor Color
* @uiDefault Component.warning.focusedBorderColor Color
* @uiDefault Component.custom.borderColor Color
* @uiDefault Component.error.borderColor Color
* @uiDefault Component.error.focusedBorderColor Color
* @uiDefault Component.warning.borderColor Color
* @uiDefault Component.warning.focusedBorderColor Color
* @uiDefault Component.custom.borderColor Color
*
* @author Karl Tauber
*/
@@ -87,22 +87,23 @@ public class FlatBorder
try {
FlatUIUtils.setRenderingHints( g2 );
boolean isCellEditor = isTableCellEditor( c );
float focusWidth = isCellEditor ? 0 : scale( (float) getFocusWidth( c ) );
float focusWidth = scale( (float) getFocusWidth( 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 );
// paint outer border
if( outlineColor != null || isFocused( c ) ) {
float innerFocusWidth = !(c instanceof JScrollPane)
? (outlineColor != null ? innerOutlineWidth : this.innerFocusWidth)
float innerWidth = !isCellEditor( c ) && !(c instanceof JScrollPane)
? (outlineColor != null ? innerOutlineWidth : innerFocusWidth)
: 0;
g2.setColor( (outlineColor != null) ? outlineColor : getFocusColor( c ) );
FlatUIUtils.paintComponentOuterBorder( g2, x, y, width, height, focusWidth,
scale( (float) getLineWidth( c ) ) + scale( innerFocusWidth ), arc );
FlatUIUtils.paintComponentOuterBorder( g2, x, y, width, height,
focusWidth, borderWidth + scale( innerWidth ), arc );
}
// paint border
g2.setPaint( (outlineColor != null) ? outlineColor : getBorderColor( c ) );
FlatUIUtils.paintComponentBorder( g2, x, y, width, height, focusWidth, borderWidth, arc );
} 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 ) {
if( !(c instanceof JComponent) )
return null;
@@ -192,14 +197,13 @@ public class FlatBorder
return FlatUIUtils.isPermanentFocusOwner( c );
}
protected boolean isTableCellEditor( Component c ) {
return FlatUIUtils.isTableCellEditor( c );
protected boolean isCellEditor( Component c ) {
return FlatUIUtils.isCellEditor( c );
}
@Override
public Insets getBorderInsets( Component c, Insets insets ) {
boolean isCellEditor = isTableCellEditor( c );
float focusWidth = isCellEditor ? 0 : scale( (float) getFocusWidth( c ) );
float focusWidth = scale( (float) getFocusWidth( c ) );
float ow = focusWidth + scale( (float) getLineWidth( c ) );
insets = super.getBorderInsets( c, insets );
@@ -207,6 +211,18 @@ public class FlatBorder
insets.left = Math.round( scale( (float) insets.left ) + ow );
insets.bottom = Math.round( scale( (float) insets.bottom ) + 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;
}
@@ -214,6 +230,9 @@ public class FlatBorder
* Returns the (unscaled) thickness of the outer focus border.
*/
protected int getFocusWidth( Component c ) {
if( isCellEditor( c ) )
return 0;
return focusWidth;
}

View File

@@ -42,6 +42,7 @@ import com.formdev.flatlaf.util.UIScale;
* @uiDefault Button.default.hoverBorderColor Color optional
* @uiDefault Button.default.focusedBorderColor Color
* @uiDefault Button.default.focusColor Color
* @uiDefault Button.borderWidth int
* @uiDefault Button.default.borderWidth int
* @uiDefault Button.toolbar.margin 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 defaultFocusedBorderColor = UIManager.getColor( "Button.default.focusedBorderColor" );
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 Insets toolbarMargin = UIManager.getInsets( "Button.toolbar.margin" );
protected final Insets toolbarSpacingInsets = UIManager.getInsets( "Button.toolbar.spacingInsets" );
@@ -134,11 +136,14 @@ public class FlatButtonBorder
@Override
protected int getBorderWidth( Component c ) {
return FlatButtonUI.isDefaultButton( c ) ? defaultBorderWidth : super.getBorderWidth( c );
return FlatButtonUI.isDefaultButton( c ) ? defaultBorderWidth : borderWidth;
}
@Override
protected int getArc( Component c ) {
if( isCellEditor( c ) )
return 0;
switch( FlatButtonUI.getButtonType( c ) ) {
case FlatButtonUI.TYPE_SQUARE: return 0;
case FlatButtonUI.TYPE_ROUND_RECT: return Short.MAX_VALUE;

View File

@@ -202,13 +202,7 @@ public class FlatButtonUI
@Override
protected BasicButtonListener createButtonListener( AbstractButton b ) {
return new BasicButtonListener( b ) {
@Override
public void propertyChange( PropertyChangeEvent e ) {
super.propertyChange( e );
FlatButtonUI.this.propertyChange( b, e );
}
};
return new FlatButtonListener( b );
}
protected void propertyChange( AbstractButton b, PropertyChangeEvent e ) {
@@ -475,4 +469,23 @@ public class FlatButtonUI
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 );
}
}
}

View File

@@ -47,6 +47,7 @@ import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollBar;
import javax.swing.JTextField;
import javax.swing.KeyStroke;
import javax.swing.ListCellRenderer;
@@ -119,7 +120,7 @@ public class FlatComboBoxUI
protected Color buttonHoverArrowColor;
private MouseListener hoverListener;
private boolean hover;
protected boolean hover;
private WeakReference<Component> lastRendererComponent;
@@ -306,7 +307,7 @@ public class FlatComboBoxUI
updateEditorColors();
// 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
// because text field on macOS already handle those keys
InputMap inputMap = ((JTextComponent)editor).getInputMap();
@@ -332,14 +333,7 @@ public class FlatComboBoxUI
@Override
protected JButton createArrowButton() {
return new FlatArrowButton( SwingConstants.SOUTH, arrowType, buttonArrowColor,
buttonDisabledArrowColor, buttonHoverArrowColor, null )
{
@Override
protected boolean isHover() {
return super.isHover() || (!comboBox.isEditable() ? hover : false);
}
};
return new FlatComboBoxButton();
}
@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 -----------------------------------------------
@SuppressWarnings( { "rawtypes", "unchecked" } )
@@ -530,13 +545,26 @@ public class FlatComboBoxUI
@Override
protected Rectangle computePopupBounds( int px, int py, int pw, int ph ) {
// get maximum display size of all items
Dimension displaySize = getDisplaySize();
// get maximum display width of all items
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
if( displaySize.width > pw ) {
int diff = displaySize.width - pw;
pw = displaySize.width;
if( displayWidth > pw ) {
int diff = displayWidth - pw;
pw = displayWidth;
if( !comboBox.getComponentOrientation().isLeftToRight() )
px -= diff;

View File

@@ -26,13 +26,14 @@ import java.beans.PropertyChangeListener;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import javax.swing.border.Border;
import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
import com.formdev.flatlaf.util.ScaledImageIcon;
import com.formdev.flatlaf.util.UIScale;
/**
@@ -91,7 +92,21 @@ public class FlatInternalFrameTitlePane
updateFrameIcon();
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.setOpaque( false );
@@ -103,14 +118,16 @@ public class FlatInternalFrameTitlePane
add( buttonPanel, BorderLayout.LINE_END );
}
private void updateFrameIcon() {
protected void updateFrameIcon() {
Icon frameIcon = frame.getFrameIcon();
if( frameIcon == UIManager.getIcon( "InternalFrame.icon" ) )
if( frameIcon != null && (frameIcon.getIconWidth() == 0 || frameIcon.getIconHeight() == 0) )
frameIcon = null;
else if( frameIcon instanceof ImageIcon )
frameIcon = new ScaledImageIcon( (ImageIcon) frameIcon );
titleLabel.setIcon( frameIcon );
}
private void updateColors() {
protected void updateColors() {
Color background = FlatUIUtils.nonUIResource( frame.isSelected() ? selectedTitleColor : notSelectedTitleColor );
Color foreground = FlatUIUtils.nonUIResource( frame.isSelected() ? selectedTextColor : notSelectedTextColor );
@@ -123,7 +140,7 @@ public class FlatInternalFrameTitlePane
closeButton.setForeground( foreground );
}
private void updateButtonsVisibility() {
protected void updateButtonsVisibility() {
iconButton.setVisible( frame.isIconifiable() );
maxButton.setVisible( frame.isMaximizable() );
closeButton.setVisible( frame.isClosable() );
@@ -150,7 +167,7 @@ public class FlatInternalFrameTitlePane
//---- class FlatPropertyChangeHandler ------------------------------------
private class FlatPropertyChangeHandler
protected class FlatPropertyChangeHandler
extends PropertyChangeHandler
{
@Override

View File

@@ -17,6 +17,7 @@
package com.formdev.flatlaf.ui;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import javax.swing.JComponent;
@@ -106,7 +107,11 @@ public class FlatListUI
@Override
public void focusLost( FocusEvent e ) {
super.focusLost( e );
toggleSelectionColors();
// use invokeLater for the case that the window is deactivated
EventQueue.invokeLater( () -> {
toggleSelectionColors();
} );
}
};
}

View File

@@ -82,7 +82,7 @@ public class FlatMenuBarUI
JMenuBar menuBar = (JMenuBar) e.getSource();
JMenu menu = menuBar.getMenu( 0 );
if( menu != null ) {
MenuSelectionManager.defaultManager().setSelectedPath( SystemInfo.IS_WINDOWS
MenuSelectionManager.defaultManager().setSelectedPath( SystemInfo.isWindows
? new MenuElement[] { menuBar, menu }
: new MenuElement[] { menuBar, menu, menu.getPopupMenu() } );

View File

@@ -41,6 +41,7 @@ import javax.swing.text.View;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.util.Graphics2DProxy;
import com.formdev.flatlaf.util.HiDPIUtils;
import com.formdev.flatlaf.util.SystemInfo;
/**
* Renderer for menu items.
@@ -418,36 +419,78 @@ debug*/
private KeyStroke cachedAccelerator;
private String cachedAcceleratorText;
private boolean cachedAcceleratorLeftToRight;
private String getAcceleratorText() {
KeyStroke accelerator = menuItem.getAccelerator();
if( accelerator == null )
return null;
if( accelerator == cachedAccelerator )
boolean leftToRight = menuItem.getComponentOrientation().isLeftToRight();
if( accelerator == cachedAccelerator && leftToRight == cachedAcceleratorLeftToRight )
return cachedAcceleratorText;
cachedAccelerator = accelerator;
cachedAcceleratorText = getTextForAccelerator( accelerator );
cachedAcceleratorLeftToRight = leftToRight;
return cachedAcceleratorText;
}
protected String getTextForAccelerator( KeyStroke accelerator ) {
StringBuilder buf = new StringBuilder();
int modifiers = accelerator.getModifiers();
if( modifiers != 0 )
buf.append( InputEvent.getModifiersExText( modifiers ) ).append( acceleratorDelimiter );
boolean leftToRight = menuItem.getComponentOrientation().isLeftToRight();
// 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();
if( keyCode != 0 )
buf.append( KeyEvent.getKeyText( keyCode ) );
else
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();
}
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 --------------------------------------------------
private class MinSizeIcon

View File

@@ -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
protected Dimension getPreferredMenuItemSize( JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap ) {
return renderer.getPreferredMenuItemSize();

View File

@@ -32,6 +32,7 @@ import java.lang.reflect.Method;
import javax.swing.JComponent;
import javax.swing.JLayeredPane;
import javax.swing.JPanel;
import javax.swing.JToolTip;
import javax.swing.Popup;
import javax.swing.PopupFactory;
import javax.swing.RootPaneContainer;
@@ -62,7 +63,7 @@ public class FlatPopupFactory
return new NonFlashingPopup( super.getPopup( owner, contents, x, y ), contents );
// 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 );
if( popup == null )
popup = super.getPopup( owner, contents, x, y );
@@ -105,7 +106,7 @@ public class FlatPopupFactory
throws IllegalArgumentException
{
try {
if( SystemInfo.IS_JAVA_9_OR_LATER ) {
if( SystemInfo.isJava_9_orLater ) {
if( java9getPopupMethod == null ) {
java9getPopupMethod = PopupFactory.class.getDeclaredMethod(
"getPopup", Component.class, Component.class, int.class, int.class, boolean.class );
@@ -132,6 +133,7 @@ public class FlatPopupFactory
extends Popup
{
private Popup delegate;
private Component contents;
// heavy weight
protected Window popupWindow;
@@ -139,6 +141,7 @@ public class FlatPopupFactory
NonFlashingPopup( Popup delegate, Component contents ) {
this.delegate = delegate;
this.contents = contents;
popupWindow = SwingUtilities.windowForComponent( contents );
if( popupWindow != null ) {
@@ -153,8 +156,25 @@ public class FlatPopupFactory
@Override
public void show() {
if( delegate != null )
if( delegate != null ) {
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
@@ -162,6 +182,7 @@ public class FlatPopupFactory
if( delegate != null ) {
delegate.hide();
delegate = null;
contents = null;
}
if( popupWindow != null ) {

View File

@@ -20,12 +20,13 @@ import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.LayoutManager;
import java.awt.LayoutManager2;
import java.awt.Toolkit;
import java.awt.Window;
import java.beans.PropertyChangeEvent;
import java.util.function.Function;
import javax.swing.JComponent;
@@ -51,12 +52,15 @@ import com.formdev.flatlaf.util.SystemInfo;
* <!-- FlatRootPaneUI -->
*
* @uiDefault RootPane.border Border
* @uiDefault RootPane.activeBorderColor Color
* @uiDefault RootPane.inactiveBorderColor Color
*
* <!-- FlatWindowResizer -->
*
* @uiDefault RootPane.borderDragThickness int
* @uiDefault RootPane.cornerDragWidth int
* @uiDefault RootPane.honorMinimumSizeOnResize boolean
* @uiDefault RootPane.honorFrameMinimumSizeOnResize boolean
* @uiDefault RootPane.honorDialogMinimumSizeOnResize boolean
*
* @author Karl Tauber
*/
@@ -65,12 +69,13 @@ public class FlatRootPaneUI
{
// check this field before using class JBRCustomDecorations to avoid unnecessary loading of that class
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 FlatWindowResizer windowResizer;
public static ComponentUI createUI( JComponent c ) {
return new FlatRootPaneUI();
@@ -114,7 +119,7 @@ public class FlatRootPaneUI
}
// 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();
boolean isDark = laf instanceof FlatLaf && ((FlatLaf)laf).isDark();
c.putClientProperty( "jetbrains.awt.windowDarkAppearance", isDark );
@@ -299,6 +304,9 @@ public class FlatRootPaneUI
Container contentPane = rootPane.getContentPane();
if( contentPane != null )
contentPane.setBounds( 0, nextY, width, Math.max( height - nextY, 0 ) );
if( titlePane != null )
titlePane.menuBarLayouted();
}
@Override
@@ -323,24 +331,45 @@ public class FlatRootPaneUI
public static class FlatWindowBorder
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() {
super( 1, 1, 1, 1 );
}
@Override
public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) {
Object borderColorObj = Toolkit.getDefaultToolkit().getDesktopProperty(
"win.frame.activeBorderColor" );
Color borderColor = (borderColorObj instanceof Color)
? (Color) borderColorObj
: UIManager.getColor( "windowBorder" );
public Insets getBorderInsets( Component c, Insets insets ) {
if( isWindowMaximized( c ) ) {
// hide border if window is maximized
insets.top = insets.left = insets.bottom = insets.right = 0;
return insets;
} 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 );
}
private void paintImpl( Graphics2D g, int x, int y, int width, int height, double scaleFactor ) {
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;
}
}
}

View File

@@ -33,6 +33,10 @@ public class FlatRoundBorder
@Override
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;
}
}

View File

@@ -198,46 +198,12 @@ public class FlatScrollBarUI
@Override
protected JButton createDecreaseButton( int orientation ) {
return createArrowButton( orientation );
return new FlatScrollBarButton( orientation );
}
@Override
protected JButton createIncreaseButton( int orientation ) {
return createArrowButton( 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;
return new FlatScrollBarButton( orientation );
}
protected boolean isShowButtons() {
@@ -318,12 +284,12 @@ public class FlatScrollBarUI
@Override
protected Dimension getMinimumThumbSize() {
return UIScale.scale( super.getMinimumThumbSize() );
return UIScale.scale( FlatUIUtils.addInsets( super.getMinimumThumbSize(), thumbInsets ) );
}
@Override
protected Dimension getMaximumThumbSize() {
return UIScale.scale( super.getMaximumThumbSize() );
return UIScale.scale( FlatUIUtils.addInsets( super.getMaximumThumbSize(), thumbInsets ) );
}
//---- class ScrollBarHoverListener ---------------------------------------
@@ -377,4 +343,49 @@ public class FlatScrollBarUI
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();
}
}
}

View File

@@ -114,10 +114,7 @@ public class FlatScrollPaneUI
return new BasicScrollPaneUI.MouseWheelHandler() {
@Override
public void mouseWheelMoved( MouseWheelEvent e ) {
// 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).
if( UIManager.getBoolean( "ScrollPane.smoothScrolling" ) &&
if( isSmoothScrollingEnabled() &&
scrollpane.isWheelScrollingEnabled() &&
e.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL &&
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 void mouseWheelMovedSmooth( MouseWheelEvent e ) {

View File

@@ -87,10 +87,10 @@ public class FlatSplitPaneUI
//---- class FlatSplitPaneDivider -----------------------------------------
private class FlatSplitPaneDivider
protected class FlatSplitPaneDivider
extends BasicSplitPaneDivider
{
public FlatSplitPaneDivider( BasicSplitPaneUI ui ) {
protected FlatSplitPaneDivider( BasicSplitPaneUI ui ) {
super( ui );
}

View File

@@ -18,6 +18,7 @@ package com.formdev.flatlaf.ui;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import javax.swing.JCheckBox;
@@ -70,6 +71,10 @@ import com.formdev.flatlaf.util.UIScale;
* @uiDefault Table.cellFocusColor Color
* @uiDefault Table.showCellFocusIndicator boolean
*
* <!-- FlatInputMaps -->
*
* @uiDefault Table.consistentHomeEndKeyBehavior boolean
*
* @author Karl Tauber
*/
public class FlatTableUI
@@ -92,16 +97,6 @@ public class FlatTableUI
return new FlatTableUI();
}
@Override
public void installUI( JComponent c ) {
super.installUI( c );
}
@Override
public void uninstallUI( JComponent c ) {
super.uninstallUI( c );
}
@Override
protected void installDefaults() {
super.installDefaults();
@@ -174,7 +169,11 @@ public class FlatTableUI
@Override
public void focusLost( FocusEvent e ) {
super.focusLost( e );
toggleSelectionColors();
// use invokeLater for the case that the window is deactivated
EventQueue.invokeLater( () -> {
toggleSelectionColors();
} );
}
};
}

View File

@@ -33,6 +33,10 @@ public class FlatTextBorder
@Override
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;
}
}

View File

@@ -19,6 +19,7 @@ package com.formdev.flatlaf.ui;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.EventQueue;
@@ -55,6 +56,7 @@ import javax.swing.JLabel;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.JRootPane;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.border.AbstractBorder;
@@ -90,30 +92,31 @@ import com.formdev.flatlaf.util.UIScale;
public class FlatTitlePane
extends JComponent
{
private final Color activeBackground = UIManager.getColor( "TitlePane.background" );
private final Color inactiveBackground = UIManager.getColor( "TitlePane.inactiveBackground" );
private final Color activeForeground = UIManager.getColor( "TitlePane.foreground" );
private final Color inactiveForeground = UIManager.getColor( "TitlePane.inactiveForeground" );
private final Color embeddedForeground = UIManager.getColor( "TitlePane.embeddedForeground" );
protected final Color activeBackground = UIManager.getColor( "TitlePane.background" );
protected final Color inactiveBackground = UIManager.getColor( "TitlePane.inactiveBackground" );
protected final Color activeForeground = UIManager.getColor( "TitlePane.foreground" );
protected final Color inactiveForeground = UIManager.getColor( "TitlePane.inactiveForeground" );
protected final Color embeddedForeground = UIManager.getColor( "TitlePane.embeddedForeground" );
private final Insets menuBarMargins = UIManager.getInsets( "TitlePane.menuBarMargins" );
private final Dimension iconSize = UIManager.getDimension( "TitlePane.iconSize" );
private final int buttonMaximizedHeight = UIManager.getInt( "TitlePane.buttonMaximizedHeight" );
protected final Insets menuBarMargins = UIManager.getInsets( "TitlePane.menuBarMargins" );
protected final Dimension iconSize = UIManager.getDimension( "TitlePane.iconSize" );
protected final int buttonMaximizedHeight = UIManager.getInt( "TitlePane.buttonMaximizedHeight" );
private final JRootPane rootPane;
protected final JRootPane rootPane;
private JPanel leftPanel;
private JLabel iconLabel;
private JComponent menuBarPlaceholder;
private JLabel titleLabel;
private JPanel buttonPanel;
private JButton iconifyButton;
private JButton maximizeButton;
private JButton restoreButton;
private JButton closeButton;
protected JPanel leftPanel;
protected JLabel iconLabel;
protected JComponent menuBarPlaceholder;
protected JLabel titleLabel;
protected JPanel buttonPanel;
protected JButton iconifyButton;
protected JButton maximizeButton;
protected JButton restoreButton;
protected JButton closeButton;
protected Window window;
private final Handler handler;
private Window window;
public FlatTitlePane( JRootPane rootPane ) {
this.rootPane = rootPane;
@@ -163,7 +166,25 @@ public class FlatTitlePane
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( titleLabel, BorderLayout.CENTER );
add( buttonPanel, BorderLayout.LINE_END );
@@ -217,14 +238,17 @@ public class FlatTitlePane
}
protected void activeChanged( boolean active ) {
boolean hasEmbeddedMenuBar = rootPane.getJMenuBar() != null && isMenuBarEmbedded();
Color background = FlatUIUtils.nonUIResource( active ? activeBackground : inactiveBackground );
Color foreground = FlatUIUtils.nonUIResource( active
? (rootPane.getJMenuBar() != null && isMenuBarEmbedded() ? embeddedForeground : activeForeground)
? (hasEmbeddedMenuBar ? embeddedForeground : activeForeground)
: inactiveForeground );
setBackground( background );
titleLabel.setForeground( foreground );
titleLabel.setHorizontalAlignment( hasEmbeddedMenuBar ? SwingConstants.CENTER : SwingConstants.LEADING );
// this is necessary because hover/pressed colors are derived from background color
iconifyButton.setBackground( background );
maximizeButton.setBackground( background );
@@ -244,6 +268,26 @@ public class FlatTitlePane
iconifyButton.setVisible( true );
maximizeButton.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 {
// hide buttons because they are only supported in frames
iconifyButton.setVisible( false );
@@ -275,6 +319,8 @@ public class FlatTitlePane
else {
// no icon set on window --> use default icon
Icon defaultIcon = UIManager.getIcon( "InternalFrame.icon" );
if( defaultIcon != null && (defaultIcon.getIconWidth() == 0 || defaultIcon.getIconHeight() == 0) )
defaultIcon = null;
if( defaultIcon != null ) {
if( defaultIcon instanceof ImageIcon )
defaultIcon = new ScaledImageIcon( (ImageIcon) defaultIcon, iconSize.width, iconSize.height );
@@ -364,6 +410,12 @@ public class FlatTitlePane
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() {
menuBarPlaceholder.invalidate();
@@ -373,18 +425,43 @@ public class FlatTitlePane
} );
}
protected Insets getMenuBarMargins() {
return getComponentOrientation().isLeftToRight()
? menuBarMargins
: new Insets( menuBarMargins.top, menuBarMargins.right, menuBarMargins.bottom, menuBarMargins.left );
protected void menuBarLayouted() {
updateJBRHitTestSpotsAndTitleBarHeightLater();
}
/*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
protected void paintComponent( Graphics g ) {
g.setColor( getBackground() );
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.
*/
@@ -404,11 +481,24 @@ public class FlatTitlePane
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
// (if not running in JBR and if not modified from the application)
Rectangle oldMaximizedBounds = frame.getMaximizedBounds();
if( !hasJBRCustomDecoration() &&
(frame.getMaximizedBounds() == null ||
Objects.equals( frame.getMaximizedBounds(), rootPane.getClientProperty( "_flatlaf.maximizedBounds" ) )) )
(oldMaximizedBounds == null ||
Objects.equals( oldMaximizedBounds, rootPane.getClientProperty( "_flatlaf.maximizedBounds" ) )) )
{
GraphicsConfiguration gc = window.getGraphicsConfiguration();
@@ -429,7 +519,7 @@ public class FlatTitlePane
int maximizedWidth = screenBounds.width;
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
maximizedX = 0;
maximizedY = 0;
@@ -449,22 +539,36 @@ public class FlatTitlePane
// (see https://bugs.openjdk.java.net/browse/JDK-8231564 and
// https://bugs.openjdk.java.net/browse/JDK-8176359)
// and except for Java 8 on secondary screens where primary screen is scaled
Rectangle maximizedBounds = new Rectangle(
Rectangle newMaximizedBounds = new Rectangle(
maximizedX + screenInsets.left,
maximizedY + screenInsets.top,
maximizedWidth - screenInsets.left - screenInsets.right,
maximizedHeight - screenInsets.top - screenInsets.bottom );
// change maximized bounds
frame.setMaximizedBounds( maximizedBounds );
if( !Objects.equals( oldMaximizedBounds, newMaximizedBounds ) ) {
// change maximized bounds
frame.setMaximizedBounds( newMaximizedBounds );
// remember maximized bounds in client property to be able to detect
// whether maximized bounds are modified from the application
rootPane.putClientProperty( "_flatlaf.maximizedBounds", maximizedBounds );
// remember maximized bounds in client property to be able to detect
// whether maximized bounds are modified from the application
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 +623,12 @@ public class FlatTitlePane
titleBarHeight--;
JBRCustomDecorations.setHitTestSpotsAndTitleBarHeight( window, hitTestSpots, titleBarHeight );
/*debug
debugHitTestSpots = hitTestSpots;
debugTitleBarHeight = titleBarHeight;
repaint();
debug*/
}
protected void addJBRHitTestSpot( JComponent c, boolean subtractMenuBarMargins, List<Rectangle> hitTestSpots ) {
@@ -535,6 +645,11 @@ public class FlatTitlePane
hitTestSpots.add( r );
}
/*debug
private List<Rectangle> debugHitTestSpots;
private int debugTitleBarHeight;
debug*/
//---- class TitlePaneBorder ----------------------------------------------
protected class FlatTitlePaneBorder
@@ -613,6 +728,8 @@ public class FlatTitlePane
if( hasJBRCustomDecoration() )
JBRWindowTopBorder.getInstance().repaintBorder( FlatTitlePane.this );
repaintWindowBorder();
}
@Override
@@ -622,6 +739,8 @@ public class FlatTitlePane
if( hasJBRCustomDecoration() )
JBRWindowTopBorder.getInstance().repaintBorder( FlatTitlePane.this );
repaintWindowBorder();
}
@Override
@@ -720,8 +839,13 @@ public class FlatTitlePane
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 componentShown( ComponentEvent e ) {}
@Override public void componentHidden( ComponentEvent e ) {}
}
}

View File

@@ -94,6 +94,11 @@ public class FlatToolTipUI
@Override
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 ) ) {
FontMetrics fm = c.getFontMetrics( c.getFont() );
Insets insets = c.getInsets();

View File

@@ -25,6 +25,7 @@ import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.CellRendererPane;
import javax.swing.JComponent;
import javax.swing.JTree;
import javax.swing.LookAndFeel;
@@ -75,6 +76,11 @@ import com.formdev.flatlaf.util.UIScale;
* @uiDefault Tree.dropCellBackground Color
* @uiDefault Tree.dropCellForeground Color
*
* <!-- DefaultTreeCellEditor -->
*
* @uiDefault Tree.editorBorder Border
* @uiDefault Tree.editorBorderSelectionColor Color
*
* <!-- FlatTreeUI -->
*
* @uiDefault Tree.border Border
@@ -226,6 +232,11 @@ public class FlatTreeUI
boolean isSelected = tree.isRowSelected( 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
if( wideSelection && (isSelected || isDropRow) ) {
// fill background

View File

@@ -37,7 +37,9 @@ import java.awt.geom.Rectangle2D;
import java.awt.geom.RoundRectangle2D;
import java.util.function.Consumer;
import javax.swing.JComponent;
import javax.swing.JTable;
import javax.swing.LookAndFeel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.border.Border;
import javax.swing.border.CompoundBorder;
@@ -135,17 +137,44 @@ public class FlatUIUtils
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" ) );
}
/**
* 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 ) {
return (KeyboardFocusManager.getCurrentKeyboardFocusManager().getPermanentFocusOwner() == c);
KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
return keyboardFocusManager.getPermanentFocusOwner() == c &&
keyboardFocusManager.getActiveWindow() == SwingUtilities.windowForComponent( c );
}
public static boolean isRoundRect( Component c ) {
return c instanceof JComponent && FlatClientProperties.clientPropertyBoolean(
(JComponent) c, FlatClientProperties.COMPONENT_ROUND_RECT, false );
public static Boolean isRoundRect( Component c ) {
return (c instanceof JComponent)
? 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.
* <p>
* 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}).
*
* @see #paintComponentBorder
@@ -212,6 +241,9 @@ public class FlatUIUtils
public static void paintComponentOuterBorder( Graphics2D g, int x, int y, int width, int height,
float focusWidth, float lineWidth, float arc )
{
if( focusWidth + lineWidth == 0 )
return; // nothing to paint
double systemScaleFactor = UIScale.getSystemScaleFactor( g );
if( systemScaleFactor != 1 && systemScaleFactor != 2 ) {
// 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>
* The outside bounds of the painted border are
* {@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}).
*
* @see #paintComponentOuterBorder
@@ -256,6 +289,9 @@ public class FlatUIUtils
public static void paintComponentBorder( Graphics2D g, int x, int y, int width, int height,
float focusWidth, float lineWidth, float arc )
{
if( lineWidth == 0 )
return; // nothing to paint
double systemScaleFactor = UIScale.getSystemScaleFactor( g );
if( systemScaleFactor != 1 && systemScaleFactor != 2 ) {
// paint at scale 1x to avoid clipping on right and bottom edges at 125%, 150% or 175%

View File

@@ -17,8 +17,6 @@
package com.formdev.flatlaf.ui;
import static java.awt.Cursor.*;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dialog;
import java.awt.Dimension;
@@ -48,33 +46,43 @@ import com.formdev.flatlaf.util.UIScale;
* @author Karl Tauber
*/
public class FlatWindowResizer
extends JComponent
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 );
private final int cornerDragWidth = FlatUIUtils.getUIInt( "RootPane.cornerDragWidth", 16 );
private final boolean honorMinimumSizeOnResize = UIManager.getBoolean( "RootPane.honorMinimumSizeOnResize" );
protected final int borderDragThickness = FlatUIUtils.getUIInt( "RootPane.borderDragThickness", 5 );
protected final int cornerDragWidth = FlatUIUtils.getUIInt( "RootPane.cornerDragWidth", 16 );
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 ) {
this.rootPane = rootPane;
setLayout( new BorderLayout() );
add( createDragBorderComponent( NW_RESIZE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR ), BorderLayout.NORTH );
add( createDragBorderComponent( SW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR ), BorderLayout.SOUTH );
add( createDragBorderComponent( NW_RESIZE_CURSOR, W_RESIZE_CURSOR, SW_RESIZE_CURSOR ), BorderLayout.WEST );
add( createDragBorderComponent( NE_RESIZE_CURSOR, E_RESIZE_CURSOR, SE_RESIZE_CURSOR ), BorderLayout.EAST );
north = createDragBorderComponent( NW_RESIZE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR );
south = createDragBorderComponent( SW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR );
west = createDragBorderComponent( NW_RESIZE_CURSOR, W_RESIZE_CURSOR, SW_RESIZE_CURSOR );
east = createDragBorderComponent( NE_RESIZE_CURSOR, E_RESIZE_CURSOR, SE_RESIZE_CURSOR );
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.getLayeredPane().add( this, WINDOW_RESIZER_LAYER );
rootPane.addPropertyChangeListener( "ancestor", this );
if( rootPane.isDisplayable() )
setBounds( 0, 0, rootPane.getWidth(), rootPane.getHeight() );
addNotify();
}
protected DragBorderComponent createDragBorderComponent( int leadingResizeDir, int centerResizeDir, int trailingResizeDir ) {
@@ -82,14 +90,40 @@ public class FlatWindowResizer
}
public void uninstall() {
removeNotify();
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 addNotify() {
super.addNotify();
public void doLayout() {
if( !north.isVisible() )
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();
window = (parent instanceof Window) ? (Window) parent : null;
if( window instanceof Frame ) {
@@ -100,10 +134,7 @@ public class FlatWindowResizer
updateVisibility();
}
@Override
public void removeNotify() {
super.removeNotify();
protected void removeNotify() {
if( window instanceof Frame ) {
window.removePropertyChangeListener( "resizable", this );
window.removeWindowStateListener( this );
@@ -113,25 +144,26 @@ public class FlatWindowResizer
updateVisibility();
}
@Override
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() {
protected void updateVisibility() {
boolean visible = isWindowResizable();
if( visible == getComponent( 0 ).isVisible() )
if( visible == north.isVisible() )
return;
for( Component c : getComponents() )
c.setVisible( visible );
north.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 )
return ((Frame)window).isResizable() && (((Frame)window).getExtendedState() & Frame.MAXIMIZED_BOTH) == 0;
if( window instanceof Dialog )
@@ -141,7 +173,18 @@ public class FlatWindowResizer
@Override
public void propertyChange( PropertyChangeEvent e ) {
updateVisibility();
switch( e.getPropertyName() ) {
case "ancestor":
if( e.getNewValue() != null )
addNotify();
else
removeNotify();
break;
case "resizable":
updateVisibility();
break;
}
}
@Override
@@ -151,8 +194,7 @@ public class FlatWindowResizer
@Override
public void componentResized( ComponentEvent e ) {
setBounds( 0, 0, rootPane.getWidth(), rootPane.getHeight() );
validate();
doLayout();
}
@Override public void componentMoved( ComponentEvent e ) {}
@@ -200,13 +242,19 @@ public class FlatWindowResizer
return new Dimension( thickness, thickness );
}
/*debug
@Override
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.drawRect( 0, 0, getWidth() - 1, getHeight() - 1 );
}
debug*/
}
@Override
public void mouseClicked( MouseEvent e ) {
@@ -293,6 +341,9 @@ debug*/
newBounds.height += deltaHeight;
// apply minimum window size
boolean honorMinimumSizeOnResize =
(honorFrameMinimumSizeOnResize && window instanceof Frame) ||
(honorDialogMinimumSizeOnResize && window instanceof Dialog);
Dimension minimumSize = honorMinimumSizeOnResize ? window.getMinimumSize() : null;
if( minimumSize == null )
minimumSize = UIScale.scale( new Dimension( 150, 50 ) );
@@ -312,8 +363,7 @@ debug*/
window.setBounds( newBounds );
// immediately layout drag border components
FlatWindowResizer.this.setBounds( 0, 0, newBounds.width, newBounds.height );
FlatWindowResizer.this.validate();
FlatWindowResizer.this.doLayout();
if( Toolkit.getDefaultToolkit().isDynamicLayoutActive() ) {
window.validate();

View File

@@ -191,7 +191,7 @@ public class JBRCustomDecorations
initialized = true;
// 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;
if( !FlatSystemProperties.getBoolean( FlatSystemProperties.USE_JETBRAINS_CUSTOM_DECORATIONS, true ) )

View File

@@ -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 );
}
}

View File

@@ -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;
}
}

View File

@@ -117,10 +117,10 @@ public class HiDPIUtils
* This methods computes a correction value for the Y position.
*/
public static float computeTextYCorrection( Graphics2D g ) {
if( !useTextYCorrection() || !SystemInfo.IS_WINDOWS )
if( !useTextYCorrection() || !SystemInfo.isWindows )
return 0;
if( !SystemInfo.IS_JAVA_9_OR_LATER )
if( !SystemInfo.isJava_9_orLater )
return UIScale.getUserScaleFactor() > 1 ? -UIScale.scale( 0.625f ) : 0;
AffineTransform t = g.getTransform();

View File

@@ -48,10 +48,10 @@ public class JavaCompatibility
synchronized( JavaCompatibility.class ) {
if( drawStringUnderlineCharAtMethod == null ) {
try {
Class<?> cls = Class.forName( SystemInfo.IS_JAVA_9_OR_LATER
Class<?> cls = Class.forName( SystemInfo.isJava_9_orLater
? "javax.swing.plaf.basic.BasicGraphicsUtils"
: "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, Graphics.class, String.class, int.class, int.class, int.class } );
} catch( Exception ex ) {
@@ -62,7 +62,7 @@ public class JavaCompatibility
}
try {
if( SystemInfo.IS_JAVA_9_OR_LATER )
if( SystemInfo.isJava_9_orLater )
drawStringUnderlineCharAtMethod.invoke( null, c, g, text, underlinedIndex, (float) x, (float) y );
else
drawStringUnderlineCharAtMethod.invoke( null, c, g, text, underlinedIndex, x, y );

View File

@@ -27,55 +27,57 @@ import java.util.StringTokenizer;
public class SystemInfo
{
// platforms
public static final boolean IS_WINDOWS;
public static final boolean IS_MAC;
public static final boolean IS_LINUX;
public static final boolean isWindows;
public static final boolean isMacOS;
public static final boolean isLinux;
// OS versions
public static final boolean IS_WINDOWS_10_OR_LATER;
public static final boolean IS_MAC_OS_10_11_EL_CAPITAN_OR_LATER;
public static final boolean IS_MAC_OS_10_14_MOJAVE;
public static final boolean IS_MAC_OS_10_15_CATALINA_OR_LATER;
public static final long osVersion;
public static final boolean isWindows_10_orLater;
public static final boolean isMacOS_10_11_ElCapitan_orLater;
public static final boolean isMacOS_10_14_Mojave_orLater;
public static final boolean isMacOS_10_15_Catalina_orLater;
// Java versions
public static final boolean IS_JAVA_9_OR_LATER;
public static final boolean IS_JAVA_11_OR_LATER;
public static final boolean IS_JAVA_15_OR_LATER;
public static final long javaVersion;
public static final boolean isJava_9_orLater;
public static final boolean isJava_11_orLater;
public static final boolean isJava_15_orLater;
// Java VMs
public static final boolean IS_JETBRAINS_JVM;
public static final boolean IS_JETBRAINS_JVM_11_OR_LATER;
public static final boolean isJetBrainsJVM;
public static final boolean isJetBrainsJVM_11_orLater;
// UI toolkits
public static final boolean IS_KDE;
public static final boolean isKDE;
static {
// platforms
String osName = System.getProperty( "os.name" ).toLowerCase( Locale.ENGLISH );
IS_WINDOWS = osName.startsWith( "windows" );
IS_MAC = osName.startsWith( "mac" );
IS_LINUX = osName.startsWith( "linux" );
isWindows = osName.startsWith( "windows" );
isMacOS = osName.startsWith( "mac" );
isLinux = osName.startsWith( "linux" );
// OS versions
long osVersion = scanVersion( System.getProperty( "os.version" ) );
IS_WINDOWS_10_OR_LATER = (IS_WINDOWS && osVersion >= toVersion( 10, 0, 0, 0 ));
IS_MAC_OS_10_11_EL_CAPITAN_OR_LATER = (IS_MAC && osVersion >= toVersion( 10, 11, 0, 0 ));
IS_MAC_OS_10_14_MOJAVE = (IS_MAC && osVersion >= toVersion( 10, 14, 0, 0 ));
IS_MAC_OS_10_15_CATALINA_OR_LATER = (IS_MAC && osVersion >= toVersion( 10, 15, 0, 0 ));
osVersion = scanVersion( System.getProperty( "os.version" ) );
isWindows_10_orLater = (isWindows && osVersion >= toVersion( 10, 0, 0, 0 ));
isMacOS_10_11_ElCapitan_orLater = (isMacOS && osVersion >= toVersion( 10, 11, 0, 0 ));
isMacOS_10_14_Mojave_orLater = (isMacOS && osVersion >= toVersion( 10, 14, 0, 0 ));
isMacOS_10_15_Catalina_orLater = (isMacOS && osVersion >= toVersion( 10, 15, 0, 0 ));
// Java versions
long javaVersion = scanVersion( System.getProperty( "java.version" ) );
IS_JAVA_9_OR_LATER = (javaVersion >= toVersion( 9, 0, 0, 0 ));
IS_JAVA_11_OR_LATER = (javaVersion >= toVersion( 11, 0, 0, 0 ));
IS_JAVA_15_OR_LATER = (javaVersion >= toVersion( 15, 0, 0, 0 ));
javaVersion = scanVersion( System.getProperty( "java.version" ) );
isJava_9_orLater = (javaVersion >= toVersion( 9, 0, 0, 0 ));
isJava_11_orLater = (javaVersion >= toVersion( 11, 0, 0, 0 ));
isJava_15_orLater = (javaVersion >= toVersion( 15, 0, 0, 0 ));
// Java VMs
IS_JETBRAINS_JVM = System.getProperty( "java.vm.vendor", "Unknown" )
isJetBrainsJVM = System.getProperty( "java.vm.vendor", "Unknown" )
.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
IS_KDE = (IS_LINUX && System.getenv( "KDE_FULL_SESSION" ) != null);
isKDE = (isLinux && System.getenv( "KDE_FULL_SESSION" ) != null);
}
public static long scanVersion( String version ) {

View File

@@ -90,10 +90,10 @@ public class UIScale
jreHiDPI = false;
if( SystemInfo.IS_JAVA_9_OR_LATER ) {
if( SystemInfo.isJava_9_orLater ) {
// Java 9 and later supports per-monitor scaling
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
// see com.intellij.ui.JreHiDpiUtil.isJreHiDPIEnabled()
try {
@@ -177,26 +177,25 @@ public class UIScale
// default font size
float fontSizeDivider = 12f;
if( SystemInfo.IS_WINDOWS ) {
if( SystemInfo.isWindows ) {
// 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.
// Tahoma 11 is used at 100%
if( "Tahoma".equals( font.getFamily() ) )
fontSizeDivider = 11f;
} else if( SystemInfo.IS_MAC ) {
} else if( SystemInfo.isMacOS ) {
// default font size on macOS is 13
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
fontSizeDivider = SystemInfo.IS_KDE ? 13f : 15f;
fontSizeDivider = SystemInfo.isKDE ? 13f : 15f;
}
return font.getSize() / fontSizeDivider;
}
private static boolean isUserScalingEnabled() {
// same as in IntelliJ IDEA
return FlatSystemProperties.getBoolean( "hidpi", true );
return FlatSystemProperties.getBoolean( FlatSystemProperties.UI_SCALE_ENABLED, true );
}
/**
@@ -204,6 +203,9 @@ public class UIScale
* to the given font.
*/
public static FontUIResource applyCustomScaleFactor( FontUIResource font ) {
if( !isUserScalingEnabled() )
return font;
String uiScale = System.getProperty( FlatSystemProperties.UI_SCALE );
float scaleFactor = parseScaleFactor( uiScale );
if( scaleFactor <= 0 )

View File

@@ -239,6 +239,12 @@ ProgressBar.selectionBackground=@foreground
RadioButton.icon[filled].centerDiameter=5
#---- RootPane ----
RootPane.activeBorderColor=darken(@background,7%,derived)
RootPane.inactiveBorderColor=darken(@background,5%,derived)
#---- ScrollBar ----
ScrollBar.track=lighten(@background,1%,derived noAutoInverse)

View File

@@ -36,7 +36,6 @@ Button.default.borderWidth=1
#---- CheckBox ----
CheckBox.icon.style=filled
CheckBox.icon[filled].focusWidth=2
#---- Component ----

View File

@@ -135,6 +135,7 @@ Button.rollover=true
Button.defaultButtonFollowsFocus=false
[win]Button.defaultButtonFollowsFocus=true
Button.borderWidth=1
Button.default.borderWidth=1
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.minimumWidth=72
ComboBox.editorColumns=0
ComboBox.maximumRowCount=20
ComboBox.maximumRowCount=15
[mac]ComboBox.showPopupOnNavigation=true
ComboBox.buttonStyle=auto
@@ -292,6 +293,7 @@ List.selectionInactiveForeground=@selectionInactiveForeground
List.dropCellBackground=@dropCellBackground
List.dropCellForeground=@dropCellForeground
List.dropLineColor=@dropLineColor
List.showCellFocusIndicator=false
#---- Menu ----
@@ -430,12 +432,15 @@ RadioButtonMenuItem.background=@menuBackground
RootPane.border=com.formdev.flatlaf.ui.FlatRootPaneUI$FlatWindowBorder
RootPane.borderDragThickness=5
RootPane.cornerDragWidth=16
RootPane.honorMinimumSizeOnResize=true
RootPane.honorFrameMinimumSizeOnResize=false
RootPane.honorDialogMinimumSizeOnResize=true
#---- ScrollBar ----
ScrollBar.width=10
ScrollBar.minimumThumbSize=10,10
ScrollBar.maximumThumbSize=100000,100000
ScrollBar.trackInsets=0,0,0,0
ScrollBar.thumbInsets=0,0,0,0
ScrollBar.trackArc=0
@@ -448,10 +453,12 @@ ScrollBar.buttonArrowColor=$ComboBox.buttonArrowColor
ScrollBar.buttonDisabledArrowColor=$ComboBox.buttonDisabledArrowColor
ScrollBar.allowsAbsolutePositioning=true
[mac]ScrollBar.minimumThumbSize=18,18
[mac]ScrollBar.thumbInsets=2,2,2,2
[mac]ScrollBar.thumbArc=999
[mac]ScrollBar.hoverThumbWithTrack=true
[linux]ScrollBar.minimumThumbSize=18,18
[linux]ScrollBar.thumbInsets=2,2,2,2
[linux]ScrollBar.thumbArc=999
@@ -524,6 +531,7 @@ TabbedPane.contentBorderInsets=null
Table.rowHeight=20
Table.showHorizontalLines=false
Table.showVerticalLines=false
Table.consistentHomeEndKeyBehavior=true
Table.intercellSpacing={dimension}0,0
Table.scrollPaneBorder=com.formdev.flatlaf.ui.FlatBorder
Table.ascendingSortIcon=com.formdev.flatlaf.icons.FlatAscendingSortIcon
@@ -659,6 +667,7 @@ ToolTipManager.enableToolTipMode=activeApplication
#---- Tree ----
Tree.border=1,1,1,1
Tree.editorBorder=1,1,1,1,@cellFocusColor
Tree.selectionInactiveBackground=@selectionInactiveBackground
Tree.selectionInactiveForeground=@selectionInactiveForeground
Tree.textBackground=$Tree.background
@@ -671,6 +680,7 @@ Tree.rendererMargins=1,2,1,2
Tree.wideSelection=true
Tree.repaintWholeRow=true
Tree.paintLines=false
Tree.showCellFocusIndicator=false
Tree.leftChildIndent=7
Tree.rightChildIndent=11
Tree.rowHeight=0

View File

@@ -132,9 +132,9 @@ CheckBox.icon[filled].selectedFocusedBorderColor=#ACCFF7
CheckBox.icon[filled].selectedFocusedBackground=$CheckBox.icon[filled].selectedBackground
CheckBox.icon[filled].selectedFocusedCheckmarkColor=$CheckBox.icon.focusedBackground
# hover
CheckBox.icon[filled].selectedHoverBackground=#5E94CE
CheckBox.icon[filled].selectedHoverBackground=darken($CheckBox.icon[filled].selectedBackground,5%)
# pressed
CheckBox.icon[filled].selectedPressedBackground=#72A1D4
CheckBox.icon[filled].selectedPressedBackground=darken($CheckBox.icon[filled].selectedBackground,10%)
#---- ComboBox ----
@@ -251,6 +251,12 @@ ProgressBar.selectionBackground=@foreground
RadioButton.icon[filled].centerDiameter=5
#---- RootPane ----
RootPane.activeBorderColor=#707070
RootPane.inactiveBorderColor=lighten($RootPane.activeBorderColor,20%,derived)
#---- ScrollBar ----
ScrollBar.track=lighten(@background,1%,derived noAutoInverse)

View File

@@ -45,6 +45,24 @@ ToggleButton.endBackground=$ToggleButton.background
#---- 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.toolbar.selectedBackground=$ToggleButton.toolbar.selectedBackground
@@ -62,3 +80,57 @@ ToggleButton.endBackground=$ToggleButton.background
[High_contrast]ToggleButton.selectedForeground=#000
[High_contrast]ToggleButton.disabledSelectedBackground=#444
[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

View File

@@ -27,6 +27,7 @@ import javax.swing.UIManager.LookAndFeelInfo;
import javax.swing.plaf.metal.MetalLookAndFeel;
import javax.swing.plaf.nimbus.NimbusLookAndFeel;
import com.formdev.flatlaf.*;
import com.formdev.flatlaf.extras.FlatAnimatedLafChange;
import com.formdev.flatlaf.util.SystemInfo;
import com.formdev.flatlaf.util.UIScale;
import net.miginfocom.swing.*;
@@ -58,9 +59,9 @@ class ControlBar
className.equals( "com.sun.java.swing.plaf.motif.MotifLookAndFeel" ) )
continue;
if( (SystemInfo.IS_WINDOWS && className.equals( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" )) ||
(SystemInfo.IS_MAC && className.equals( "com.apple.laf.AquaLookAndFeel") ) ||
(SystemInfo.IS_LINUX && className.equals( "com.sun.java.swing.plaf.gtk.GTKLookAndFeel") ) )
if( (SystemInfo.isWindows && className.equals( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" )) ||
(SystemInfo.isMacOS && className.equals( "com.apple.laf.AquaLookAndFeel") ) ||
(SystemInfo.isLinux && className.equals( "com.sun.java.swing.plaf.gtk.GTKLookAndFeel") ) )
name += " (F9)";
else if( className.equals( MetalLookAndFeel.class.getName() ) )
name += " (F12)";
@@ -111,11 +112,11 @@ class ControlBar
registerSwitchToLookAndFeel( KeyEvent.VK_F3, FlatIntelliJLaf.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" );
else if( SystemInfo.IS_MAC )
else if( SystemInfo.isMacOS )
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_F12, MetalLookAndFeel.class.getName() );
registerSwitchToLookAndFeel( KeyEvent.VK_F11, NimbusLookAndFeel.class.getName() );
@@ -193,6 +194,8 @@ class ControlBar
EventQueue.invokeLater( () -> {
try {
FlatAnimatedLafChange.showSnapshot();
// change look and feel
UIManager.setLookAndFeel( lafClassName );
@@ -202,6 +205,7 @@ class ControlBar
// update all components
FlatLaf.updateUI();
FlatAnimatedLafChange.hideSnapshotWithAnimation();
// increase size of frame if necessary
int width = frame.getWidth();

View File

@@ -27,6 +27,7 @@ import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.demo.extras.*;
import com.formdev.flatlaf.demo.intellijthemes.*;
import com.formdev.flatlaf.extras.FlatAnimatedLafChange;
import com.formdev.flatlaf.extras.FlatSVGIcon;
import com.formdev.flatlaf.extras.SVGUtils;
import com.formdev.flatlaf.ui.JBRCustomDecorations;
@@ -105,14 +106,21 @@ class DemoFrame
repaint();
}
private void animatedLafChangeChanged() {
System.setProperty( "flatlaf.animatedLafChange", String.valueOf( animatedLafChangeMenuItem.isSelected() ) );
}
private void fontFamilyChanged( ActionEvent e ) {
String fontFamily = e.getActionCommand();
FlatAnimatedLafChange.showSnapshot();
Font font = UIManager.getFont( "defaultFont" );
Font newFont = StyleContext.getDefaultStyleContext().getFont( fontFamily, font.getStyle(), font.getSize() );
UIManager.put( "defaultFont", newFont );
FlatLaf.updateUI();
FlatAnimatedLafChange.hideSnapshotWithAnimation();
}
private void fontSizeChanged( ActionEvent e ) {
@@ -248,6 +256,7 @@ class DemoFrame
menuBarEmbeddedCheckBoxMenuItem = new JCheckBoxMenuItem();
underlineMenuSelectionMenuItem = new JCheckBoxMenuItem();
alwaysShowMnemonicsMenuItem = new JCheckBoxMenuItem();
animatedLafChangeMenuItem = new JCheckBoxMenuItem();
JMenu helpMenu = new JMenu();
JMenuItem aboutMenuItem = new JMenuItem();
JToolBar toolBar1 = new JToolBar();
@@ -501,6 +510,12 @@ class DemoFrame
alwaysShowMnemonicsMenuItem.setText("Always show mnemonics");
alwaysShowMnemonicsMenuItem.addActionListener(e -> alwaysShowMnemonics());
optionsMenu.add(alwaysShowMnemonicsMenuItem);
//---- animatedLafChangeMenuItem ----
animatedLafChangeMenuItem.setText("Animated Laf Change");
animatedLafChangeMenuItem.setSelected(true);
animatedLafChangeMenuItem.addActionListener(e -> animatedLafChangeChanged());
optionsMenu.add(animatedLafChangeMenuItem);
}
menuBar1.add(optionsMenu);
@@ -620,6 +635,7 @@ class DemoFrame
private JCheckBoxMenuItem menuBarEmbeddedCheckBoxMenuItem;
private JCheckBoxMenuItem underlineMenuSelectionMenuItem;
private JCheckBoxMenuItem alwaysShowMnemonicsMenuItem;
private JCheckBoxMenuItem animatedLafChangeMenuItem;
private JTabbedPane tabbedPane;
private ControlBar controlBar;
// JFormDesigner - End of variables declaration //GEN-END:variables

View File

@@ -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.0.2" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -356,6 +356,15 @@ new FormModel {
}
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 FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
name: "helpMenu"

View File

@@ -32,7 +32,7 @@ public class FlatLafDemo
public static void main( String[] args ) {
// 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" );
SwingUtilities.invokeLater( () -> {

View File

@@ -25,6 +25,7 @@ class IJThemeInfo
{
final String name;
final String resourceName;
final boolean dark;
final String license;
final String licenseFile;
final String sourceCodeUrl;
@@ -32,13 +33,14 @@ class IJThemeInfo
final File themeFile;
final String lafClassName;
IJThemeInfo( String name, String resourceName,
IJThemeInfo( String name, String resourceName, boolean dark,
String license, String licenseFile,
String sourceCodeUrl, String sourceCodePath,
File themeFile, String lafClassName )
{
this.name = name;
this.resourceName = resourceName;
this.dark = dark;
this.license = license;
this.licenseFile = licenseFile;
this.sourceCodeUrl = sourceCodeUrl;

View File

@@ -55,12 +55,13 @@ class IJThemesManager
String resourceName = e.getKey();
Map<String, String> value = (Map<String, String>) e.getValue();
String name = value.get( "name" );
boolean dark = Boolean.parseBoolean( value.get( "dark" ) );
String license = value.get( "license" );
String licenseFile = value.get( "licenseFile" );
String sourceCodeUrl = value.get( "sourceCodeUrl" );
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" )
? StringUtils.removeTrailing( fname, ".properties" )
: 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() );
}
}

View File

@@ -19,6 +19,7 @@ package com.formdev.flatlaf.demo.intellijthemes;
import java.awt.Component;
import java.awt.Desktop;
import java.awt.EventQueue;
import java.awt.Rectangle;
import java.awt.Window;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
@@ -49,6 +50,7 @@ import com.formdev.flatlaf.FlatLightLaf;
import com.formdev.flatlaf.FlatPropertiesLaf;
import com.formdev.flatlaf.IntelliJTheme;
import com.formdev.flatlaf.demo.DemoPrefs;
import com.formdev.flatlaf.extras.FlatAnimatedLafChange;
import com.formdev.flatlaf.extras.FlatSVGIcon;
import com.formdev.flatlaf.util.StringUtils;
import net.miginfocom.swing.*;
@@ -119,6 +121,10 @@ public class IJThemesPanel
}
private void updateThemesList() {
int filterLightDark = filterComboBox.getSelectedIndex();
boolean showLight = (filterLightDark != 2);
boolean showDark = (filterLightDark != 1);
// load theme infos
themesManager.loadBundledThemes();
themesManager.loadThemesFromDirectory();
@@ -128,15 +134,22 @@ public class IJThemesPanel
themesManager.bundledThemes.sort( comparator );
themesManager.moreThemes.sort( comparator );
// remember selection (must be invoked before clearing themes field)
IJThemeInfo oldSel = themesList.getSelectedValue();
themes.clear();
categories.clear();
// add core themes at beginning
categories.put( themes.size(), "Core Themes" );
themes.add( new IJThemeInfo( "Flat Light", null, null, null, null, null, null, FlatLightLaf.class.getName() ) );
themes.add( new IJThemeInfo( "Flat Dark", null, null, null, null, null, null, FlatDarkLaf.class.getName() ) );
themes.add( new IJThemeInfo( "Flat IntelliJ", null, null, null, null, null, null, FlatIntelliJLaf.class.getName() ) );
themes.add( new IJThemeInfo( "Flat Darcula", null, null, null, null, null, null, FlatDarculaLaf.class.getName() ) );
if( showLight )
themes.add( new IJThemeInfo( "Flat Light", null, false, null, null, null, null, null, FlatLightLaf.class.getName() ) );
if( showDark )
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
categories.put( themes.size(), "Current Directory" );
@@ -145,15 +158,17 @@ public class IJThemesPanel
// add uncategorized bundled themes
categories.put( themes.size(), "IntelliJ Themes" );
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 );
}
// add categorized bundled themes
String lastCategory = null;
for( IJThemeInfo ti : themesManager.bundledThemes ) {
boolean show = (showLight && !ti.dark) || (showDark && ti.dark);
int sep = ti.name.indexOf( '/' );
if( sep < 0 )
if( !show || sep < 0 )
continue;
String category = ti.name.substring( 0, sep ).trim();
@@ -165,9 +180,6 @@ public class IJThemesPanel
themes.add( ti );
}
// remember selection
IJThemeInfo oldSel = themesList.getSelectedValue();
// fill themes list
themesList.setModel( new AbstractListModel<IJThemeInfo>() {
@Override
@@ -194,6 +206,18 @@ public class IJThemesPanel
}
}
}
// 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 );
}
}
private void themesListValueChanged( ListSelectionEvent e ) {
@@ -219,6 +243,8 @@ public class IJThemesPanel
if( themeInfo.lafClassName.equals( UIManager.getLookAndFeel().getClass().getName() ) )
return;
FlatAnimatedLafChange.showSnapshot();
try {
UIManager.setLookAndFeel( themeInfo.lafClassName );
} catch( Exception ex ) {
@@ -226,6 +252,8 @@ public class IJThemesPanel
showInformationDialog( "Failed to create '" + themeInfo.lafClassName + "'.", ex );
}
} else if( themeInfo.themeFile != null ) {
FlatAnimatedLafChange.showSnapshot();
try {
if( themeInfo.themeFile.getName().endsWith( ".properties" ) ) {
FlatLaf.install( new FlatPropertiesLaf( themeInfo.name, themeInfo.themeFile ) );
@@ -238,12 +266,15 @@ public class IJThemesPanel
showInformationDialog( "Failed to load '" + themeInfo.themeFile + "'.", ex );
}
} else {
FlatAnimatedLafChange.showSnapshot();
IntelliJTheme.install( getClass().getResourceAsStream( THEMES_PACKAGE + themeInfo.resourceName ) );
DemoPrefs.getState().put( DemoPrefs.KEY_LAF_THEME, DemoPrefs.RESOURCE_PREFIX + themeInfo.resourceName );
}
// update all components
FlatLaf.updateUI();
FlatAnimatedLafChange.hideSnapshotWithAnimation();
}
private void saveTheme() {
@@ -373,12 +404,17 @@ public class IJThemesPanel
isAdjustingThemesList = false;
}
private void filterChanged() {
updateThemesList();
}
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
JLabel themesLabel = new JLabel();
toolBar = new JToolBar();
saveButton = new JButton();
sourceCodeButton = new JButton();
filterComboBox = new JComboBox<>();
themesScrollPane = new JScrollPane();
themesList = new JList<>();
@@ -411,6 +447,17 @@ public class IJThemesPanel
}
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 ========
{
@@ -427,6 +474,7 @@ public class IJThemesPanel
private JToolBar toolBar;
private JButton saveButton;
private JButton sourceCodeButton;
private JComboBox<String> filterComboBox;
private JScrollPane themesScrollPane;
private JList<IJThemeInfo> themesList;
// JFormDesigner - End of variables declaration //GEN-END:variables

View File

@@ -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 {
contentType: "form/swing"
@@ -34,6 +34,20 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"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 ) ) {
name: "themesScrollPane"
add( new FormComponent( "javax.swing.JList" ) {

View File

@@ -13,6 +13,38 @@
"sourceCodeUrl": "https://gitlab.com/zlamalp/arc-theme-idea",
"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": {
"name": "Cyan light",
"license": "MIT",
@@ -22,6 +54,7 @@
},
"DarkFlatTheme.theme.json": {
"name": "Dark Flat",
"dark": true,
"license": "MIT",
"licenseFile": "DarkFlatTheme.LICENSE.txt",
"sourceCodeUrl": "https://github.com/nerzhulart/DarkFlatTheme",
@@ -29,6 +62,7 @@
},
"DarkPurple.theme.json": {
"name": "Dark purple",
"dark": true,
"license": "MIT",
"licenseFile": "DarkPurple.LICENSE.txt",
"sourceCodeUrl": "https://github.com/OlyaB/DarkPurpleTheme",
@@ -36,6 +70,7 @@
},
"Dracula.theme.json": {
"name": "Dracula",
"dark": true,
"license": "MIT",
"licenseFile": "Dracula.LICENSE.txt",
"sourceCodeUrl": "https://github.com/dracula/jetbrains",
@@ -43,6 +78,7 @@
},
"Gradianto_dark_fuchsia.theme.json": {
"name": "Gradianto Dark Fuchsia",
"dark": true,
"license": "MIT",
"licenseFile": "Gradianto.LICENSE.txt",
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
@@ -50,6 +86,7 @@
},
"Gradianto_deep_ocean.theme.json": {
"name": "Gradianto Deep Ocean",
"dark": true,
"license": "MIT",
"licenseFile": "Gradianto.LICENSE.txt",
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
@@ -57,6 +94,7 @@
},
"Gradianto_midnight_blue.theme.json": {
"name": "Gradianto Midnight Blue",
"dark": true,
"license": "MIT",
"licenseFile": "Gradianto.LICENSE.txt",
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
@@ -71,6 +109,7 @@
},
"gruvbox_dark_hard.theme.json": {
"name": "Gruvbox Dark Hard",
"dark": true,
"license": "MIT",
"licenseFile": "gruvbox_theme.LICENSE.txt",
"sourceCodeUrl": "https://github.com/Vincent-P/gruvbox-intellij-theme",
@@ -78,6 +117,7 @@
},
"gruvbox_dark_medium.theme.json": {
"name": "Gruvbox Dark Medium",
"dark": true,
"license": "MIT",
"licenseFile": "gruvbox_theme.LICENSE.txt",
"sourceCodeUrl": "https://github.com/Vincent-P/gruvbox-intellij-theme",
@@ -85,6 +125,7 @@
},
"gruvbox_dark_soft.theme.json": {
"name": "Gruvbox Dark Soft",
"dark": true,
"license": "MIT",
"licenseFile": "gruvbox_theme.LICENSE.txt",
"sourceCodeUrl": "https://github.com/Vincent-P/gruvbox-intellij-theme",
@@ -92,6 +133,7 @@
},
"HiberbeeDark.theme.json": {
"name": "Hiberbee Dark",
"dark": true,
"license": "MIT",
"licenseFile": "Hiberbee.LICENSE.txt",
"sourceCodeUrl": "https://github.com/Hiberbee/code-highlight-themes",
@@ -99,6 +141,7 @@
},
"HighContrast.theme.json": {
"name": "High contrast",
"dark": true,
"license": "MIT",
"licenseFile": "HighContrast.LICENSE.txt",
"sourceCodeUrl": "https://github.com/OlyaB/HighContrastTheme",
@@ -113,6 +156,7 @@
},
"MaterialTheme.theme.json": {
"name": "Material Design Dark",
"dark": true,
"license": "MIT",
"licenseFile": "MaterialTheme.LICENSE.txt",
"sourceCodeUrl": "https://github.com/xinkunZ/NotReallyMDTheme",
@@ -120,6 +164,7 @@
},
"Monocai.theme.json": {
"name": "Monocai",
"dark": true,
"license": "MIT",
"licenseFile": "Monocai.LICENSE.txt",
"sourceCodeUrl": "https://github.com/bmikaili/intellij-monocai-theme",
@@ -127,6 +172,7 @@
},
"nord.theme.json": {
"name": "Nord",
"dark": true,
"license": "MIT",
"licenseFile": "nord.LICENSE.txt",
"sourceCodeUrl": "https://github.com/arcticicestudio/nord-jetbrains",
@@ -134,27 +180,30 @@
},
"one_dark.theme.json": {
"name": "One Dark",
"dark": true,
"license": "MIT",
"licenseFile": "one_dark.LICENSE.txt",
"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",
"license": "MIT",
"licenseFile": "solarized_dark_theme.LICENSE.txt",
"sourceCodeUrl": "https://github.com/snowe2010/solarized-jetbrains",
"sourceCodePath": "blob/master/src/solarized_dark_theme.theme.json"
"dark": true,
"license": "The Unlicense",
"licenseFile": "Solarized.LICENSE.txt",
"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",
"license": "MIT",
"licenseFile": "solarized_light_theme.LICENSE.txt",
"sourceCodeUrl": "https://github.com/snowe2010/solarized-jetbrains",
"sourceCodePath": "blob/master/src/solarized_light_theme.theme.json"
"license": "The Unlicense",
"licenseFile": "Solarized.LICENSE.txt",
"sourceCodeUrl": "https://github.com/4lex4/intellij-platform-solarized",
"sourceCodePath": "blob/master/resources/SolarizedLight.theme.json"
},
"Spacegray.theme.json": {
"name": "Spacegray",
"dark": true,
"license": "MIT",
"licenseFile": "Spacegray.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mturlo/intellij-spacegray",
@@ -162,6 +211,7 @@
},
"vuesion_theme.theme.json": {
"name": "Vuesion",
"dark": true,
"license": "MIT",
"licenseFile": "vuesion_theme.LICENSE.txt",
"sourceCodeUrl": "https://github.com/vuesion/intellij-theme",
@@ -170,6 +220,7 @@
"material-theme-ui-lite/Arc Dark.theme.json": {
"name": "Material Theme UI Lite / Arc Dark",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -177,6 +228,7 @@
},
"material-theme-ui-lite/Arc Dark Contrast.theme.json": {
"name": "Material Theme UI Lite / Arc Dark Contrast",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -184,6 +236,7 @@
},
"material-theme-ui-lite/Atom One Dark.theme.json": {
"name": "Material Theme UI Lite / Atom One Dark",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -191,6 +244,7 @@
},
"material-theme-ui-lite/Atom One Dark Contrast.theme.json": {
"name": "Material Theme UI Lite / Atom One Dark Contrast",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -212,6 +266,7 @@
},
"material-theme-ui-lite/Dracula.theme.json": {
"name": "Material Theme UI Lite / Dracula",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -219,6 +274,7 @@
},
"material-theme-ui-lite/Dracula Contrast.theme.json": {
"name": "Material Theme UI Lite / Dracula Contrast",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -254,6 +310,7 @@
},
"material-theme-ui-lite/Material Darker.theme.json": {
"name": "Material Theme UI Lite / Material Darker",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -261,6 +318,7 @@
},
"material-theme-ui-lite/Material Darker Contrast.theme.json": {
"name": "Material Theme UI Lite / Material Darker Contrast",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -268,6 +326,7 @@
},
"material-theme-ui-lite/Material Deep Ocean.theme.json": {
"name": "Material Theme UI Lite / Material Deep Ocean",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -275,6 +334,7 @@
},
"material-theme-ui-lite/Material Deep Ocean Contrast.theme.json": {
"name": "Material Theme UI Lite / Material Deep Ocean Contrast",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -296,6 +356,7 @@
},
"material-theme-ui-lite/Material Oceanic.theme.json": {
"name": "Material Theme UI Lite / Material Oceanic",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -303,6 +364,7 @@
},
"material-theme-ui-lite/Material Oceanic Contrast.theme.json": {
"name": "Material Theme UI Lite / Material Oceanic Contrast",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -310,6 +372,7 @@
},
"material-theme-ui-lite/Material Palenight.theme.json": {
"name": "Material Theme UI Lite / Material Palenight",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -317,6 +380,7 @@
},
"material-theme-ui-lite/Material Palenight Contrast.theme.json": {
"name": "Material Theme UI Lite / Material Palenight Contrast",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -324,6 +388,7 @@
},
"material-theme-ui-lite/Monokai Pro.theme.json": {
"name": "Material Theme UI Lite / Monokai Pro",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -331,6 +396,7 @@
},
"material-theme-ui-lite/Monokai Pro Contrast.theme.json": {
"name": "Material Theme UI Lite / Monokai Pro Contrast",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -338,6 +404,7 @@
},
"material-theme-ui-lite/Night Owl.theme.json": {
"name": "Material Theme UI Lite / Night Owl",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -345,6 +412,7 @@
},
"material-theme-ui-lite/Night Owl Contrast.theme.json": {
"name": "Material Theme UI Lite / Night Owl Contrast",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -352,6 +420,7 @@
},
"material-theme-ui-lite/Solarized Dark.theme.json": {
"name": "Material Theme UI Lite / Solarized Dark",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",
@@ -359,6 +428,7 @@
},
"material-theme-ui-lite/Solarized Dark Contrast.theme.json": {
"name": "Material Theme UI Lite / Solarized Dark Contrast",
"dark": true,
"license": "MIT",
"licenseFile": "material-theme-ui-lite/Material Theme UI Lite.LICENSE.txt",
"sourceCodeUrl": "https://github.com/mallowigi/material-theme-ui-lite",

View File

@@ -3,6 +3,8 @@ FlatLaf Extras
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):
A simple UI inspector that shows information about UI component at mouse
location in a tooltip.

View File

@@ -0,0 +1,157 @@
/*
* 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.Image;
import java.awt.Window;
import java.util.HashMap;
import java.util.Map;
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> map = new HashMap<>();
private static float alpha;
/**
* 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;
// create snapshots for all shown windows
Window[] windows = Window.getWindows();
for( Window window : windows ) {
if( !(window instanceof RootPaneContainer) || !window.isShowing() )
continue;
JLayeredPane layeredPane = ((RootPaneContainer)window).getLayeredPane();
// create snapshot image of layered pane
Image snapshot = window.createImage( window.getWidth(), window.getHeight() );
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 ) {
((Graphics2D)g).setComposite( AlphaComposite.getInstance( AlphaComposite.SRC_OVER, alpha ) );
g.drawImage( snapshot, 0, 0, null );
}
};
snapshotLayer.setSize( layeredPane.getSize() );
// add image layer to layered pane
layeredPane.add( snapshotLayer, JLayeredPane.DRAG_LAYER );
map.put( layeredPane, snapshotLayer );
}
}
/**
* 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( map.isEmpty() )
return;
// 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 : map.entrySet() ) {
if( e.getKey().isShowing() )
e.getValue().repaint();
}
}, () -> {
hideSnapshot();
animator = null;
} );
animator.setResolution( resolution );
animator.start();
}
private static void hideSnapshot() {
// 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();
}
}

View File

@@ -49,6 +49,10 @@ Name | Class
-----|------
[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 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`
[Dark Flat](https://github.com/nerzhulart/DarkFlatTheme) | `com.formdev.flatlaf.intellijthemes.FlatDarkFlatIJTheme`
[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`
[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`
[Solarized Dark](https://github.com/snowe2010/solarized-jetbrains) | `com.formdev.flatlaf.intellijthemes.FlatSolarizedDarkIJTheme`
[Solarized Light](https://github.com/snowe2010/solarized-jetbrains) | `com.formdev.flatlaf.intellijthemes.FlatSolarizedLightIJTheme`
[Solarized Dark](https://github.com/4lex4/intellij-platform-solarized) | `com.formdev.flatlaf.intellijthemes.FlatSolarizedDarkIJTheme`
[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`
[Vuesion](https://github.com/vuesion/intellij-theme) | `com.formdev.flatlaf.intellijthemes.FlatVuesionIJTheme`

View File

@@ -26,6 +26,10 @@ public class FlatAllIJThemes
public static final LookAndFeelInfo[] INFOS = {
new LookAndFeelInfo( "Arc", "com.formdev.flatlaf.intellijthemes.FlatArcIJTheme" ),
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( "Dark Flat", "com.formdev.flatlaf.intellijthemes.FlatDarkFlatIJTheme" ),
new LookAndFeelInfo( "Dark purple", "com.formdev.flatlaf.intellijthemes.FlatDarkPurpleIJTheme" ),

View File

@@ -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" ) );
}
}

View File

@@ -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" ) );
}
}

View File

@@ -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" ) );
}
}

View File

@@ -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" ) );
}
}

View File

@@ -33,6 +33,6 @@ public class FlatSolarizedDarkIJTheme
}
public FlatSolarizedDarkIJTheme() {
super( Utils.loadTheme( "solarized_dark_theme.theme.json" ) );
super( Utils.loadTheme( "SolarizedDark.theme.json" ) );
}
}

View File

@@ -33,6 +33,6 @@ public class FlatSolarizedLightIJTheme
}
public FlatSolarizedLightIJTheme() {
super( Utils.loadTheme( "solarized_light_theme.theme.json" ) );
super( Utils.loadTheme( "SolarizedLight.theme.json" ) );
}
}

View File

@@ -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.

View File

@@ -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"
}
}
}

View File

@@ -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:

View File

@@ -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"
}
}
}

View File

@@ -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>

View File

@@ -0,0 +1,671 @@
{
"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": {
"*": {
"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": {
"acceleratorForeground": "colorAcceleratorForeground",
"acceleratorSelectionForeground": "colorAcceleratorSelectionForeground"
},
"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": {
"acceleratorForeground": "colorAcceleratorForeground",
"acceleratorSelectionForeground": "colorAcceleratorSelectionForeground",
"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": {
"acceleratorForeground": "colorAcceleratorForeground",
"acceleratorSelectionForeground": "colorAcceleratorSelectionForeground"
},
"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"
},
"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"
}
}
}

View File

@@ -0,0 +1,676 @@
{
"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": {
"*": {
"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": {
"acceleratorForeground": "colorAcceleratorForeground",
"acceleratorSelectionForeground": "colorAcceleratorSelectionForeground"
},
"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": {
"acceleratorForeground": "colorAcceleratorForeground",
"acceleratorSelectionForeground": "colorAcceleratorSelectionForeground",
"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": {
"acceleratorForeground": "colorAcceleratorForeground",
"acceleratorSelectionForeground": "colorAcceleratorSelectionForeground"
},
"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"
},
"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"
}
}
}

View File

@@ -2,6 +2,7 @@
"name": "Arc Theme - Orange",
"dark": false,
"author": "Pavel Zlámal",
"editorScheme": "/arc-theme-light.xml",
"ui": {
@@ -15,8 +16,8 @@
},
"Borders": {
"color": "#e1e3e6",
"ContrastBorderColor": "#E1E3E6"
"color": "#C4C4C4",
"ContrastBorderColor": "#C4C4C4"
},
"Button": {
@@ -25,6 +26,8 @@
"endBorderColor": "#C4C4C4",
"focusedBorderColor" : "#f57900",
"background" : "#F5F5F5",
"startBackground" : "#fcfdfd",
"endBackground" : "#fcfdfd",
"default": {
"foreground": "#FFFFFF",
"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",
"Popup.Toolbar.background" : "#F5F5F5",
"Panel.background": "#F5F5F5",
@@ -92,6 +102,7 @@
"TabbedPane.underlineColor" : "#f57900",
"TabbedPane.tabSelectionHeight" : 2,
"TabbedPane.background" : "#F5F5F5",
"TabbedPane.hoverColor" : "#ffffff",
"Link.hoverForeground" : "#f57900",
"Link.activeForeground" : "#f57900",
@@ -111,6 +122,18 @@
"Editor.background" : "#f5f5f5",
"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",
"RadioButton.background" : "#F5F5F5",
"Slider.background" : "#F5F5F5",
@@ -146,17 +169,25 @@
"ToolWindow.Header.background" : "#e7e8eb",
"ToolWindow.HeaderTab.selectedBackground" : "#dddee1",
"ToolWindow.HeaderTab.hoverInactiveBackground" : "#dddee1",
"ToolWindow.HeaderTab.selectedInactiveBackground" : "#dddee1",
"ToolWindow.Button.selectedBackground" : "#dddee1",
"ToolWindow.Button.hoverBackground" : "#ffffff",
"ToolWindow.HeaderTab.underlineHeight" : 2,
"ToolWindow.HeaderTab.underlineColor" : "#f57900",
"ToolWindow.HeaderTab.underlinedTabBackground" : "#F5F5F500",
"ToolWindow.HeaderTab.hoverBackground" : "#F5F5F5",
"ToolWindow.HeaderTab.hoverInactiveBackground" : "#F5F5F5",
"DefaultTabs.underlineHeight" : 2,
"DefaultTabs.underlineColor" : "#f57900",
"DefaultTabs.underlinedTabBackground" : "#ffffff",
"DefaultTabs.background" : "#F5F5F5",
"DefaultTabs.borderColor" : "#C4C4C4",
"DefaultTabs.hoverBackground" : "#ffffff90",
"EditorTabs.underlineHeight" : 2,
"EditorTabs.underlineColor" : "#f57900",
"EditorTabs.background" : "#F5F5F5",
"EditorTabs.borderColor": "#C4C4C4",
"EditorTabs.hoverBackground" : "#ffffff",
"Notification.background" : "#F5F5F5",
"Notification.MoreButton.background" : "#dddee1",

View File

@@ -2,6 +2,7 @@
"name": "Arc Theme",
"dark": false,
"author": "Pavel Zlámal",
"editorScheme": "/arc-theme-light.xml",
"ui": {
@@ -15,8 +16,8 @@
},
"Borders": {
"color": "#e1e3e6",
"ContrastBorderColor": "#E1E3E6"
"color": "#C4C4C4",
"ContrastBorderColor": "#C4C4C4"
},
"Button": {
@@ -25,6 +26,8 @@
"endBorderColor": "#C4C4C4",
"focusedBorderColor" : "#2679db",
"background" : "#F5F5F5",
"startBackground" : "#fcfdfd",
"endBackground" : "#fcfdfd",
"default": {
"foreground": "#FFFFFF",
"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",
"Popup.Toolbar.background" : "#F5F5F5",
"Panel.background": "#F5F5F5",
@@ -92,6 +102,7 @@
"TabbedPane.underlineColor" : "#2679db",
"TabbedPane.tabSelectionHeight" : 2,
"TabbedPane.background" : "#F5F5F5",
"TabbedPane.hoverColor" : "#ffffff",
"Link.hoverForeground" : "#2679db",
"Link.activeForeground" : "#2679db",
@@ -111,6 +122,18 @@
"Editor.background" : "#f5f5f5",
"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",
"RadioButton.background" : "#F5F5F5",
"Slider.background" : "#F5F5F5",
@@ -145,18 +168,26 @@
"ToolTip.Actions.background" : "#F5F5F5",
"ToolWindow.Header.background" : "#e7e8eb",
"ToolWindow.HeaderTab.selectedBackground" : "#dddee1",
"ToolWindow.HeaderTab.hoverInactiveBackground" : "#dddee1",
"ToolWindow.HeaderTab.selectedBackground" : "#fcfdfd",
"ToolWindow.HeaderTab.selectedInactiveBackground" : "#dddee1",
"ToolWindow.Button.selectedBackground" : "#dddee1",
"ToolWindow.Button.hoverBackground" : "#ffffff",
"ToolWindow.HeaderTab.underlineHeight" : 2,
"ToolWindow.HeaderTab.underlineColor" : "#2679db",
"ToolWindow.HeaderTab.underlinedTabBackground" : "#F5F5F500",
"ToolWindow.HeaderTab.hoverBackground" : "#F5F5F5",
"ToolWindow.HeaderTab.hoverInactiveBackground" : "#F5F5F5",
"DefaultTabs.underlineHeight" : 2,
"DefaultTabs.underlineColor" : "#2679db",
"DefaultTabs.underlinedTabBackground" : "#ffffff",
"DefaultTabs.background" : "#F5F5F5",
"DefaultTabs.borderColor" : "#C4C4C4",
"DefaultTabs.hoverBackground" : "#ffffff90",
"EditorTabs.underlineHeight" : 2,
"EditorTabs.underlineColor" : "#2679db",
"EditorTabs.background" : "#F5F5F5",
"EditorTabs.borderColor": "#C4C4C4",
"EditorTabs.hoverBackground" : "#ffffff",
"Notification.background" : "#F5F5F5",
"Notification.MoreButton.background" : "#dddee1",

View File

@@ -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"
}
}
}

View File

@@ -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"
}
}
}

View File

@@ -1,9 +1,11 @@
{
"name": "One Dark",
"dark": true,
"author": "Mark Skelton",
"editorScheme": "/themes/one_dark.xml",
"colors": {
"accentColor": "#568AF2"
},
"ui": {
"*": {
"background": "#21252b",
@@ -27,7 +29,7 @@
"borderColor": "#333841",
"disabledBorderColor": "#2d3137",
"focusColor": "#21252b",
"focusedBorderColor": "#568AF2",
"focusedBorderColor": "accentColor",
"separatorColor": "#32363c"
},
@@ -50,10 +52,10 @@
"default": {
"foreground": "#ffffff",
"startBackground": "#568AF2",
"endBackground": "#568AF2",
"startBorderColor": "#568AF2",
"endBorderColor": "#568AF2",
"startBackground": "accentColor",
"endBackground": "accentColor",
"startBorderColor": "accentColor",
"endBorderColor": "accentColor",
"focusedBorderColor": "#4269b9",
"focusColor": "#4269b9"
}
@@ -78,7 +80,7 @@
"ComboPopup.border": "1,1,1,1,2d3137",
"CompletionPopup": {
"matchForeground": "#568AF2"
"matchForeground": "accentColor"
},
"Component": {
@@ -94,7 +96,7 @@
},
"DefaultTabs": {
"underlineColor": "#568AF2",
"underlineColor": "accentColor",
"inactiveUnderlineColor": "#4269b9",
"hoverBackground": "#323844"
},
@@ -108,7 +110,7 @@
"Editor": {
"background": "#282c34",
"foreground": "#abb2bf",
"shortcutForeground": "#568AF2"
"shortcutForeground": "accentColor"
},
"EditorPane.inactiveBackground": "#282c34",
@@ -179,13 +181,13 @@
"tagForeground": "#abb2bf",
"Button": {
"installForeground": "#568AF2",
"installBorderColor":"#568AF2",
"installForeground": "accentColor",
"installBorderColor":"accentColor",
"installFillForeground": "#ffffff",
"installFillBackground": "#568AF2",
"installFillBackground": "accentColor",
"updateForeground":"#ffffff",
"updateBackground": "#568AF2",
"updateBorderColor": "#568AF2"
"updateBackground": "accentColor",
"updateBorderColor": "accentColor"
},
"SearchField": {
@@ -215,8 +217,8 @@
"ProgressBar": {
"trackColor": "#1D1D26",
"progressColor": "#568AF2",
"indeterminateStartColor": "#568AF2",
"progressColor": "accentColor",
"indeterminateStartColor": "accentColor",
"indeterminateEndColor": "#313469",
"failedColor": "#bd3c5f",
"failedEndColor": "#472c33",
@@ -240,8 +242,8 @@
},
"SearchMatch": {
"startBackground": "#568AF2",
"endBackground": "#568AF2"
"startBackground": "accentColor",
"endBackground": "accentColor"
},
"SpeedSearch": {
@@ -251,8 +253,10 @@
"errorForeground": "#e06c75"
},
"Settings.Spotlight.borderColor": "accentColor",
"TabbedPane": {
"underlineColor": "#568AF2",
"underlineColor": "accentColor",
"contentAreaColor": "#323844",
"hoverColor": "#323844"
},
@@ -285,7 +289,7 @@
"ToggleButton": {
"onForeground": "#ffffff",
"onBackground": "#568AF2",
"onBackground": "accentColor",
"offForeground": "#9f9fa6",
"offBackground": "#3d424b",
"borderColor": "#3d424b",
@@ -318,7 +322,7 @@
"Tree": {
"selectionBackground": "#4d78cc",
"modifiedItemForeground": "#568AF2",
"modifiedItemForeground": "accentColor",
"rowHeight": 20
},
@@ -353,9 +357,9 @@
"Checkbox.Background.Default.Dark": "#282c34",
"Checkbox.Border.Default.Dark": "#414855",
"Checkbox.Foreground.Selected.Dark": "#abb2bf",
"Checkbox.Focus.Wide.Dark": "#568AF2",
"Checkbox.Focus.Thin.Default.Dark": "#568AF2",
"Checkbox.Focus.Thin.Selected.Dark": "#568AF2",
"Checkbox.Focus.Wide.Dark": "accentColor",
"Checkbox.Focus.Thin.Default.Dark": "accentColor",
"Checkbox.Focus.Thin.Selected.Dark": "accentColor",
"Checkbox.Background.Disabled.Dark": "#21252b",
"Checkbox.Border.Disabled.Dark": "#2c313a",
"Checkbox.Foreground.Disabled.Dark": "#5c6370"

View File

@@ -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"
}
}
}

View File

@@ -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.

View File

@@ -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"
}
}
}

View File

@@ -82,9 +82,10 @@
"ComboPopup.border": "1,1,1,1,303a45",
"CompletionPopup": {
"matchForeground": "#f43b6c",
"selectionBackground": "#202831",
"selectionInactiveBackground": "#202831"
"foreground": "#c9cbcf",
"matchForeground": "#0d9660",
"selectionBackground": "#0c1014",
"selectionInactiveBackground": "#0c1014"
},
"Component": {
@@ -103,7 +104,6 @@
"DebuggerPopup.borderColor": "#202831",
"DebuggerTabs.selectedBackground": "#303a45",
"DebuggerTabs.underlineHeight": 1,
"DefaultTabs": {
@@ -254,14 +254,14 @@
"Transparent": {
"thumbColor": "#303a45",
"thumbBorderColor": "#303a45",
"hoverThumbColor": "#434e5b",
"hoverThumbBorderColor": "#434e5b",
"hoverThumbColor": "#9ca2aa",
"hoverThumbBorderColor": "#9ca2aa",
"hoverTrackColor": "#434e5b"
},
"thumbColor": "#303a45",
"thumbBorderColor": "#303a45",
"hoverThumbColor": "#434e5b",
"hoverThumbBorderColor": "#434e5b",
"hoverThumbColor": "#9ca2aa",
"hoverThumbBorderColor": "#9ca2aa",
"trackColor": "#434e5b",
"hoverTrackColor": "#434e5b",
@@ -269,14 +269,14 @@
"Transparent": {
"thumbColor": "#303a45",
"thumbBorderColor": "#303a45",
"hoverThumbColor": "#434e5b",
"hoverThumbBorderColor": "#434e5b",
"hoverThumbColor": "#9ca2aa",
"hoverThumbBorderColor": "#9ca2aa",
"hoverTrackColor": "#434e5b"
},
"thumbColor": "#303a45",
"thumbBorderColor": "#303a45",
"hoverThumbColor": "#434e5b",
"hoverThumbBorderColor": "#434e5b",
"hoverThumbColor": "#9ca2aa",
"hoverThumbBorderColor": "#9ca2aa",
"trackColor": "#434e5b",
"hoverTrackColor": "#434e5b"
}
@@ -349,7 +349,6 @@
},
"HeaderTab": {
"selectedBackground": "#303a45",
"selectedInactiveBackground": "#303a45",
"hoverBackground": "#303a45",
"hoverInactiveBackground": "#303a45",

View File

@@ -39,7 +39,7 @@ public class FlatDatePickerBorder
}
@Override
protected boolean isTableCellEditor( Component c ) {
protected boolean isCellEditor( Component c ) {
return c.getParent() instanceof JTable;
}
}

View File

@@ -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
}

View File

@@ -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 )
} )
}
}

View File

@@ -16,6 +16,9 @@
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.StringSelection;
import java.awt.datatransfer.Transferable;
@@ -91,6 +94,33 @@ public class FlatComponents2Test
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" } )
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
@@ -114,6 +144,10 @@ public class FlatComponents2Test
tableHeaderButtonCheckBox = new JCheckBox();
rowSelectionCheckBox = new JCheckBox();
columnSelectionCheckBox = new JCheckBox();
showHorizontalLinesCheckBox = new JCheckBox();
showVerticalLinesCheckBox = new JCheckBox();
intercellSpacingCheckBox = new JCheckBox();
redGridColorCheckBox = new JCheckBox();
//======== this ========
setLayout(new MigLayout(
@@ -127,6 +161,7 @@ public class FlatComponents2Test
"[]" +
"[::200]" +
"[150,grow]" +
"[]" +
"[]"));
//---- textFieldLabel ----
@@ -333,6 +368,26 @@ public class FlatComponents2Test
columnSelectionCheckBox.setText("column selection");
columnSelectionCheckBox.addActionListener(e -> columnSelectionChanged());
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
((JComboBox)((DefaultCellEditor)table1.getColumnModel().getColumn( 3 ).getCellEditor()).getComponent()).setEditable( true );
@@ -349,6 +404,10 @@ public class FlatComponents2Test
private JCheckBox tableHeaderButtonCheckBox;
private JCheckBox rowSelectionCheckBox;
private JCheckBox columnSelectionCheckBox;
private JCheckBox showHorizontalLinesCheckBox;
private JCheckBox showVerticalLinesCheckBox;
private JCheckBox intercellSpacingCheckBox;
private JCheckBox redGridColorCheckBox;
// JFormDesigner - End of variables declaration //GEN-END:variables
//---- class DummyTransferHandler -----------------------------------------

View File

@@ -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 {
contentType: "form/swing"
@@ -9,7 +9,7 @@ new FormModel {
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
"$columnConstraints": "[][200][200]"
"$rowConstraints": "[][][::200][150,grow][]"
"$rowConstraints": "[][][::200][150,grow][][]"
} ) {
name: "this"
add( new FormComponent( "javax.swing.JLabel" ) {
@@ -316,6 +316,46 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"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 ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 790, 715 )

View File

@@ -585,7 +585,7 @@ public class FlatDisabledIconsTest
private static ImageIcon loadIcon( String iconName ) {
ImageIcon icon = new ImageIcon( LightOrDarkIcon.class.getResource( iconName ) );
if( SystemInfo.IS_MAC || !MultiResolutionImageSupport.isAvailable() || !iconName.endsWith( ".png" ) )
if( SystemInfo.isMacOS || !MultiResolutionImageSupport.isAvailable() || !iconName.endsWith( ".png" ) )
return icon;
String iconName2x = iconName.replace( ".png", "@2x.png" );

View File

@@ -7,6 +7,7 @@ package com.formdev.flatlaf.testing;
import java.awt.*;
import java.beans.PropertyVetoException;
import javax.swing.*;
import com.formdev.flatlaf.extras.TriStateCheckBox;
import com.formdev.flatlaf.icons.FlatFileViewFloppyDriveIcon;
import com.formdev.flatlaf.util.UIScale;
import net.miginfocom.swing.*;
@@ -50,8 +51,10 @@ public class FlatInternalFrameTest
maximizableCheckBox.isSelected(),
iconifiableCheckBox.isSelected() );
if( iconCheckBox.isSelected() )
if( iconCheckBox.getState() == TriStateCheckBox.State.SELECTED )
internalFrame.setFrameIcon( new FlatFileViewFloppyDriveIcon() );
else if( iconCheckBox.getState() == TriStateCheckBox.State.UNSELECTED )
internalFrame.setFrameIcon( null );
if( menuBarCheckBox.isSelected() ) {
JMenuBar menuBar = new JMenuBar();
@@ -100,7 +103,7 @@ public class FlatInternalFrameTest
closableCheckBox = new JCheckBox();
iconifiableCheckBox = new JCheckBox();
maximizableCheckBox = new JCheckBox();
iconCheckBox = new JCheckBox();
iconCheckBox = new TriStateCheckBox();
menuBarCheckBox = new JCheckBox();
titleLabel = new JLabel();
titleField = new JTextField();
@@ -192,7 +195,7 @@ public class FlatInternalFrameTest
private JCheckBox closableCheckBox;
private JCheckBox iconifiableCheckBox;
private JCheckBox maximizableCheckBox;
private JCheckBox iconCheckBox;
private TriStateCheckBox iconCheckBox;
private JCheckBox menuBarCheckBox;
private JLabel titleLabel;
private JTextField titleField;

View File

@@ -1,4 +1,4 @@
JFDML JFormDesigner: "7.0.0.0.194" Java: "13.0.1" encoding: "UTF-8"
JFDML JFormDesigner: "7.0.2.0.298" Java: "14" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -50,7 +50,7 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1,alignx left,growx 0"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) {
name: "iconCheckBox"
"text": "Frame icon"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {

View File

@@ -62,7 +62,7 @@ public class FlatPaintingStringTest
add( new JLabel( "flatlaf" ) );
add( new JLabel( "0.25*scale" ) );
add( new JLabel( "0.5*scale" ) );
if( SystemInfo.IS_JAVA_9_OR_LATER ) {
if( SystemInfo.isJava_9_orLater ) {
add( new JLabel( "0.25" ) );
add( new JLabel( "0.5" ) );
add( new JLabel( "0.625" ) );
@@ -76,7 +76,7 @@ public class FlatPaintingStringTest
YCorrectionFunction none = (g, scaleFactor) -> 0;
YCorrectionFunction flatlaf = (g, scaleFactor) -> {
return SystemInfo.IS_JAVA_9_OR_LATER
return SystemInfo.isJava_9_orLater
? HiDPIUtils.computeTextYCorrection( g )
: (scaleFactor > 1 ? -(0.625f * scaleFactor) : 0);
};
@@ -100,7 +100,7 @@ public class FlatPaintingStringTest
add( scaleFactor, flatlaf );
add( scaleFactor, oneQSysScale );
add( scaleFactor, halfSysScale );
if( SystemInfo.IS_JAVA_9_OR_LATER ) {
if( SystemInfo.isJava_9_orLater ) {
add( scaleFactor, oneQ );
add( scaleFactor, half );
add( scaleFactor, fiveEights );
@@ -115,7 +115,7 @@ public class FlatPaintingStringTest
}
private void add( float scaleFactor, YCorrectionFunction correctionFunction ) {
if( SystemInfo.IS_JAVA_9_OR_LATER ) {
if( SystemInfo.isJava_9_orLater ) {
add( new Painter( scaleFactor, correctionFunction, 0 ), "split 4, gapx 0 0" );
add( new Painter( scaleFactor, correctionFunction, 0.25f ), "gapx 0 0" );
add( new Painter( scaleFactor, correctionFunction, 0.5f ), "gapx 0 0" );
@@ -161,7 +161,7 @@ public class FlatPaintingStringTest
this.yOffset = yOffset;
setBorder( new EmptyBorder( 2, 0, 2, 0 ) );
if( !SystemInfo.IS_JAVA_9_OR_LATER ) {
if( !SystemInfo.isJava_9_orLater ) {
Font font = getFont();
setFont( font.deriveFont( (float) Math.round( font.getSize() * scaleFactor ) ) );
}
@@ -183,7 +183,7 @@ public class FlatPaintingStringTest
FlatUIUtils.setRenderingHints( g2 );
// simulate component y position at a fraction
if( scaleFactor > 1 && SystemInfo.IS_JAVA_9_OR_LATER )
if( scaleFactor > 1 && SystemInfo.isJava_9_orLater )
g2.translate( 0, yOffset );
int width = getWidth();
@@ -199,7 +199,7 @@ public class FlatPaintingStringTest
// g.drawLine( 0, height2 - 1, width2, height2 - 1 );
int baseline = (int) Math.round( (insets.top + fm.getAscent()) * scaleFactor2
* (SystemInfo.IS_JAVA_9_OR_LATER ? scaleFactor : 1f) ) - 1;
* (SystemInfo.isJava_9_orLater ? scaleFactor : 1f) ) - 1;
int topline = height2 - baseline - 1;
g.setColor( Color.red );
@@ -211,7 +211,7 @@ public class FlatPaintingStringTest
g.translate( insets.left, 0 );
// scale
if( SystemInfo.IS_JAVA_9_OR_LATER )
if( SystemInfo.isJava_9_orLater )
((Graphics2D)g).scale( scaleFactor, scaleFactor );
// compute Y correction
@@ -244,7 +244,7 @@ public class FlatPaintingStringTest
}
private int scale( int value ) {
return SystemInfo.IS_JAVA_9_OR_LATER ? Math.round( value * scaleFactor ) : value;
return SystemInfo.isJava_9_orLater ? Math.round( value * scaleFactor ) : value;
}
}
}

View File

@@ -62,17 +62,21 @@ public class FlatTestFrame
private FlatInspector inspector;
public boolean useApplyComponentOrientation;
public boolean applyComponentOrientationToFrame;
public static FlatTestFrame create( String[] args, String title ) {
DemoPrefs.init( PREFS_ROOT_PATH );
// set scale factor
if( System.getProperty( FlatSystemProperties.UI_SCALE, System.getProperty( "sun.java2d.uiScale" ) ) == null ) {
if( System.getProperty( FlatSystemProperties.UI_SCALE ) == null ) {
String scaleFactor = DemoPrefs.getState().get( KEY_SCALE_FACTOR, null );
if( scaleFactor != null )
System.setProperty( FlatSystemProperties.UI_SCALE, scaleFactor );
}
// disable animated Laf change
System.setProperty( "flatlaf.animatedLafChange", "false" );
// set look and feel
DemoPrefs.initLaf( args );
@@ -101,9 +105,9 @@ public class FlatTestFrame
className.equals( "com.sun.java.swing.plaf.motif.MotifLookAndFeel" ) )
continue;
if( (SystemInfo.IS_WINDOWS && className.equals( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" )) ||
(SystemInfo.IS_MAC && className.equals( "com.apple.laf.AquaLookAndFeel" )) ||
(SystemInfo.IS_LINUX && className.equals( "com.sun.java.swing.plaf.gtk.GTKLookAndFeel" )) )
if( (SystemInfo.isWindows && className.equals( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" )) ||
(SystemInfo.isMacOS && className.equals( "com.apple.laf.AquaLookAndFeel" )) ||
(SystemInfo.isLinux && className.equals( "com.sun.java.swing.plaf.gtk.GTKLookAndFeel" )) )
name += " (F9)";
else if( className.equals( MetalLookAndFeel.class.getName() ) )
name += " (F12)";
@@ -114,13 +118,13 @@ public class FlatTestFrame
}
String substanceLightClassName = "org.pushingpixels.substance.api.skin.SubstanceBusinessLookAndFeel";
if( SystemInfo.IS_JAVA_9_OR_LATER && isClassAvailable( substanceLightClassName ) ) {
if( SystemInfo.isJava_9_orLater && isClassAvailable( substanceLightClassName ) ) {
lafModel.addElement( new LookAndFeelInfo( "Substance Business (F5)", substanceLightClassName ) );
registerSwitchToLookAndFeel( "F5", substanceLightClassName );
}
String substanceDarkClassName = "org.pushingpixels.substance.api.skin.SubstanceGraphiteAquaLookAndFeel";
if( SystemInfo.IS_JAVA_9_OR_LATER && isClassAvailable( substanceDarkClassName ) ) {
if( SystemInfo.isJava_9_orLater && isClassAvailable( substanceDarkClassName ) ) {
lafModel.addElement( new LookAndFeelInfo( "Substance Graphite Aqua (Ctrl+F5)", substanceDarkClassName ) );
registerSwitchToLookAndFeel( "ctrl F5", substanceDarkClassName );
}
@@ -138,7 +142,7 @@ public class FlatTestFrame
}
String looksWindowsClassName = "com.jgoodies.looks.windows.WindowsLookAndFeel";
if( SystemInfo.IS_WINDOWS && isClassAvailable( looksWindowsClassName ) ) {
if( SystemInfo.isWindows && isClassAvailable( looksWindowsClassName ) ) {
lafModel.addElement( new LookAndFeelInfo( "JGoodies Looks Windows (F7)", looksWindowsClassName ) );
registerSwitchToLookAndFeel( "F7", looksWindowsClassName );
}
@@ -146,7 +150,7 @@ public class FlatTestFrame
lookAndFeelComboBox.setModel( lafModel );
updateScaleFactorComboBox();
String scaleFactor = System.getProperty( FlatSystemProperties.UI_SCALE, System.getProperty( "sun.java2d.uiScale" ) );
String scaleFactor = System.getProperty( FlatSystemProperties.UI_SCALE );
if( scaleFactor != null )
scaleFactorComboBox.setSelectedItem( scaleFactor );
@@ -161,11 +165,11 @@ public class FlatTestFrame
registerSwitchToLookAndFeel( "F8", FlatTestLaf.class.getName() );
if( SystemInfo.IS_WINDOWS )
if( SystemInfo.isWindows )
registerSwitchToLookAndFeel( "F9", "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" );
else if( SystemInfo.IS_MAC )
else if( SystemInfo.isMacOS )
registerSwitchToLookAndFeel( "F9", "com.apple.laf.AquaLookAndFeel" );
else if( SystemInfo.IS_LINUX )
else if( SystemInfo.isLinux )
registerSwitchToLookAndFeel( "F9", "com.sun.java.swing.plaf.gtk.GTKLookAndFeel" );
registerSwitchToLookAndFeel( "F12", MetalLookAndFeel.class.getName() );
registerSwitchToLookAndFeel( "F11", NimbusLookAndFeel.class.getName() );
@@ -436,7 +440,9 @@ public class FlatTestFrame
? ComponentOrientation.RIGHT_TO_LEFT
: ComponentOrientation.LEFT_TO_RIGHT;
if( useApplyComponentOrientation )
if( applyComponentOrientationToFrame )
applyComponentOrientation( orientation );
else if( useApplyComponentOrientation )
content.applyComponentOrientation( orientation );
else {
updateComponentsRecur( content, (c, type) -> {

View File

@@ -22,6 +22,7 @@ import java.awt.event.*;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import javax.swing.*;
import com.formdev.flatlaf.FlatClientProperties;
import net.miginfocom.swing.*;
@@ -39,6 +40,7 @@ public class FlatWindowDecorationsTest
JDialog.setDefaultLookAndFeelDecorated( true );
FlatTestFrame frame = FlatTestFrame.create( args, "FlatWindowDecorationsTest" );
frame.applyComponentOrientationToFrame = true;
// WARNING: Do not this in real-world programs.
// frame.setUndecorated( true );
@@ -117,6 +119,32 @@ public class FlatWindowDecorationsTest
rootPane.putClientProperty( FlatClientProperties.MENU_BAR_EMBEDDED, menuBarEmbeddedCheckBox.isSelected() );
}
private void addMenu() {
JMenu menu = new JMenu( "Hello" );
menu.add( new JMenuItem( "world" ) );
menuBar.add( menu );
menuBar.revalidate();
}
private void removeMenu() {
int menuCount = menuBar.getMenuCount();
if( menuCount <= 0 )
return;
menuBar.remove( menuCount - 1 );
menuBar.revalidate();
}
private void changeMenu() {
int menuCount = menuBar.getMenuCount();
if( menuCount <= 0 )
return;
int len = new Random().nextInt( 20 );
String text = "1234567890abcdefghij".substring( 0, len + 1 );
menuBar.getMenu( menuCount - 1 ).setText( text );
}
private void resizableChanged() {
Window window = SwingUtilities.windowForComponent( this );
if( window instanceof Frame )
@@ -218,6 +246,9 @@ public class FlatWindowDecorationsTest
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
menuBarCheckBox = new JCheckBox();
JButton addMenuButton = new JButton();
JButton removeMenuButton = new JButton();
JButton changeMenuButton = new JButton();
menuBarEmbeddedCheckBox = new JCheckBox();
resizableCheckBox = new JCheckBox();
maximizedBoundsCheckBox = new JCheckBox();
@@ -271,7 +302,7 @@ public class FlatWindowDecorationsTest
"ltr,insets dialog,hidemode 3",
// columns
"[left]para" +
"[fill]",
"[left]",
// rows
"para[]0" +
"[]0" +
@@ -287,6 +318,21 @@ public class FlatWindowDecorationsTest
menuBarCheckBox.addActionListener(e -> menuBarChanged());
add(menuBarCheckBox, "cell 0 0");
//---- addMenuButton ----
addMenuButton.setText("Add menu");
addMenuButton.addActionListener(e -> addMenu());
add(addMenuButton, "cell 1 0 1 2,align left top,grow 0 0");
//---- removeMenuButton ----
removeMenuButton.setText("Remove menu");
removeMenuButton.addActionListener(e -> removeMenu());
add(removeMenuButton, "cell 1 0 1 2,align left top,grow 0 0");
//---- changeMenuButton ----
changeMenuButton.setText("Change menu");
changeMenuButton.addActionListener(e -> changeMenu());
add(changeMenuButton, "cell 1 0 1 2,align left top,grow 0 0");
//---- menuBarEmbeddedCheckBox ----
menuBarEmbeddedCheckBox.setText("embedded menu bar");
menuBarEmbeddedCheckBox.setSelected(true);

View File

@@ -1,4 +1,4 @@
JFDML JFormDesigner: "7.0.2.0.298" Java: "13.0.2" encoding: "UTF-8"
JFDML JFormDesigner: "7.0.2.0.298" Java: "14" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -8,7 +8,7 @@ new FormModel {
}
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
"$columnConstraints": "[left]para[fill]"
"$columnConstraints": "[left]para[left]"
"$rowConstraints": "para[]0[]0[]0[][][top][]"
} ) {
name: "this"
@@ -23,6 +23,27 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "addMenuButton"
"text": "Add menu"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "addMenu", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0 1 2,align left top,grow 0 0"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "removeMenuButton"
"text": "Remove menu"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "removeMenu", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0 1 2,align left top,grow 0 0"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "changeMenuButton"
"text": "Change menu"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "changeMenu", false ) )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 0 1 2,align left top,grow 0 0"
} )
add( new FormComponent( "javax.swing.JCheckBox" ) {
name: "menuBarEmbeddedCheckBox"
"text": "embedded menu bar"
@@ -238,7 +259,7 @@ new FormModel {
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 450, 380 )
"size": new java.awt.Dimension( 550, 380 )
} )
add( new FormContainer( "javax.swing.JMenuBar", new FormLayoutManager( class javax.swing.JMenuBar ) ) {
name: "menuBar"

View File

@@ -91,7 +91,7 @@ public class UIDefaultsDump
dump( FlatLightLaf.class.getName(), dir );
dump( FlatDarkLaf.class.getName(), dir );
if( SystemInfo.IS_WINDOWS ) {
if( SystemInfo.isWindows ) {
dump( FlatIntelliJLaf.class.getName(), dir );
dump( FlatDarculaLaf.class.getName(), dir );
}
@@ -100,11 +100,11 @@ public class UIDefaultsDump
// dump( MetalLookAndFeel.class.getName(), dir );
// dump( NimbusLookAndFeel.class.getName(), dir );
//
// if( SystemInfo.IS_WINDOWS )
// if( SystemInfo.isWindows )
// dump( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel", dir );
// else if( SystemInfo.IS_MAC )
// else if( SystemInfo.isMacOS )
// dump( "com.apple.laf.AquaLookAndFeel", dir );
// else if( SystemInfo.IS_LINUX )
// else if( SystemInfo.isLinux )
// dump( "com.sun.java.swing.plaf.gtk.GTKLookAndFeel", dir );
//
// dump( "com.jgoodies.looks.plastic.PlasticLookAndFeel", dir );
@@ -120,6 +120,9 @@ public class UIDefaultsDump
// }
// dumpIntelliJThemes( dir );
// dump UI keys
UIDefaultsKeysDump.main( new String[0] );
}
@SuppressWarnings( "unused" )
@@ -169,9 +172,9 @@ public class UIDefaultsDump
? BasicLookAndFeel.class.getSimpleName()
: lookAndFeel.getClass().getSimpleName();
}
String osSuffix = (SystemInfo.IS_MAC && lookAndFeel instanceof FlatLaf)
String osSuffix = (SystemInfo.isMacOS && lookAndFeel instanceof FlatLaf)
? "-mac"
: ((SystemInfo.IS_LINUX && lookAndFeel instanceof FlatLaf)
: ((SystemInfo.isLinux && lookAndFeel instanceof FlatLaf)
? "-linux"
: "");
String javaVersion = System.getProperty( "java.version" );
@@ -183,9 +186,9 @@ public class UIDefaultsDump
File origFile = null;
if( !osSuffix.isEmpty() && nameSuffix.isEmpty() )
origFile = new File( dir, name + nameSuffix + "_" + javaVersion + ".txt" );
else if( lookAndFeel instanceof FlatIntelliJLaf && SystemInfo.IS_WINDOWS )
else if( lookAndFeel instanceof FlatIntelliJLaf && SystemInfo.isWindows )
origFile = new File( dir, "FlatLightLaf_" + javaVersion + ".txt" );
else if( lookAndFeel instanceof FlatDarculaLaf && SystemInfo.IS_WINDOWS )
else if( lookAndFeel instanceof FlatDarculaLaf && SystemInfo.isWindows )
origFile = new File( dir, "FlatDarkLaf_" + javaVersion + ".txt" );
if( origFile != null ) {
try {

View File

@@ -0,0 +1,79 @@
/*
* 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.uidefaults;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Locale;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import com.formdev.flatlaf.*;
/**
* Collects all FlatLaf UI defaults keys and dumps them to a file.
*
* @author Karl Tauber
*/
public class UIDefaultsKeysDump
{
public static void main( String[] args ) {
Locale.setDefault( Locale.ENGLISH );
System.setProperty( "sun.java2d.uiScale", "1x" );
System.setProperty( FlatSystemProperties.UI_SCALE, "1x" );
File keysFile = new File( "../flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt" );
HashSet<String> keys = new HashSet<>();
collectKeys( FlatLightLaf.class.getName(), keys );
collectKeys( FlatDarkLaf.class.getName(), keys );
collectKeys( FlatIntelliJLaf.class.getName(), keys );
collectKeys( FlatDarculaLaf.class.getName(), keys );
try( Writer fileWriter = new BufferedWriter( new FileWriter( keysFile ) ) ) {
String[] sortedKeys = keys.toArray( new String[keys.size()] );
Arrays.sort( sortedKeys );
for( String key : sortedKeys ) {
fileWriter.write( key );
fileWriter.write( "\n" );
}
} catch( IOException ex ) {
ex.printStackTrace();
}
}
private static void collectKeys( String lookAndFeelClassName, HashSet<String> keys ) {
try {
UIManager.setLookAndFeel( lookAndFeelClassName );
} catch( Exception ex ) {
ex.printStackTrace();
return;
}
UIDefaults defaults = UIManager.getLookAndFeel().getDefaults();
for( Object key : defaults.keySet() ) {
if( key instanceof String )
keys.add( (String) key );
}
}
}

View File

@@ -348,3 +348,5 @@ ToolTip.background=#eeeeff
Tree.background=#fff0ff
Tree.paintLines=true
Tree.hash=#ff0000
Tree.editorBorder=1,1,1,1,#f00
Tree.editorBorderSelectionColor=#00f

View File

@@ -7,6 +7,9 @@
- ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
+ ProgressBar.font [active] Cantarell plain 13 javax.swing.plaf.FontUIResource [UI]
- ScrollBar.minimumThumbSize 10,10 javax.swing.plaf.DimensionUIResource [UI]
+ ScrollBar.minimumThumbSize 18,18 javax.swing.plaf.DimensionUIResource [UI]
- ScrollBar.thumbArc 0
+ ScrollBar.thumbArc 999

View File

@@ -22,6 +22,9 @@
- ScrollBar.hoverThumbWithTrack false
+ ScrollBar.hoverThumbWithTrack true
- ScrollBar.minimumThumbSize 10,10 javax.swing.plaf.DimensionUIResource [UI]
+ ScrollBar.minimumThumbSize 18,18 javax.swing.plaf.DimensionUIResource [UI]
- ScrollBar.thumbArc 0
+ ScrollBar.thumbArc 999

View File

@@ -65,6 +65,7 @@ Button.arc 6
Button.background #4c5052 javax.swing.plaf.ColorUIResource [UI]
Button.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatButtonBorder [UI]
Button.borderColor #5e6060 javax.swing.plaf.ColorUIResource [UI]
Button.borderWidth 1
Button.darkShadow #7e7e7e javax.swing.plaf.ColorUIResource [UI]
Button.default.background #365880 javax.swing.plaf.ColorUIResource [UI]
Button.default.boldText true
@@ -196,7 +197,7 @@ ComboBox.editorColumns 0
ComboBox.font [active] $defaultFont [UI]
ComboBox.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
ComboBox.isEnterSelectablePopup false
ComboBox.maximumRowCount 20
ComboBox.maximumRowCount 15
ComboBox.minimumWidth 72
ComboBox.noActionOnKeyNavigation false
ComboBox.padding 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI]
@@ -475,6 +476,7 @@ List.selectionBackground #4b6eaf javax.swing.plaf.ColorUIResource [UI]
List.selectionForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
List.selectionInactiveBackground #0d293e javax.swing.plaf.ColorUIResource [UI]
List.selectionInactiveForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
List.showCellFocusIndicator false
List.timeFactor 1000
ListUI com.formdev.flatlaf.ui.FlatListUI
@@ -752,6 +754,7 @@ Resizable.resizeBorder [lazy] 4,4,4,4 false com.formdev.flatlaf.ui.F
#---- RootPane ----
RootPane.activeBorderColor #4d5154 com.formdev.flatlaf.util.DerivedColor [UI] darken(7% autoInverse)
RootPane.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatRootPaneUI$FlatWindowBorder [UI]
RootPane.borderDragThickness 5
RootPane.cornerDragWidth 16
@@ -764,7 +767,9 @@ RootPane.defaultButtonWindowKeyBindings length=8 [Ljava.lang.Object;
[5] press
[6] ctrl released ENTER
[7] release
RootPane.honorMinimumSizeOnResize true
RootPane.honorDialogMinimumSizeOnResize true
RootPane.honorFrameMinimumSizeOnResize false
RootPane.inactiveBorderColor #484c4e com.formdev.flatlaf.util.DerivedColor [UI] darken(5% autoInverse)
RootPaneUI com.formdev.flatlaf.ui.FlatRootPaneUI
@@ -779,8 +784,8 @@ ScrollBar.hoverButtonBackground #484c4e com.formdev.flatlaf.util.DerivedColor
ScrollBar.hoverThumbColor #6e767a com.formdev.flatlaf.util.DerivedColor [UI] lighten(10%)
ScrollBar.hoverThumbWithTrack false
ScrollBar.hoverTrackColor #484c4f com.formdev.flatlaf.util.DerivedColor [UI] lighten(4%)
ScrollBar.maximumThumbSize 4096,4096 javax.swing.plaf.DimensionUIResource [UI]
ScrollBar.minimumThumbSize 8,8 javax.swing.plaf.DimensionUIResource [UI]
ScrollBar.maximumThumbSize 100000,100000 javax.swing.plaf.DimensionUIResource [UI]
ScrollBar.minimumThumbSize 10,10 javax.swing.plaf.DimensionUIResource [UI]
ScrollBar.pressedButtonBackground #54595c com.formdev.flatlaf.util.DerivedColor [UI] lighten(10%)
ScrollBar.pressedThumbColor #7a8387 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15%)
ScrollBar.pressedThumbWithTrack false
@@ -933,6 +938,7 @@ Table.background #45494a javax.swing.plaf.ColorUIResource [UI]
Table.cellFocusColor #000000 javax.swing.plaf.ColorUIResource [UI]
Table.cellMargins 2,3,2,3 javax.swing.plaf.InsetsUIResource [UI]
Table.cellNoFocusBorder [lazy] 2,3,2,3 false com.formdev.flatlaf.ui.FlatTableCellBorder$Default [UI] lineColor=#000000 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
Table.consistentHomeEndKeyBehavior true
Table.descendingSortIcon [lazy] 10,5 com.formdev.flatlaf.icons.FlatDescendingSortIcon [UI]
Table.dropCellBackground [lazy] #3c588b javax.swing.plaf.ColorUIResource [UI]
Table.dropCellForeground [lazy] #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -1187,7 +1193,7 @@ Tree.drawsFocusBorderAroundIcon false
Tree.dropCellBackground [lazy] #3c588b javax.swing.plaf.ColorUIResource [UI]
Tree.dropCellForeground [lazy] #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Tree.dropLineColor [lazy] #6d8ac0 javax.swing.plaf.ColorUIResource [UI]
Tree.editorBorder [lazy] line: #000000 java.awt.Color 1 false 1,1,1,1 true javax.swing.plaf.BorderUIResource$LineBorderUIResource [UI]
Tree.editorBorder [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatLineBorder [UI] lineColor=#000000 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
Tree.expandedIcon [lazy] 11,11 com.formdev.flatlaf.icons.FlatTreeExpandedIcon [UI]
Tree.font [active] $defaultFont [UI]
Tree.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
@@ -1213,6 +1219,7 @@ Tree.selectionBorderColor #000000 javax.swing.plaf.ColorUIResource [UI]
Tree.selectionForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Tree.selectionInactiveBackground #0d293e javax.swing.plaf.ColorUIResource [UI]
Tree.selectionInactiveForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Tree.showCellFocusIndicator false
Tree.textBackground #45494a javax.swing.plaf.ColorUIResource [UI]
Tree.textForeground #bbbbbb javax.swing.plaf.ColorUIResource [UI]
Tree.timeFactor 1000

View File

@@ -38,8 +38,6 @@
+ CheckBox.icon.style filled
+ CheckBox.icon[filled].focusWidth 2
- CheckBox.icon[filled].selectedFocusedCheckmarkColor #e3f1fa javax.swing.plaf.ColorUIResource [UI]
- ComboBox.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatRoundBorder [UI]

View File

@@ -7,6 +7,9 @@
- ProgressBar.font [active] Segoe UI plain 10 javax.swing.plaf.FontUIResource [UI]
+ ProgressBar.font [active] Cantarell plain 13 javax.swing.plaf.FontUIResource [UI]
- ScrollBar.minimumThumbSize 10,10 javax.swing.plaf.DimensionUIResource [UI]
+ ScrollBar.minimumThumbSize 18,18 javax.swing.plaf.DimensionUIResource [UI]
- ScrollBar.thumbArc 0
+ ScrollBar.thumbArc 999

Some files were not shown because too many files have changed in this diff Show More