Compare commits

..

68 Commits
0.28 ... 0.33

Author SHA1 Message Date
Karl Tauber
8f60755f02 release 0.33 2020-04-27 18:39:02 +02:00
Karl Tauber
44c455419b IntelliJ Themes: added Java 9 module descriptor to flatlaf-intellij-themes-<version>.jar 2020-04-27 18:25:49 +02:00
Karl Tauber
129bc9b3ae IntelliJ Themes Pack: use absolute resource location for loading themes (PR #88, issue #89) 2020-04-27 16:28:38 +02:00
Karl T
08ba7dd065 Merge pull request #88 from matt-pan/patch-1
IntelliJ Themes: Fix relative resource location for Material UI Lite Themes
2020-04-27 16:14:50 +02:00
matt-pan
e9cb85127a Fix relative resource location
Using flatlaf intellijthemes as a dependency does not work for all themes from the subfolder 'material-theme-ui-lite' because of the usage of ".." to  to load the resource.
2020-04-25 17:46:57 +02:00
Karl Tauber
c9c703fe98 support multi-resolution images in disabled icons on Java 9+ (e.g. @2x icons on macOS) (issue #70) 2020-04-24 17:07:30 +02:00
Karl Tauber
0141dfbea2 CHANGELOG.md: added IntelliJ Theme fixes 2020-04-24 00:55:49 +02:00
Karl Tauber
fb7dafbc39 Merge branch 'disabled-icons' into master 2020-04-24 00:54:05 +02:00
Karl Tauber
0660f9a511 improved creation of disabled grayscale icons (issue #70) 2020-04-24 00:46:16 +02:00
Karl Tauber
a39ae5a8c5 FlatDisabledIconsTest: support palette icons 2020-04-24 00:16:44 +02:00
Karl Tauber
03e22e3dbf Demo: exclude module-info.class from JAR 2020-04-23 23:54:54 +02:00
Karl Tauber
d5e9fd0e5c IntelliJ Themes:
- fixed ComboBox size and Spinner border in all Material UI Lite themes
- limit tree row height in all Material UI Lite themes and some other themes
2020-04-23 23:46:14 +02:00
Karl Tauber
141138ebea IntelliJ Themes Pack: added readme 2020-04-23 18:16:57 +02:00
Karl Tauber
9026efeb26 release 0.32 2020-04-23 16:04:31 +02:00
Karl Tauber
2ab023beb0 UIDefaultsDump: used FlatAllIJThemes instead of IJThemesManager to get list of IJ themes 2020-04-23 14:02:25 +02:00
Karl Tauber
8e471fd720 IntelliJ Themes: generated Java classes for all themes (used IJThemesClassGenerator) 2020-04-23 13:59:59 +02:00
Karl Tauber
13cbbd8bc1 IntelliJ Themes: moved themes into own sub-project and build a JAR that contains all themes 2020-04-23 11:06:12 +02:00
Karl Tauber
b08ccc9767 UIDefaultsLoader: no longer support/use derived colors without base colors 2020-04-22 11:49:44 +02:00
Karl Tauber
801a7023a4 IntelliJ Themes: fixed toggle button selected backgrounds (issue #86) 2020-04-22 10:30:14 +02:00
Karl Tauber
dd06b554da ToggleButton: compute selected background color based on current component background (issue #32) 2020-04-22 09:48:58 +02:00
Karl Tauber
23f0504b30 IntelliJ Themes: fixed toggle button unselected background in most themes and foreground in Darcula and One Dark themes (issue #86) 2020-04-21 14:39:11 +02:00
Karl Tauber
262d172cde IntelliJ Themes: removed code that is obsolete since supporting gradient button background/border colors in commit de82dac8
make sure that gradient colors are predefined for improved compatibility
this fixes button background in Arc themes and toggle button background in Dark Flat and Light Flat themes
2020-04-21 10:02:11 +02:00
Karl Tauber
be81cb7876 IntelliJ Themes Demo: removed IntelliJ Light Preview theme because Flat light already uses colors from this theme since commit 78d5e03a 2020-04-21 09:41:53 +02:00
Karl Tauber
aaf9bd33cb UIDefaultsDump: support dumping IntelliJ themes (disabled)
can be used to check changes to UI defaults when modifying the IntelliJ theme converter
2020-04-21 09:37:24 +02:00
Karl Tauber
7381e2141f IntelliJ Themes Demo: updated Dracula, Gruvbox and Hiberbee themes (used IJThemesUpdater) 2020-04-21 00:10:18 +02:00
Karl Tauber
3923d941c1 IntelliJ Themes Demo: updated Material UI Lite themes (used IJThemesUpdater)
List.selectionInactiveBackground and Tree.selectionInactiveBackground now have better visible colors; other changes seem to be not used in FlatLaf
2020-04-20 23:28:39 +02:00
Karl Tauber
d134c33499 release 0.31 2020-04-20 11:44:00 +02:00
Karl Tauber
a2b615d4a7 focus indication border (or background) no longer hidden when temporary loosing focus (e.g. showing a popup menu) 2020-04-20 11:27:29 +02:00
Karl Tauber
37ecd9bd4f FlatDisabledIconsTest: renamed @2x_dark.png icons to _dark@2x.png so that they are automatically loaded on macOS Retina displays 2020-04-19 10:23:40 +02:00
Karl Tauber
2e1acb7871 List, Table and Tree: item selection color of focused components no longer change from blue to gray when temporary loosing focus (e.g. showing a popup menu) 2020-04-17 19:14:48 +02:00
Karl Tauber
2250185487 Testing: FlatDisabledIconsTest: use intellij dark icons in dark themes 2020-04-14 12:41:14 +02:00
Karl Tauber
97a1bf90a4 README.md: added Total Validator and GUIslice Builder to list of projects that use FlatLaf 2020-04-14 10:16:37 +02:00
Karl Tauber
73cb63c9f9 Testing: added FlatDisabledIconsTest to compare different methods to create disabled icons 2020-04-13 15:48:07 +02:00
Karl Tauber
f61f6b6006 Merge pull request #72 from basix86:disabledIcon into branch disabled-icons
Improve disabled button rendering #70
2020-04-11 13:57:05 +02:00
Karl Tauber
7d3ffbc45a README.md: added MegaMek and MekHQ to list of projects that use FlatLaf 2020-04-09 17:26:08 +02:00
Karl Tauber
93ac6fa88a README.md: added XMLmind XML Editor, MeteoInfo and lsfusion platform to list of projects that use FlatLaf 2020-04-09 14:43:14 +02:00
Karl Tauber
09d19a13b7 release 0.30 2020-04-09 13:51:11 +02:00
Karl Tauber
9eaee8d2c4 Windows: fixed rendering of Unicode characters (issue #81) 2020-04-09 13:39:37 +02:00
Karl Tauber
4da0c342f8 Theme Editor: paint real colors and HSL values in overlay on right side of editor (instead of behind editor text; previous commit) 2020-04-06 15:42:58 +02:00
Karl Tauber
70fed22737 Theme Editor: use real colors as background of color strings 2020-04-05 23:18:39 +02:00
Karl Tauber
acb62e347a Theme Editor: mark invalid color values with a curly underline 2020-04-05 18:04:28 +02:00
Karl Tauber
78d06d82d6 Theme Editor: fixed mark occurrences for property references (starting with '$') and property references in function parameters 2020-04-05 17:16:09 +02:00
Karl Tauber
4777bdd250 Theme Editor: do not mark token at caret if it does not occur elsewhere 2020-04-05 15:23:40 +02:00
Karl Tauber
266e9d92d5 Theme Editor: enabled mark occurrences 2020-04-05 14:37:25 +02:00
Karl Tauber
54c14d0dc8 Theme Editor: added editor theme 2020-04-05 11:56:28 +02:00
Karl Tauber
d59d353c2e Theme Editor: added token maker (based on .properties token maker) 2020-04-04 23:32:48 +02:00
Karl Tauber
204da2175b Theme Editor: initial commit 2020-04-04 14:13:20 +02:00
basix86
a8f659f2ac Pull Request #72: Improve disabled button rendering #70 2020-04-02 21:25:41 +02:00
basix86
a878ebc368 Merge branch 'master' into disabledIcon 2020-04-02 21:25:41 +02:00
Karl Tauber
152f235ca1 release 0.29 2020-04-01 23:26:47 +02:00
Karl Tauber
d094709dc8 ComboBox: no longer ignore JComboBox.prototypeDisplayValue when computing popup width (issue #80) 2020-03-31 18:53:55 +02:00
Karl Tauber
97d5792341 ComboBox: made class FlatComboPopup protected to allow subclassing (issue #80) 2020-03-31 17:29:12 +02:00
Karl Tauber
9429ba7d48 support specifying custom scale factor in system property flatlaf.uiScale also for Java 9 and later 2020-03-31 12:17:05 +02:00
Karl Tauber
af89dd13c1 support changing default font used for all components with automatic scaling UI if using larger font 2020-03-31 12:15:51 +02:00
Karl Tauber
60c6c5b37a FlatLineBorder: support specifying painted line thickness 2020-03-29 23:30:04 +02:00
Karl Tauber
5ed40cab1d Demo: support using own FlatLaf themes (.properties files) that are located in working directory of Demo application 2020-03-29 18:02:35 +02:00
Karl Tauber
1bebfe9cf2 IntelliJ Themes Demo: updated Arc, Arc Orange and Hiberbee themes (used IJThemesUpdater) 2020-03-28 09:41:51 +01:00
Karl Tauber
e2618c37a2 Testing: added "size variant" combobox to control bar if Aqua or Nimbus LaF are active 2020-03-28 09:41:03 +01:00
Karl Tauber
f2ab848c46 FlatOptionPaneTest: scroll pane added 2020-03-27 23:49:25 +01:00
Karl Tauber
93b82c0e97 FlatDefaultsAddon: added afterDefaultsLoading() method to allow modification of UI defaults by Addons 2020-03-27 23:21:55 +01:00
Karl Tauber
4ac5ad06f2 IntelliJ Themes: simplified applying theme properties to UI defaults 2020-03-27 18:54:30 +01:00
Karl Tauber
a3788038bb Tree: fixed repainting wide selection on focus gained/lost 2020-03-27 10:51:20 +01:00
Karl Tauber
12af2de99e no longer use system property sun.java2d.uiScale (Java 8 only) 2020-03-27 10:44:43 +01:00
Karl Tauber
225b722b1b Linux: fixed wrong font size if GDK_SCALE environment variable is set or if running on JetBrains Runtime (issue #69) 2020-03-26 17:20:09 +01:00
Karl Tauber
1d9c8ca65e Linux: fixed scaling if GDK_SCALE environment variable is set or if running on JetBrains Runtime (issue #69) 2020-03-26 13:06:12 +01:00
mmatessi
8ee6588d46 fix review #70 2020-03-05 13:08:49 +01:00
mmatessi
7c25f087fb NPE getDisabledIcon Fix 2020-03-05 13:07:15 +01:00
mmatessi
d0b0f098d9 disabledIcon 2020-03-05 13:07:15 +01:00
252 changed files with 9310 additions and 1701 deletions

View File

@@ -1,6 +1,63 @@
FlatLaf Change Log
==================
## 0.33
- Improved creation of disabled grayscale icons used in disabled buttons, labels
and tabs. They now have more contrast and are lighter in light themes and
darker in dark themes. (issue #70)
- IntelliJ Themes: Fixed ComboBox size and Spinner border in all Material UI
Lite themes and limit tree row height in all Material UI Lite themes and some
other themes.
- IntelliJ Themes: Material UI Lite themes did not work when using
[IntelliJ Themes Pack](flatlaf-intellij-themes) addon. (PR #88, issue #89)
- IntelliJ Themes: Added Java 9 module descriptor to
`flatlaf-intellij-themes-<version>.jar`.
## 0.32
- New [IntelliJ Themes Pack](flatlaf-intellij-themes) addon bundles many popular
open-source 3rd party themes from JetBrains Plugins Repository into a JAR and
provides Java classes to use them.
- IntelliJ Themes: Fixed button and toggle button colors. (issue #86)
- Updated IntelliJ Themes in demo to the latest versions.
- ToggleButton: Compute selected background color based on current component
background. (issue #32)
## 0.31
- Focus indication border (or background) no longer hidden when temporary
loosing focus (e.g. showing a popup menu).
- List, Table and Tree: Item selection color of focused components no longer
change from blue to gray when temporary loosing focus (e.g. showing a popup
menu).
## 0.30
- Windows: Fixed rendering of Unicode characters. Previously not all Unicode
characters were rendered on Windows. (issue #81)
## 0.29
- Linux: Fixed scaling if `GDK_SCALE` environment variable is set or if running
on JetBrains Runtime. (issue #69)
- Tree: Fixed repainting wide selection on focus gained/lost.
- ComboBox: No longer ignore `JComboBox.prototypeDisplayValue` when computing
popup width. (issue #80)
- Support changing default font used for all components with automatic scaling
UI if using larger font. Use `UIManager.put( "defaultFont", myFont );`
- No longer use system property `sun.java2d.uiScale`. (Java 8 only)
- Support specifying custom scale factor in system property `flatlaf.uiScale`
also for Java 9 and later.
- Demo: Support using own FlatLaf themes (`.properties` files) that are located
in working directory of Demo application. Shown in the "Themes" list under
category "Current Directory".
## 0.28
- PasswordField: Warn about enabled Caps Lock.

View File

@@ -19,7 +19,8 @@ IntelliJ IDEA 2019.2+ and uses almost the same colors and icons.
IntelliJ Platform Themes
------------------------
FlatLaf can use 3rd party themes created for IntelliJ Platform:
FlatLaf can use 3rd party themes created for IntelliJ Platform (see
[IntelliJ Themes Pack](flatlaf-intellij-themes)):
![Cyan Light Demo](images/CyanLightDemo.png)
@@ -70,6 +71,7 @@ Addons
- [SwingX](flatlaf-swingx)
- [JIDE Common Layer](flatlaf-jide-oss)
- [IntelliJ Themes Pack](flatlaf-intellij-themes)
Projects using FlatLaf
@@ -79,7 +81,13 @@ 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)
- [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)
- [MegaMek](https://github.com/MegaMek/megamek) v0.47.4 and
[MekHQ](https://github.com/MegaMek/mekhq) v0.47.5
- [GUIslice Builder](https://github.com/ImpulseAdventure/GUIslice-Builder)
0.13.b024
- [Rest Suite](https://github.com/supanadit/restsuite)
- [ControllerBuddy](https://github.com/bwRavencl/ControllerBuddy)
- [SpringRemote](https://github.com/HaleyWang/SpringRemote)
@@ -89,6 +97,8 @@ 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
- [lsfusion platform](https://github.com/lsfusion/platform)
- and more...

View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/
val releaseVersion = "0.28"
val developmentVersion = "0.29-SNAPSHOT"
val releaseVersion = "0.33"
val developmentVersion = "0.34-SNAPSHOT"
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion

View File

@@ -23,6 +23,11 @@ plugins {
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
sourceSets {
create( "java9" ) {
java {
setSrcDirs( listOf( "src/main/java9" ) )
}
}
create( "module-info" ) {
java {
// include "src/main/java" here to get compile errors if classes are
@@ -52,6 +57,12 @@ tasks {
archiveBaseName.set( "flatlaf" )
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
manifest.attributes( "Multi-Release" to "true" )
into( "META-INF/versions/9" ) {
from( sourceSets["java9"].output )
}
from( sourceSets["module-info"].output ) {
include( "module-info.class" )
}

View File

@@ -17,6 +17,8 @@
package com.formdev.flatlaf;
import java.io.InputStream;
import javax.swing.LookAndFeel;
import javax.swing.UIDefaults;
/**
* Addon for FlatLaf UI defaults.
@@ -50,6 +52,13 @@ public abstract class FlatDefaultsAddon
return addonClass.getResourceAsStream( propertiesName );
}
/**
* Allows modifying UI defaults after loading UI defaults.
* The default implementation does nothing.
*/
public void afterDefaultsLoading( LookAndFeel laf, UIDefaults defaults ) {
}
/**
* Returns the priority used to sort addon loading.
* The order is only important if you want overwrite UI defaults of other addons.

View File

@@ -21,22 +21,33 @@ import java.awt.Component;
import java.awt.Container;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Image;
import java.awt.KeyEventPostProcessor;
import java.awt.KeyboardFocusManager;
import java.awt.RenderingHints;
import java.awt.Toolkit;
import java.awt.Window;
import java.awt.event.KeyEvent;
import java.awt.image.FilteredImageSource;
import java.awt.image.ImageFilter;
import java.awt.image.ImageProducer;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.lang.ref.WeakReference;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.ServiceLoader;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.AbstractButton;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JRootPane;
import javax.swing.JTabbedPane;
@@ -46,10 +57,15 @@ import javax.swing.SwingUtilities;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.UIDefaults.ActiveValue;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicLookAndFeel;
import javax.swing.text.StyleContext;
import javax.swing.text.html.HTMLEditorKit;
import com.formdev.flatlaf.util.GrayFilter;
import com.formdev.flatlaf.util.MultiResolutionImageSupport;
import com.formdev.flatlaf.util.SystemInfo;
import com.formdev.flatlaf.util.UIScale;
@@ -111,6 +127,30 @@ public abstract class FlatLaf
return true;
}
@Override
public Icon getDisabledIcon( JComponent component, Icon icon ) {
if( icon instanceof ImageIcon ) {
Object grayFilter = UIManager.get( "Component.grayFilter" );
if( !(grayFilter instanceof ImageFilter) ) {
// fallback
grayFilter = isDark()
? new GrayFilter( -20, -70, 100 )
: new GrayFilter( 25, -25, 100 );
}
ImageFilter filter = (ImageFilter) grayFilter;
Function<Image, Image> mapper = img -> {
ImageProducer producer = new FilteredImageSource( img.getSource(), filter );
return Toolkit.getDefaultToolkit().createImage( producer );
};
Image image = ((ImageIcon)icon).getImage();
return new ImageIconUIResource( MultiResolutionImageSupport.map( image, mapper ) );
}
return null;
}
@Override
public void initialize() {
if( SystemInfo.IS_MAC )
@@ -266,12 +306,19 @@ public abstract class FlatLaf
initIconColors( defaults, isDark() );
FlatInputMaps.initInputMaps( defaults );
// get addons and sort them by priority
ServiceLoader<FlatDefaultsAddon> addonLoader = ServiceLoader.load( FlatDefaultsAddon.class );
List<FlatDefaultsAddon> addons = new ArrayList<>();
for( FlatDefaultsAddon addon : addonLoader )
addons.add( addon );
addons.sort( (addon1, addon2) -> addon1.getPriority() - addon2.getPriority() );
// load defaults from properties
List<Class<?>> lafClassesForDefaultsLoading = getLafClassesForDefaultsLoading();
if( lafClassesForDefaultsLoading != null )
UIDefaultsLoader.loadDefaultsFromProperties( lafClassesForDefaultsLoading, defaults );
UIDefaultsLoader.loadDefaultsFromProperties( lafClassesForDefaultsLoading, addons, getAdditionalDefaults(), isDark(), defaults );
else
UIDefaultsLoader.loadDefaultsFromProperties( getClass(), defaults );
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" ) )
@@ -280,19 +327,29 @@ public abstract class FlatLaf
// initialize text antialiasing
putAATextInfo( defaults );
invokePostInitialization( defaults );
// apply additional defaults (e.g. from IntelliJ themes)
applyAdditionalDefaults( defaults );
return defaults;
}
// allow addons modifying UI defaults
for( FlatDefaultsAddon addon : addons )
addon.afterDefaultsLoading( this, defaults );
void invokePostInitialization( UIDefaults defaults ) {
if( postInitialization != null ) {
postInitialization.accept( defaults );
postInitialization = null;
}
return defaults;
}
List<Class<?>> getLafClassesForDefaultsLoading() {
void applyAdditionalDefaults( UIDefaults defaults ) {
}
protected List<Class<?>> getLafClassesForDefaultsLoading() {
return null;
}
protected Properties getAdditionalDefaults() {
return null;
}
@@ -302,7 +359,7 @@ public abstract class FlatLaf
if( SystemInfo.IS_WINDOWS ) {
Font winFont = (Font) Toolkit.getDefaultToolkit().getDesktopProperty( "win.messagebox.font" );
if( winFont != null )
uiFont = new FontUIResource( winFont );
uiFont = createCompositeFont( winFont.getFamily(), winFont.getStyle(), winFont.getSize() );
} else if( SystemInfo.IS_MAC ) {
String fontName;
@@ -313,7 +370,8 @@ public abstract class FlatLaf
// default font on older systems (see com.apple.laf.AquaFonts)
fontName = "Lucida Grande";
}
uiFont = new FontUIResource( fontName, Font.PLAIN, 13 );
uiFont = createCompositeFont( fontName, Font.PLAIN, 13 );
} else if( SystemInfo.IS_LINUX ) {
Font font = LinuxFontPolicy.getFont();
@@ -321,18 +379,34 @@ public abstract class FlatLaf
}
if( uiFont == null )
return;
uiFont = createCompositeFont( Font.SANS_SERIF, Font.PLAIN, 12 );
uiFont = UIScale.applyCustomScaleFactor( uiFont );
// use active value for all fonts to allow changing fonts in all components
// (similar as in Nimbus L&F) with:
// UIManager.put( "defaultFont", myFont );
Object activeFont = new ActiveFont( 1 );
// override fonts
for( Object key : defaults.keySet() ) {
if( key instanceof String && (((String)key).endsWith( ".font" ) || ((String)key).endsWith( "Font" )) )
defaults.put( key, uiFont );
defaults.put( key, activeFont );
}
// use smaller font for progress bar
defaults.put( "ProgressBar.font", UIScale.scaleFont( uiFont, 0.85f ) );
defaults.put( "ProgressBar.font", new ActiveFont( 0.85f ) );
// set default font
defaults.put( "defaultFont", uiFont );
}
static FontUIResource createCompositeFont( String family, int style, int size ) {
// using StyleContext.getFont() here because it uses
// sun.font.FontUtilities.getCompositeFontUIResource()
// and creates a composite font that is able to display all Unicode characters
Font font = new StyleContext().getFont( family, style, size );
return (font instanceof FontUIResource) ? (FontUIResource) font : new FontUIResource( font );
}
/**
@@ -542,4 +616,53 @@ public abstract class FlatLaf
return false;
}
//---- class ActiveFont ---------------------------------------------------
private static class ActiveFont
implements ActiveValue
{
private final float scaleFactor;
// cache (scaled) font
private Font font;
private Font lastDefaultFont;
ActiveFont( float scaleFactor ) {
this.scaleFactor = scaleFactor;
}
@Override
public Object createValue( UIDefaults table ) {
Font defaultFont = UIManager.getFont( "defaultFont" );
if( lastDefaultFont != defaultFont ) {
lastDefaultFont = defaultFont;
if( scaleFactor != 1 ) {
// scale font
int newFontSize = Math.round( defaultFont.getSize() * scaleFactor );
font = new FontUIResource( defaultFont.deriveFont( (float) newFontSize ) );
} else {
// make sure that font is a UIResource for LaF switching
font = (defaultFont instanceof UIResource)
? defaultFont
: new FontUIResource( defaultFont );
}
}
return font;
}
}
//---- class ImageIconUIResource ------------------------------------------
private static class ImageIconUIResource
extends ImageIcon
implements UIResource
{
ImageIconUIResource( Image image ) {
super( image );
}
}
}

View File

@@ -86,7 +86,7 @@ public class IntelliJTheme
* Using a buffered input stream is not necessary.
*/
public static FlatLaf createLaf( InputStream in )
throws IOException, ParseException
throws IOException
{
return createLaf( new IntelliJTheme( in ) );
}
@@ -106,11 +106,13 @@ public class IntelliJTheme
*/
@SuppressWarnings( "unchecked" )
public IntelliJTheme( InputStream in )
throws IOException, ParseException
throws IOException
{
Map<String, Object> json;
try( Reader reader = new InputStreamReader( in, StandardCharsets.UTF_8 ) ) {
json = (Map<String, Object>) Json.parse( reader );
} catch( ParseException ex ) {
throw new IOException( ex.getMessage(), ex );
}
name = (String) json.get( "name" );
@@ -132,6 +134,8 @@ public class IntelliJTheme
defaults.put( "Button.paintShadow", true );
defaults.put( "Button.shadowWidth", dark ? 2 : 1 );
Map<Object, Object> themeSpecificDefaults = removeThemeSpecificDefaults( defaults );
loadNamedColors( defaults );
// convert Json "ui" structure to UI defaults
@@ -183,6 +187,42 @@ public class IntelliJTheme
if( !uiKeys.contains( "Spinner.background" ) )
defaults.put( "Spinner.background", textFieldBackground );
}
// fix ToggleButton
if( !uiKeys.contains( "ToggleButton.startBackground" ) && !uiKeys.contains( "*.startBackground" ) )
defaults.put( "ToggleButton.startBackground", defaults.get( "Button.startBackground" ) );
if( !uiKeys.contains( "ToggleButton.endBackground" ) && !uiKeys.contains( "*.endBackground" ) )
defaults.put( "ToggleButton.endBackground", defaults.get( "Button.endBackground" ) );
if( !uiKeys.contains( "ToggleButton.foreground" ) && uiKeys.contains( "Button.foreground" ) )
defaults.put( "ToggleButton.foreground", defaults.get( "Button.foreground" ) );
// limit tree row height
int rowHeight = defaults.getInt( "Tree.rowHeight" );
if( rowHeight > 22 )
defaults.put( "Tree.rowHeight", 22 );
// apply theme specific UI defaults at the end to allow overwriting
defaults.putAll( themeSpecificDefaults );
}
private Map<Object, Object> removeThemeSpecificDefaults( UIDefaults defaults ) {
// search for theme specific UI defaults keys
ArrayList<String> themeSpecificKeys = new ArrayList<>();
for( Object key : defaults.keySet() ) {
if( key instanceof String && ((String)key).startsWith( "[" ) )
themeSpecificKeys.add( (String) key );
}
// remove theme specific UI defaults and remember only those for current theme
Map<Object, Object> themeSpecificDefaults = new HashMap<>();
String currentThemePrefix = '[' + name.replace( ' ', '_' ) + ']';
for( String key : themeSpecificKeys ) {
Object value = defaults.remove( key );
if( key.startsWith( currentThemePrefix ) )
themeSpecificDefaults.put( key.substring( currentThemePrefix.length() ), value );
}
return themeSpecificDefaults;
}
/**
@@ -216,6 +256,11 @@ public class IntelliJTheme
} else {
uiKeys.add( key );
// fix ComboBox size and Spinner border in all Material UI Lite themes
boolean isMaterialUILite = author.equals( "Mallowigi" );
if( isMaterialUILite && (key.equals( "ComboBox.padding" ) || key.equals( "Spinner.border" )) )
return; // ignore
// map keys
key = uiKeyMapping.getOrDefault( key, key );
if( key.isEmpty() )
@@ -270,7 +315,7 @@ public class IntelliJTheme
// (e.g. set ComboBox.buttonEditableBackground to *.background
// because it is mapped from ComboBox.ArrowButton.background)
String km = uiKeyInverseMapping.getOrDefault( k, (String) k );
if( km.endsWith( tail ) && !noWildcardReplace.contains( k ) && !((String)k).startsWith( "CheckBox.icon." ) )
if( km.endsWith( tail ) && !((String)k).startsWith( "CheckBox.icon." ) )
defaults.put( k, uiValue );
}
}
@@ -412,7 +457,6 @@ public class IntelliJTheme
private static Map<String, String> uiKeyInverseMapping = new HashMap<>();
private static Map<String, String> checkboxKeyMapping = new HashMap<>();
private static Map<String, String> checkboxDuplicateColors = new HashMap<>();
private static Set<String> noWildcardReplace = new HashSet<>();
static {
// ComboBox
@@ -470,16 +514,6 @@ public class IntelliJTheme
Map.Entry<String, String>[] entries = checkboxDuplicateColors.entrySet().toArray( new Map.Entry[checkboxDuplicateColors.size()] );
for( Map.Entry<String, String> e : entries )
checkboxDuplicateColors.put( e.getValue(), e.getKey() );
// because FlatLaf uses Button.background and Button.borderColor,
// but IDEA uses Button.startBackground and Button.startBorderColor,
// our default button background and border colors may be replaced by
// wildcard *.background and *.borderColor colors
noWildcardReplace.add( "Button.background" );
noWildcardReplace.add( "Button.borderColor" );
noWildcardReplace.add( "Button.default.background" );
noWildcardReplace.add( "Button.default.borderColor" );
noWildcardReplace.add( "ToggleButton.background" );
}
//---- class ThemeLaf -----------------------------------------------------
@@ -513,19 +547,12 @@ public class IntelliJTheme
}
@Override
public UIDefaults getDefaults() {
UIDefaults defaults = super.getDefaults();
void applyAdditionalDefaults( UIDefaults defaults ) {
theme.applyProperties( defaults );
super.invokePostInitialization( defaults );
return defaults;
}
@Override
void invokePostInitialization( UIDefaults defaults ) {
}
@Override
ArrayList<Class<?>> getLafClassesForDefaultsLoading() {
protected ArrayList<Class<?>> getLafClassesForDefaultsLoading() {
ArrayList<Class<?>> lafClasses = new ArrayList<>();
lafClasses.add( FlatLaf.class );
lafClasses.add( theme.dark ? FlatDarkLaf.class : FlatLightLaf.class );

View File

@@ -17,6 +17,7 @@
package com.formdev.flatlaf;
import java.awt.Font;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsEnvironment;
import java.awt.Toolkit;
import java.io.BufferedReader;
@@ -28,9 +29,9 @@ import java.util.Collections;
import java.util.List;
import java.util.StringTokenizer;
import java.util.logging.Level;
import javax.swing.text.StyleContext;
import com.formdev.flatlaf.util.StringUtils;
import com.formdev.flatlaf.util.SystemInfo;
import com.formdev.flatlaf.util.UIScale;
/**
* @author Karl Tauber
@@ -88,9 +89,7 @@ class LinuxFontPolicy
}
private static Font createFont( String family, int style, int size, double dsize ) {
// using StyleContext.getFont() here because it uses
// sun.font.FontUtilities.getCompositeFontUIResource()
Font font = new StyleContext().getFont( family, style, size );
Font font = FlatLaf.createCompositeFont( family, style, size );
// set font size in floating points
font = font.deriveFont( style, (float) dsize );
@@ -99,6 +98,10 @@ class LinuxFontPolicy
}
private static double getGnomeFontScale() {
// do not scale font here if JRE scales
if( isSystemScaling() )
return 96. / 72.;
// see class com.sun.java.swing.plaf.gtk.PangoFonts background information
Object value = Toolkit.getDefaultToolkit().getDesktopProperty( "gnome.Xft/DPI" );
@@ -168,7 +171,7 @@ class LinuxFontPolicy
// font dpi
int dpi = 96;
if( forceFontDPI != null ) {
if( forceFontDPI != null && !isSystemScaling() ) {
try {
dpi = Integer.parseInt( forceFontDPI );
if( dpi <= 0 )
@@ -247,4 +250,15 @@ class LinuxFontPolicy
}
return null;
}
/**
* Returns true if the JRE scales, which is the case if:
* - environment variable GDK_SCALE is set and running on Java 9 or later
* - running on JetBrains Runtime 11 or later and scaling is enabled in system Settings
*/
private static boolean isSystemScaling() {
GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment()
.getDefaultScreenDevice().getDefaultConfiguration();
return UIScale.getSystemScaleFactor( gc ) > 1;
}
}

View File

@@ -28,7 +28,6 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.ServiceLoader;
import java.util.function.Function;
import java.util.logging.Level;
import javax.swing.UIDefaults;
@@ -42,6 +41,7 @@ import com.formdev.flatlaf.ui.FlatEmptyBorder;
import com.formdev.flatlaf.ui.FlatLineBorder;
import com.formdev.flatlaf.util.ColorFunctions;
import com.formdev.flatlaf.util.DerivedColor;
import com.formdev.flatlaf.util.GrayFilter;
import com.formdev.flatlaf.util.HSLColor;
import com.formdev.flatlaf.util.StringUtils;
import com.formdev.flatlaf.util.SystemInfo;
@@ -69,7 +69,9 @@ class UIDefaultsLoader
private static final String OPTIONAL_PREFIX = "?";
private static final String GLOBAL_PREFIX = "*.";
static void loadDefaultsFromProperties( Class<?> lookAndFeelClass, UIDefaults defaults ) {
static void loadDefaultsFromProperties( Class<?> lookAndFeelClass, List<FlatDefaultsAddon> addons,
Properties additionalDefaults, boolean dark, UIDefaults defaults )
{
// determine classes in class hierarchy in reverse order
ArrayList<Class<?>> lafClasses = new ArrayList<>();
for( Class<?> lafClass = lookAndFeelClass;
@@ -79,10 +81,12 @@ class UIDefaultsLoader
lafClasses.add( 0, lafClass );
}
loadDefaultsFromProperties( lafClasses, defaults );
loadDefaultsFromProperties( lafClasses, addons, additionalDefaults, dark, defaults );
}
static void loadDefaultsFromProperties( List<Class<?>> lafClasses, UIDefaults defaults ) {
static void loadDefaultsFromProperties( List<Class<?>> lafClasses, List<FlatDefaultsAddon> addons,
Properties additionalDefaults, boolean dark, UIDefaults defaults )
{
try {
// load core properties files
Properties properties = new Properties();
@@ -94,15 +98,8 @@ class UIDefaultsLoader
}
}
// get addons and sort them by priority
ServiceLoader<FlatDefaultsAddon> addonLoader = ServiceLoader.load( FlatDefaultsAddon.class );
List<FlatDefaultsAddon> addonList = new ArrayList<>();
for( FlatDefaultsAddon addon : addonLoader )
addonList.add( addon );
addonList.sort( (addon1, addon2) -> addon1.getPriority() - addon2.getPriority() );
// load properties from addons
for( FlatDefaultsAddon addon : addonList ) {
for( FlatDefaultsAddon addon : addons ) {
for( Class<?> lafClass : lafClasses ) {
try( InputStream in = addon.getDefaults( lafClass ) ) {
if( in != null )
@@ -113,22 +110,40 @@ class UIDefaultsLoader
// collect addon class loaders
List<ClassLoader> addonClassLoaders = new ArrayList<>();
for( FlatDefaultsAddon addon : addonList ) {
for( FlatDefaultsAddon addon : addons ) {
ClassLoader addonClassLoader = addon.getClass().getClassLoader();
if( !addonClassLoaders.contains( addonClassLoader ) )
addonClassLoaders.add( addonClassLoader );
}
// add additional defaults
if( additionalDefaults != null )
properties.putAll( additionalDefaults );
// collect all platform specific keys (but do not modify properties)
ArrayList<String> platformSpecificKeys = new ArrayList<>();
for( Object key : properties.keySet() ) {
if( ((String)key).startsWith( "[" ) )
platformSpecificKeys.add( (String) key );
for( Object okey : properties.keySet() ) {
String key = (String) okey;
if( key.startsWith( "[" ) &&
(key.startsWith( "[win]" ) ||
key.startsWith( "[mac]" ) ||
key.startsWith( "[linux]" ) ||
key.startsWith( "[light]" ) ||
key.startsWith( "[dark]" )) )
platformSpecificKeys.add( key );
}
// remove platform specific properties and re-add only properties
// for current platform, but with platform prefix removed
if( !platformSpecificKeys.isEmpty() ) {
// handle light/dark specific properties
String lightOrDarkPrefix = dark ? "[dark]" : "[light]";
for( String key : platformSpecificKeys ) {
if( key.startsWith( lightOrDarkPrefix ) )
properties.put( key.substring( lightOrDarkPrefix.length() ), properties.remove( key ) );
}
// handle platform specific properties
String platformPrefix =
SystemInfo.IS_WINDOWS ? "[win]" :
SystemInfo.IS_MAC ? "[mac]" :
@@ -222,7 +237,7 @@ class UIDefaultsLoader
}
private enum ValueType { UNKNOWN, STRING, CHARACTER, INTEGER, FLOAT, BORDER, ICON, INSETS, DIMENSION, COLOR,
SCALEDINTEGER, SCALEDFLOAT, SCALEDINSETS, SCALEDDIMENSION, INSTANCE, CLASS }
SCALEDINTEGER, SCALEDFLOAT, SCALEDINSETS, SCALEDDIMENSION, INSTANCE, CLASS, GRAYFILTER }
static Object parseValue( String key, String value ) {
return parseValue( key, value, v -> v, Collections.emptyList() );
@@ -289,6 +304,8 @@ class UIDefaultsLoader
valueType = ValueType.CHARACTER;
else if( key.endsWith( "UI" ) )
valueType = ValueType.STRING;
else if( key.endsWith( "grayFilter" ) )
valueType = ValueType.GRAYFILTER;
}
// parse value
@@ -308,6 +325,7 @@ class UIDefaultsLoader
case SCALEDDIMENSION:return parseScaledDimension( value );
case INSTANCE: return parseInstance( value, addonClassLoaders );
case CLASS: return parseClass( value, addonClassLoaders );
case GRAYFILTER: return parseGrayFilter( value );
case UNKNOWN:
default:
// colors
@@ -332,16 +350,17 @@ class UIDefaultsLoader
private static Object parseBorder( String value, Function<String, String> resolver, List<ClassLoader> addonClassLoaders ) {
if( value.indexOf( ',' ) >= 0 ) {
// top,left,bottom,right[,lineColor]
// top,left,bottom,right[,lineColor[,lineThickness]]
List<String> parts = split( value, ',' );
Insets insets = parseInsets( value );
ColorUIResource lineColor = (parts.size() == 5)
ColorUIResource lineColor = (parts.size() >= 5)
? (ColorUIResource) parseColorOrFunction( resolver.apply( parts.get( 4 ) ), resolver, true )
: null;
float lineThickness = (parts.size() >= 6) ? parseFloat( parts.get( 5 ), true ) : 1f;
return (LazyValue) t -> {
return (lineColor != null)
? new FlatLineBorder( insets, lineColor )
? new FlatLineBorder( insets, lineColor, lineThickness )
: new FlatEmptyBorder( insets );
};
} else
@@ -543,35 +562,37 @@ class UIDefaultsLoader
}
/**
* Syntax: lighten([color,]amount[,options]) or darken([color,]amount[,options])
* Syntax: lighten(color,amount[,options]) or darken(color,amount[,options])
* - color: a color (e.g. #f00) or a color function
* - amount: percentage 0-100%
* - options: [relative] [autoInverse] [lazy]
* - options: [relative] [autoInverse] [lazy] [derived]
*/
private static Object parseColorLightenOrDarken( boolean lighten, List<String> params,
Function<String, String> resolver, boolean reportError )
{
boolean isDerived = params.get( 0 ).endsWith( "%" );
String colorStr = isDerived ? null : params.get( 0 );
int nextParam = isDerived ? 0 : 1;
int amount = parsePercentage( params.get( nextParam++ ) );
String colorStr = params.get( 0 );
int amount = parsePercentage( params.get( 1 ) );
boolean relative = false;
boolean autoInverse = false;
boolean lazy = false;
boolean derived = false;
if( params.size() > nextParam ) {
String options = params.get( nextParam++ );
if( params.size() > 2 ) {
String options = params.get( 2 );
relative = options.contains( "relative" );
autoInverse = options.contains( "autoInverse" );
lazy = options.contains( "lazy" );
derived = options.contains( "derived" );
}
ColorFunctions.ColorFunction function = lighten
? new ColorFunctions.Lighten( amount, relative, autoInverse )
: new ColorFunctions.Darken( amount, relative, autoInverse );
if( isDerived )
return new DerivedColor( function );
if( derived ) {
ColorUIResource color = (ColorUIResource) parseColorOrFunction( resolver.apply( colorStr ), resolver, reportError );
return new DerivedColor( ColorFunctions.applyFunctions( color, function ), function );
}
if( lazy ) {
return (LazyValue) t -> {
@@ -663,6 +684,21 @@ class UIDefaultsLoader
};
}
private static Object parseGrayFilter( String value ) {
List<String> numbers = split( value, ',' );
try {
int brightness = Integer.parseInt( numbers.get( 0 ) );
int contrast = Integer.parseInt( numbers.get( 1 ) );
int alpha = Integer.parseInt( numbers.get( 2 ) );
return (LazyValue) t -> {
return new GrayFilter( brightness, contrast, alpha );
};
} catch( NumberFormatException ex ) {
throw new IllegalArgumentException( "invalid gray filter '" + value + "'" );
}
}
/**
* Split string and trim parts.
*/

View File

@@ -96,7 +96,7 @@ public class FlatCheckBoxIcon
boolean selected = indeterminate || (c instanceof AbstractButton && ((AbstractButton)c).isSelected());
// paint focused border
if( c.hasFocus() && focusWidth > 0 ) {
if( FlatUIUtils.isPermanentFocusOwner( c ) && focusWidth > 0 ) {
g2.setColor( focusColor );
paintFocusBorder( g2 );
}

View File

@@ -82,7 +82,7 @@ public class FlatHelpButtonIcon
*/
boolean enabled = c.isEnabled();
boolean focused = c.hasFocus();
boolean focused = FlatUIUtils.isPermanentFocusOwner( c );
// paint focused border
if( focused ) {

View File

@@ -119,7 +119,7 @@ public class FlatBorder
JViewport viewport = ((JScrollPane)c).getViewport();
Component view = (viewport != null) ? viewport.getView() : null;
if( view != null ) {
if( view.hasFocus() )
if( FlatUIUtils.isPermanentFocusOwner( view ) )
return true;
if( (view instanceof JTable && ((JTable)view).isEditing()) ||
@@ -133,17 +133,17 @@ public class FlatBorder
return false;
} else if( c instanceof JComboBox && ((JComboBox<?>)c).isEditable() ) {
Component editorComponent = ((JComboBox<?>)c).getEditor().getEditorComponent();
return (editorComponent != null) ? editorComponent.hasFocus() : false;
return (editorComponent != null) ? FlatUIUtils.isPermanentFocusOwner( editorComponent ) : false;
} else if( c instanceof JSpinner ) {
JComponent editor = ((JSpinner)c).getEditor();
if( editor instanceof JSpinner.DefaultEditor ) {
JTextField textField = ((JSpinner.DefaultEditor)editor).getTextField();
if( textField != null )
return textField.hasFocus();
return FlatUIUtils.isPermanentFocusOwner( textField );
}
return false;
} else
return c.hasFocus();
return FlatUIUtils.isPermanentFocusOwner( c );
}
protected boolean isTableCellEditor( Component c ) {

View File

@@ -294,7 +294,9 @@ public class FlatButtonUI
// paint shadow
Color shadowColor = def ? defaultShadowColor : this.shadowColor;
if( !isToolBarButton && shadowColor != null && shadowWidth > 0 && focusWidth > 0 && !c.hasFocus() && c.isEnabled() ) {
if( !isToolBarButton && shadowColor != null && shadowWidth > 0 && focusWidth > 0 &&
!FlatUIUtils.isPermanentFocusOwner( c ) && c.isEnabled() )
{
g2.setColor( shadowColor );
g2.fill( new RoundRectangle2D.Float( focusWidth, focusWidth + UIScale.scale( (float) shadowWidth ),
width - focusWidth * 2, height - focusWidth * 2, arc, arc ) );
@@ -382,7 +384,7 @@ public class FlatButtonUI
if( hoverColor != null && b != null && b.getModel().isRollover() )
return hoverColor;
if( focusedColor != null && c.hasFocus() )
if( focusedColor != null && FlatUIUtils.isPermanentFocusOwner( c ) )
return focusedColor;
return enabledColor;

View File

@@ -460,12 +460,12 @@ public class FlatComboBoxUI
//---- class FlatComboPopup -----------------------------------------------
@SuppressWarnings( { "rawtypes", "unchecked" } )
private class FlatComboPopup
protected class FlatComboPopup
extends BasicComboPopup
{
private CellPaddingBorder paddingBorder;
FlatComboPopup( JComboBox combo ) {
protected FlatComboPopup( JComboBox combo ) {
super( combo );
// BasicComboPopup listens to JComboBox.componentOrientation and updates
@@ -480,13 +480,8 @@ public class FlatComboBoxUI
@Override
protected Rectangle computePopupBounds( int px, int py, int pw, int ph ) {
// get maximum display size of all items, ignoring prototype value
Object prototype = comboBox.getPrototypeDisplayValue();
if( prototype != null )
comboBox.setPrototypeDisplayValue( null );
// get maximum display size of all items
Dimension displaySize = getDisplaySize();
if( prototype != null )
comboBox.setPrototypeDisplayValue( prototype );
// make popup wider if necessary
if( displaySize.width > pw ) {

View File

@@ -26,9 +26,9 @@ import java.awt.Insets;
/**
* Line border for various components.
*
* Paints a scaled 1px thick line around the component.
* The line thickness is not included in the border insets.
* The insets should be at least 1,1,1,1.
* Paints a scaled (usually 1px thick) line around the component.
* The line thickness is not added to the border insets.
* The insets should be at least have line thickness (usually 1,1,1,1).
*
* @author Karl Tauber
*/
@@ -36,10 +36,16 @@ public class FlatLineBorder
extends FlatEmptyBorder
{
private final Color lineColor;
private final float lineThickness;
public FlatLineBorder( Insets insets, Color lineColor ) {
this( insets, lineColor, 1f );
}
public FlatLineBorder( Insets insets, Color lineColor, float lineThickness ) {
super( insets );
this.lineColor = lineColor;
this.lineThickness = lineThickness;
}
@Override
@@ -48,7 +54,7 @@ public class FlatLineBorder
try {
FlatUIUtils.setRenderingHints( g2 );
g2.setColor( lineColor );
FlatUIUtils.paintComponentBorder( g2, x, y, width, height, 0f, scale( 1f ), 0f );
FlatUIUtils.paintComponentBorder( g2, x, y, width, height, 0f, scale( lineThickness ), 0f );
} finally {
g2.dispose();
}

View File

@@ -81,7 +81,7 @@ public class FlatListUI
selectionInactiveBackground = UIManager.getColor( "List.selectionInactiveBackground" );
selectionInactiveForeground = UIManager.getColor( "List.selectionInactiveForeground" );
toggleSelectionColors( list.hasFocus() );
toggleSelectionColors();
}
@Override
@@ -100,13 +100,13 @@ public class FlatListUI
@Override
public void focusGained( FocusEvent e ) {
super.focusGained( e );
toggleSelectionColors( true );
toggleSelectionColors();
}
@Override
public void focusLost( FocusEvent e ) {
super.focusLost( e );
toggleSelectionColors( false );
toggleSelectionColors();
}
};
}
@@ -120,8 +120,8 @@ public class FlatListUI
* already used in applications. Then either the inactive colors are not used,
* or the application has to be changed to extend a FlatLaf renderer.
*/
private void toggleSelectionColors( boolean focused ) {
if( focused ) {
private void toggleSelectionColors() {
if( FlatUIUtils.isPermanentFocusOwner( list ) ) {
if( list.getSelectionBackground() == selectionInactiveBackground )
list.setSelectionBackground( selectionBackground );
if( list.getSelectionForeground() == selectionInactiveForeground )

View File

@@ -168,7 +168,7 @@ public class FlatPasswordFieldUI
protected void paintCapsLock( Graphics g ) {
JTextComponent c = getComponent();
if( !c.isFocusOwner() ||
if( !FlatUIUtils.isPermanentFocusOwner( c ) ||
!Toolkit.getDefaultToolkit().getLockingKeyState( KeyEvent.VK_CAPS_LOCK ) )
return;

View File

@@ -201,7 +201,7 @@ public class FlatSliderUI
}
if( coloredTrack != null ) {
FlatUIUtils.setColor( g, slider.hasFocus() ? focusColor : (hover ? hoverColor : thumbColor), thumbColor );
FlatUIUtils.setColor( g, FlatUIUtils.isPermanentFocusOwner( slider ) ? focusColor : (hover ? hoverColor : thumbColor), thumbColor );
((Graphics2D)g).fill( coloredTrack );
}
@@ -212,7 +212,7 @@ public class FlatSliderUI
@Override
public void paintThumb( Graphics g ) {
FlatUIUtils.setColor( g, slider.isEnabled()
? (slider.hasFocus() ? focusColor : (hover ? hoverColor : thumbColor))
? (FlatUIUtils.isPermanentFocusOwner( slider ) ? focusColor : (hover ? hoverColor : thumbColor))
: disabledForeground,
thumbColor );

View File

@@ -318,7 +318,7 @@ public class FlatTabbedPaneUI
boolean enabled = tabPane.isEnabled();
g.setColor( enabled && tabPane.isEnabledAt( tabIndex ) && getRolloverTab() == tabIndex
? hoverColor
: (enabled && isSelected && tabPane.hasFocus()
: (enabled && isSelected && FlatUIUtils.isPermanentFocusOwner( tabPane )
? focusColor
: (selectedBackground != null && enabled && isSelected
? selectedBackground

View File

@@ -113,7 +113,7 @@ public class FlatTableUI
selectionInactiveBackground = UIManager.getColor( "Table.selectionInactiveBackground" );
selectionInactiveForeground = UIManager.getColor( "Table.selectionInactiveForeground" );
toggleSelectionColors( table.hasFocus() );
toggleSelectionColors();
int rowHeight = FlatUIUtils.getUIInt( "Table.rowHeight", 16 );
if( rowHeight > 0 )
@@ -160,13 +160,13 @@ public class FlatTableUI
@Override
public void focusGained( FocusEvent e ) {
super.focusGained( e );
toggleSelectionColors( true );
toggleSelectionColors();
}
@Override
public void focusLost( FocusEvent e ) {
super.focusLost( e );
toggleSelectionColors( false );
toggleSelectionColors();
}
};
}
@@ -180,8 +180,8 @@ public class FlatTableUI
* already used in applications. Then either the inactive colors are not used,
* or the application has to be changed to extend a FlatLaf renderer.
*/
private void toggleSelectionColors( boolean focused ) {
if( focused ) {
private void toggleSelectionColors() {
if( FlatUIUtils.isPermanentFocusOwner( table ) ) {
if( table.getSelectionBackground() == selectionInactiveBackground )
table.setSelectionBackground( selectionBackground );
if( table.getSelectionForeground() == selectionInactiveForeground )

View File

@@ -221,7 +221,7 @@ public class FlatTreeUI
TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf )
{
boolean isEditing = (editingComponent != null && editingRow == row);
boolean hasFocus = tree.hasFocus();
boolean hasFocus = FlatUIUtils.isPermanentFocusOwner( tree );
boolean cellHasFocus = hasFocus && (row == getLeadSelectionRow());
boolean isSelected = tree.isRowSelected( row );
boolean isDropRow = isDropRow( row );

View File

@@ -24,6 +24,7 @@ import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.KeyboardFocusManager;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.Shape;
@@ -136,6 +137,10 @@ public class FlatUIUtils
return c instanceof JComponent && Boolean.TRUE.equals( ((JComponent)c).getClientProperty( "JComboBox.isTableCellEditor" ) );
}
public static boolean isPermanentFocusOwner( Component c ) {
return (KeyboardFocusManager.getCurrentKeyboardFocusManager().getPermanentFocusOwner() == c);
}
/**
* Sets rendering hints used for painting.
*/

View File

@@ -32,8 +32,8 @@ public class DerivedColor
{
private final ColorFunction[] functions;
public DerivedColor( ColorFunction... functions ) {
super( Color.red );
public DerivedColor( Color defaultColor, ColorFunction... functions ) {
super( (defaultColor != null) ? defaultColor : Color.red );
this.functions = functions;
}

View File

@@ -0,0 +1,81 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.formdev.flatlaf.util;
import java.awt.image.RGBImageFilter;
// based on https://github.com/JetBrains/intellij-community/blob/3840eab54746f5c4f301bb3ac78f00a980b5fd6e/platform/util/ui/src/com/intellij/util/ui/UIUtil.java#L253-L347
/**
* An image filter that turns an image into a grayscale image.
* Used for icons in disabled buttons and labels.
*/
public class GrayFilter
extends RGBImageFilter
{
private final float brightness;
private final float contrast;
private final int alpha;
private final int origContrast;
private final int origBrightness;
/**
* @param brightness in range [-100..100] where 0 has no effect
* @param contrast in range [-100..100] where 0 has no effect
* @param alpha in range [0..100] where 0 is transparent, 100 has no effect
*/
public GrayFilter( int brightness, int contrast, int alpha ) {
this.origBrightness = Math.max( -100, Math.min( 100, brightness ) );
this.origContrast = Math.max( -100, Math.min( 100, contrast ) );
this.alpha = Math.max( 0, Math.min( 100, alpha ) );
this.brightness = (float) (Math.pow( origBrightness, 3 ) / (100f * 100f)); // cubic in [0..100]
this.contrast = origContrast / 100f;
canFilterIndexColorModel = true;
}
public GrayFilter() {
this( 0, 0, 100 );
}
public int getBrightness() {
return origBrightness;
}
public int getContrast() {
return origContrast;
}
public int getAlpha() {
return alpha;
}
@Override
public int filterRGB( int x, int y, int rgb ) {
// use NTSC conversion formula
int gray = (int)(
0.30 * (rgb >> 16 & 0xff) +
0.59 * (rgb >> 8 & 0xff) +
0.11 * (rgb & 0xff));
if( brightness >= 0 )
gray = (int) ((gray + brightness * 255) / (1 + brightness));
else
gray = (int) (gray / (1 - brightness));
if( contrast >= 0 ) {
if( gray >= 127 )
gray = (int) (gray + (255 - gray) * contrast);
else
gray = (int) (gray - gray * contrast);
} else
gray = (int) (127 + (gray - 127) * (contrast + 1));
int a = (alpha != 100)
? (((rgb >> 24) & 0xff) * alpha / 100) << 24
: (rgb & 0xff000000);
return a | (gray << 16) | (gray << 8) | gray;
}
}

View File

@@ -0,0 +1,44 @@
/*
* 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.awt.Image;
import java.util.function.Function;
/**
* Support for multi-resolution images available since Java 9.
*
* @author Karl Tauber
*/
public class MultiResolutionImageSupport
{
public static boolean isAvailable() {
return false;
}
public static boolean isMultiResolutionImage( Image image ) {
return false;
}
public static Image create( int baseImageIndex, Image... resolutionVariants ) {
return resolutionVariants[baseImageIndex];
}
public static Image map( Image image, Function<Image, Image> mapper ) {
return mapper.apply( image );
}
}

View File

@@ -24,6 +24,7 @@ import java.awt.GraphicsEnvironment;
import java.awt.Insets;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.lang.reflect.Method;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
@@ -48,12 +49,15 @@ import javax.swing.plaf.UIResource;
*
* 2) user scaling mode
*
* This mode is mainly for Java 8 compatibility, but is also used on Linux.
* This mode is mainly for Java 8 compatibility, but is also used on Linux
* or if the default font is changed.
* The user scale factor is computed based on the used font.
* The JRE does not scale anything.
* So we have to invoke {@link #scale(float)} where necessary.
* There is only one user scale factor for all displays.
* The user scale factor may change if the active LaF or "Label.font" has changed.
* The user scale factor may change if the active LaF, "defaultFont" or "Label.font" has changed.
* If system scaling mode is available the user scale factor is usually 1,
* but may be larger on Linux or if the default font is changed.
*
* @author Karl Tauber
*/
@@ -61,6 +65,20 @@ public class UIScale
{
private static final boolean DEBUG = false;
private static PropertyChangeSupport changeSupport;
public static void addPropertyChangeListener( PropertyChangeListener listener ) {
if( changeSupport == null )
changeSupport = new PropertyChangeSupport( UIScale.class );
changeSupport.addPropertyChangeListener( listener );
}
public static void removePropertyChangeListener( PropertyChangeListener listener ) {
if( changeSupport == null )
return;
changeSupport.removePropertyChangeListener( listener );
}
//---- system scaling (Java 9) --------------------------------------------
private static Boolean jreHiDPI;
@@ -110,27 +128,33 @@ public class UIScale
return;
initialized = true;
if( isUserScalingEnabled() ) {
// listener to update scale factor if LaF changed or if Label.font changed
// (e.g. option "Override default fonts" in IntelliJ IDEA)
PropertyChangeListener listener = new PropertyChangeListener() {
@Override
public void propertyChange( PropertyChangeEvent e ) {
String propName = e.getPropertyName();
if( "lookAndFeel".equals( propName ) ) {
if( !isUserScalingEnabled() )
return;
// listener to update scale factor if LaF changed, "defaultFont" or "Label.font" changed
PropertyChangeListener listener = new PropertyChangeListener() {
@Override
public void propertyChange( PropertyChangeEvent e ) {
switch( e.getPropertyName() ) {
case "lookAndFeel":
// it is not necessary (and possible) to remove listener of old LaF defaults
if( e.getNewValue() instanceof LookAndFeel )
UIManager.getLookAndFeelDefaults().addPropertyChangeListener( this );
updateScaleFactor();
} else if( "Label.font".equals( propName ) )
updateScaleFactor();
}
};
UIManager.addPropertyChangeListener( listener );
UIManager.getLookAndFeelDefaults().addPropertyChangeListener( listener );
break;
updateScaleFactor();
}
case "defaultFont":
case "Label.font":
updateScaleFactor();
break;
}
}
};
UIManager.addPropertyChangeListener( listener );
UIManager.getDefaults().addPropertyChangeListener( listener );
UIManager.getLookAndFeelDefaults().addPropertyChangeListener( listener );
updateScaleFactor();
}
private static void updateScaleFactor() {
@@ -141,7 +165,9 @@ public class UIScale
// because even if we are on a HiDPI display it is not sure
// that a larger font size is set by the current LaF
// (e.g. can avoid large icons with small text)
Font font = UIManager.getFont( "Label.font" );
Font font = UIManager.getFont( "defaultFont" );
if( font == null )
font = UIManager.getFont( "Label.font" );
setUserScaleFactor( computeScaleFactor( font ) );
}
@@ -168,26 +194,17 @@ public class UIScale
}
private static boolean isUserScalingEnabled() {
if( isSystemScalingEnabled() && !SystemInfo.IS_LINUX )
return false; // disable user scaling if JRE scales
// same as in IntelliJ IDEA
String hidpi = System.getProperty( "hidpi" );
return (hidpi != null) ? Boolean.parseBoolean( hidpi ) : true;
}
/**
* Applies a custom scale factor given in system properties "flatlaf.uiScale"
* or "sun.java2d.uiScale" to the given font.
* Applies a custom scale factor given in system property "flatlaf.uiScale"
* to the given font.
*/
public static FontUIResource applyCustomScaleFactor( FontUIResource font ) {
if( UIScale.isSystemScalingEnabled() )
return font;
String uiScale = System.getProperty( "flatlaf.uiScale" );
if( uiScale == null )
uiScale = System.getProperty( "sun.java2d.uiScale" );
float scaleFactor = parseScaleFactor( uiScale );
if( scaleFactor <= 0 )
return font;
@@ -200,14 +217,6 @@ public class UIScale
return new FontUIResource( font.deriveFont( (float) newFontSize ) );
}
/**
* Scales the given font.
*/
public static FontUIResource scaleFont( FontUIResource font, float scaleFactor ) {
int newFontSize = Math.round( font.getSize() * scaleFactor );
return new FontUIResource( font.deriveFont( (float) newFontSize ) );
}
/**
* Similar to sun.java2d.SunGraphicsEnvironment.getScaleFactor(String)
*/
@@ -245,10 +254,14 @@ public class UIScale
else // round scale factor to 1/4
scaleFactor = Math.round( scaleFactor * 4f ) / 4f;
float oldScaleFactor = UIScale.scaleFactor;
UIScale.scaleFactor = scaleFactor;
if( DEBUG )
System.out.println( "HiDPI scale factor " + scaleFactor );
if( changeSupport != null )
changeSupport.firePropertyChange( "userScaleFactor", oldScaleFactor, scaleFactor );
}
public static float scale( float value ) {

View File

@@ -0,0 +1,96 @@
/*
* 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.awt.Image;
import java.awt.image.AbstractMultiResolutionImage;
import java.awt.image.BaseMultiResolutionImage;
import java.awt.image.MultiResolutionImage;
import java.util.ArrayList;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.function.Function;
import javax.swing.ImageIcon;
/**
* Support for multi-resolution images available since Java 9.
*
* @author Karl Tauber
*/
public class MultiResolutionImageSupport
{
public static boolean isAvailable() {
return true;
}
public static boolean isMultiResolutionImage( Image image ) {
return image instanceof MultiResolutionImage;
}
public static Image create( int baseImageIndex, Image... resolutionVariants ) {
return new BaseMultiResolutionImage( baseImageIndex, resolutionVariants );
}
public static Image map( Image image, Function<Image, Image> mapper ) {
return image instanceof MultiResolutionImage
? new MappedMultiResolutionImage( image, mapper )
: mapper.apply( image );
}
//---- class MappedMultiResolutionImage -----------------------------------
private static class MappedMultiResolutionImage
extends AbstractMultiResolutionImage
{
private final Image mrImage;
private final Function<Image, Image> mapper;
private final IdentityHashMap<Image, Image> cache = new IdentityHashMap<>();
MappedMultiResolutionImage( Image mrImage, Function<Image, Image> mapper ) {
assert mrImage instanceof MultiResolutionImage;
this.mrImage = mrImage;
this.mapper = mapper;
}
@Override
public Image getResolutionVariant( double destImageWidth, double destImageHeight ) {
Image variant = ((MultiResolutionImage)mrImage).getResolutionVariant( destImageWidth, destImageHeight );
return mapAndCacheImage( variant );
}
@Override
public List<Image> getResolutionVariants() {
List<Image> variants = ((MultiResolutionImage)mrImage).getResolutionVariants();
List<Image> mappedVariants = new ArrayList<>();
for( Image image : variants )
mappedVariants.add( mapAndCacheImage( image ) );
return mappedVariants;
}
@Override
protected Image getBaseImage() {
return mapAndCacheImage( mrImage );
}
private Image mapAndCacheImage( Image image ) {
return cache.computeIfAbsent( image, img -> {
return new ImageIcon( mapper.apply( img ) ).getImage();
} );
}
}
}

View File

@@ -32,10 +32,6 @@
@cellFocusColor=#000000
@icon=#adadad
# Button
@buttonHoverBackground=lighten(3%,autoInverse)
@buttonPressedBackground=lighten(6%,autoInverse)
# Drop (use lazy colors for IntelliJ platform themes, which usually do not specify these colors)
@dropCellBackground=darken(List.selectionBackground,10%,lazy)
@dropCellForeground=lazy(List.selectionForeground)
@@ -73,8 +69,8 @@ controlDkShadow=lighten($controlShadow,10%)
#---- Button ----
Button.background=#4c5052
Button.hoverBackground=@buttonHoverBackground
Button.pressedBackground=@buttonPressedBackground
Button.hoverBackground=lighten($Button.background,3%,derived autoInverse)
Button.pressedBackground=lighten($Button.background,6%,derived autoInverse)
Button.borderColor=#5e6060
Button.disabledBorderColor=#5e6060
@@ -83,16 +79,16 @@ Button.hoverBorderColor=$Button.focusedBorderColor
Button.default.background=#365880
Button.default.foreground=#bbbbbb
Button.default.hoverBackground=@buttonHoverBackground
Button.default.pressedBackground=@buttonPressedBackground
Button.default.hoverBackground=lighten($Button.default.background,3%,derived autoInverse)
Button.default.pressedBackground=lighten($Button.default.background,6%,derived autoInverse)
Button.default.borderColor=#4c708c
Button.default.hoverBorderColor=#537699
Button.default.focusedBorderColor=#537699
Button.default.focusColor=#43688c
Button.default.boldText=true
Button.toolbar.hoverBackground=#4c5052
Button.toolbar.pressedBackground=#555a5d
Button.toolbar.hoverBackground=lighten($Button.background,1%,derived autoInverse)
Button.toolbar.pressedBackground=lighten($Button.background,4%,derived autoInverse)
#---- CheckBox ----
@@ -105,8 +101,8 @@ CheckBox.icon.hoverBorderColor=$CheckBox.icon.focusedBorderColor
CheckBox.icon.selectedFocusedBorderColor=#466D94
CheckBox.icon.background=#43494A
CheckBox.icon.disabledBackground=@background
CheckBox.icon.hoverBackground=@buttonHoverBackground
CheckBox.icon.pressedBackground=@buttonPressedBackground
CheckBox.icon.hoverBackground=lighten($CheckBox.icon.background,3%,derived autoInverse)
CheckBox.icon.pressedBackground=lighten($CheckBox.icon.background,6%,derived autoInverse)
CheckBox.icon.selectedBackground=#43494A
CheckBox.icon.checkmarkColor=#A7A7A7
CheckBox.icon.disabledCheckmarkColor=#606060
@@ -129,6 +125,7 @@ Component.disabledBorderColor=#646464
Component.focusedBorderColor=#466d94
Component.focusColor=#3d6185
Component.linkColor=#589df6
Component.grayFilter=-20,-70,100
#---- Desktop ----
@@ -151,8 +148,8 @@ InternalFrame.inactiveTitleForeground=@disabledText
InternalFrame.activeBorderColor=lighten($Component.borderColor,10%)
InternalFrame.inactiveBorderColor=$Component.borderColor
InternalFrame.buttonHoverBackground=lighten(10%,autoInverse)
InternalFrame.buttonPressedBackground=lighten(20%,autoInverse)
InternalFrame.buttonHoverBackground=lighten($InternalFrame.activeTitleBackground,10%,derived autoInverse)
InternalFrame.buttonPressedBackground=lighten($InternalFrame.activeTitleBackground,20%,derived autoInverse)
InternalFrame.closeHoverBackground=lazy(Actions.Red)
InternalFrame.closePressedBackground=darken(Actions.Red,10%,lazy)
InternalFrame.closeHoverForeground=#fff
@@ -218,7 +215,7 @@ Separator.foreground=#515151
Slider.trackColor=#646464
Slider.thumbColor=#A6A6A6
Slider.tickColor=#888888
Slider.hoverColor=darken(15%,autoInverse)
Slider.hoverColor=darken($Slider.thumbColor,15%,derived autoInverse)
Slider.disabledForeground=#4c5052
@@ -253,11 +250,11 @@ TableHeader.bottomSeparatorColor=$TableHeader.separatorColor
#---- ToggleButton ----
ToggleButton.selectedBackground=#64696C
ToggleButton.selectedBackground=lighten($ToggleButton.background,10%,derived autoInverse)
ToggleButton.selectedForeground=@foreground
ToggleButton.disabledSelectedBackground=#525658
ToggleButton.disabledSelectedBackground=lighten($ToggleButton.background,3%,derived autoInverse)
ToggleButton.toolbar.selectedBackground=#5c6164
ToggleButton.toolbar.selectedBackground=lighten($ToggleButton.background,7%,derived autoInverse)
#---- ToolTip ----

View File

@@ -269,7 +269,6 @@ InternalFrameTitlePane.border=0,8,0,0
#---- List ----
List.border=1,0,1,0
List.border=0,0,0,0
List.cellMargins=1,6,1,6
List.cellFocusColor=@cellFocusColor
@@ -599,6 +598,7 @@ Tree.dropLineColor=@dropLineColor
Tree.rendererFillBackground=false
Tree.rendererMargins=1,2,1,2
Tree.wideSelection=true
Tree.repaintWholeRow=true
Tree.paintLines=false
Tree.leftChildIndent=7
Tree.rightChildIndent=11

View File

@@ -32,10 +32,6 @@
@cellFocusColor=#000000
@icon=#afafaf
# Button
@buttonHoverBackground=darken(3%,autoInverse)
@buttonPressedBackground=darken(10%,autoInverse)
# Drop (use lazy colors for IntelliJ platform themes, which usually do not specify these colors)
@dropCellBackground=lighten(List.selectionBackground,10%,lazy)
@dropCellForeground=lazy(List.selectionForeground)
@@ -74,8 +70,8 @@ controlDkShadow=darken($controlShadow,15%)
Button.background=#ffffff
Button.focusedBackground=#e3f1fa
Button.hoverBackground=@buttonHoverBackground
Button.pressedBackground=@buttonPressedBackground
Button.hoverBackground=darken($Button.background,3%,derived autoInverse)
Button.pressedBackground=darken($Button.background,10%,derived autoInverse)
Button.borderColor=$Component.borderColor
Button.disabledBorderColor=$Component.disabledBorderColor
@@ -85,16 +81,16 @@ Button.hoverBorderColor=$Button.focusedBorderColor
Button.default.background=$Button.background
Button.default.foreground=@foreground
Button.default.focusedBackground=$Button.focusedBackground
Button.default.hoverBackground=@buttonHoverBackground
Button.default.pressedBackground=@buttonPressedBackground
Button.default.hoverBackground=$Button.hoverBackground
Button.default.pressedBackground=$Button.pressedBackground
Button.default.borderColor=#4F9EE3
Button.default.hoverBorderColor=$Button.hoverBorderColor
Button.default.focusedBorderColor=$Button.focusedBorderColor
Button.default.focusColor=$Component.focusColor
Button.default.borderWidth=2
Button.toolbar.hoverBackground=#dfdfdf
Button.toolbar.pressedBackground=#d8d8d8
Button.toolbar.hoverBackground=darken($Button.background,12%,derived autoInverse)
Button.toolbar.pressedBackground=darken($Button.background,15%,derived autoInverse)
#---- CheckBox ----
@@ -107,8 +103,8 @@ CheckBox.icon.hoverBorderColor=$CheckBox.icon.focusedBorderColor
CheckBox.icon.background=#FFFFFF
CheckBox.icon.disabledBackground=@background
CheckBox.icon.focusedBackground=$Button.focusedBackground
CheckBox.icon.hoverBackground=@buttonHoverBackground
CheckBox.icon.pressedBackground=@buttonPressedBackground
CheckBox.icon.hoverBackground=$Button.hoverBackground
CheckBox.icon.pressedBackground=$Button.pressedBackground
CheckBox.icon.selectedBackground=#FFFFFF
CheckBox.icon.checkmarkColor=#4F9EE3
CheckBox.icon.disabledCheckmarkColor=#ABABAB
@@ -131,6 +127,7 @@ Component.disabledBorderColor=#cfcfcf
Component.focusedBorderColor=#87afda
Component.focusColor=#97c3f3
Component.linkColor=#2470B3
Component.grayFilter=25,-25,100
#---- Desktop ----
@@ -158,8 +155,8 @@ InternalFrame.inactiveTitleForeground=@disabledText
InternalFrame.activeBorderColor=darken($Component.borderColor,20%)
InternalFrame.inactiveBorderColor=$Component.borderColor
InternalFrame.buttonHoverBackground=darken(10%,autoInverse)
InternalFrame.buttonPressedBackground=darken(20%,autoInverse)
InternalFrame.buttonHoverBackground=darken($InternalFrame.activeTitleBackground,10%,derived autoInverse)
InternalFrame.buttonPressedBackground=darken($InternalFrame.activeTitleBackground,20%,derived autoInverse)
InternalFrame.closeHoverBackground=lazy(Actions.Red)
InternalFrame.closePressedBackground=darken(Actions.Red,10%,lazy)
InternalFrame.closeHoverForeground=#fff
@@ -225,7 +222,7 @@ Separator.foreground=#d1d1d1
Slider.trackColor=#c4c4c4
Slider.thumbColor=#6e6e6e
Slider.tickColor=#888888
Slider.hoverColor=lighten(15%,autoInverse)
Slider.hoverColor=lighten($Slider.thumbColor,15%,derived autoInverse)
Slider.disabledForeground=#c0c0c0
@@ -260,11 +257,11 @@ TableHeader.bottomSeparatorColor=$TableHeader.separatorColor
#---- ToggleButton ----
ToggleButton.selectedBackground=#cfcfcf
ToggleButton.selectedBackground=darken($ToggleButton.background,20%,derived autoInverse)
ToggleButton.selectedForeground=@foreground
ToggleButton.disabledSelectedBackground=#dfdfdf
ToggleButton.disabledSelectedBackground=darken($ToggleButton.background,13%,derived autoInverse)
ToggleButton.toolbar.selectedBackground=#cfcfcf
ToggleButton.toolbar.selectedBackground=$ToggleButton.selectedBackground
#---- ToolTip ----

View File

@@ -16,6 +16,16 @@
#---- Button ----
Button.startBackground=$Button.background
Button.endBackground=$Button.background
Button.startBorderColor=$Button.borderColor
Button.endBorderColor=$Button.borderColor
Button.default.startBackground=$Button.default.background
Button.default.endBackground=$Button.default.background
Button.default.startBorderColor=$Button.default.borderColor
Button.default.endBorderColor=$Button.default.borderColor
Button.hoverBorderColor=null
Button.default.hoverBorderColor=null
@@ -23,3 +33,32 @@ Button.default.hoverBorderColor=null
#---- HelpButton ----
HelpButton.hoverBorderColor=null
#---- ToggleButton ----
ToggleButton.startBackground=$ToggleButton.background
ToggleButton.endBackground=$ToggleButton.background
[dark]ToggleButton.selectedBackground=lighten($ToggleButton.background,15%,derived autoInverse)
[dark]ToggleButton.disabledSelectedBackground=lighten($ToggleButton.background,5%,derived autoInverse)
#---- theme specific ----
[Gruvbox_Dark_Hard]ToggleButton.selectedBackground=$ToggleButton.selectedBackground
[Gruvbox_Dark_Hard]ToggleButton.toolbar.selectedBackground=$ToggleButton.toolbar.selectedBackground
[Gruvbox_Dark_Medium]ToggleButton.selectedBackground=$ToggleButton.selectedBackground
[Gruvbox_Dark_Medium]ToggleButton.toolbar.selectedBackground=$ToggleButton.toolbar.selectedBackground
[Gruvbox_Dark_Soft]ToggleButton.selectedBackground=$ToggleButton.selectedBackground
[Gruvbox_Dark_Soft]ToggleButton.toolbar.selectedBackground=$ToggleButton.toolbar.selectedBackground
[Hiberbee_Dark]ToggleButton.selectedBackground=$ToggleButton.selectedBackground
[Hiberbee_Dark]ToggleButton.selectedBackground=$ToggleButton.selectedBackground
[Hiberbee_Dark]ToggleButton.toolbar.selectedBackground=$ToggleButton.toolbar.selectedBackground
[High_contrast]ToggleButton.selectedBackground=#fff
[High_contrast]ToggleButton.selectedForeground=#000
[High_contrast]ToggleButton.disabledSelectedBackground=#444
[High_contrast]ToggleButton.toolbar.selectedBackground=#fff

View File

@@ -0,0 +1,13 @@
# This file demonstrates using a FlatLaf theme file in the FlatLaf Demo application.
# Must be in the working directory of the Demo application.
# Shown in the "Themes" list under category "Current Directory".
#
# Modifications to this file are automatically loaded by the FlatLaf Demo application
# when the Demo window is activated.
# base theme (light, dark, intellij or darcula)
@baseTheme=light
# add you theme defaults here
@background=#ccc

View File

@@ -30,6 +30,7 @@ plugins {
dependencies {
implementation( project( ":flatlaf-core" ) )
implementation( project( ":flatlaf-extras" ) )
implementation( project( ":flatlaf-intellij-themes" ) )
implementation( "com.miglayout:miglayout-swing:5.2" )
implementation( "com.jgoodies:jgoodies-forms:1.9.0" )
}
@@ -38,12 +39,16 @@ tasks {
jar {
dependsOn( ":flatlaf-core:jar" )
dependsOn( ":flatlaf-extras:jar" )
dependsOn( ":flatlaf-intellij-themes:jar" )
manifest {
attributes( "Main-Class" to "com.formdev.flatlaf.demo.FlatLafDemo" )
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 )
attributes( "Multi-Release" to "true" )
}
exclude( "META-INF/versions/**" )
exclude( "module-info.class" )
// include all dependencies in jar
from( {

View File

@@ -310,14 +310,13 @@ class BasicComponentsPanel
add(comboBox4, "cell 4 4,growx");
//---- comboBox5 ----
comboBox5.setPrototypeDisplayValue("12345");
comboBox5.setModel(new DefaultComboBoxModel<>(new String[] {
"wide popup if text is longer",
"aa",
"bbb",
"cccc"
}));
add(comboBox5, "cell 5 4,growx");
add(comboBox5, "cell 5 4,growx,wmax 100");
//---- spinnerLabel ----
spinnerLabel.setText("JSpinner:");

View File

@@ -242,7 +242,6 @@ new FormModel {
} )
add( new FormComponent( "javax.swing.JComboBox" ) {
name: "comboBox5"
"prototypeDisplayValue": "12345"
"model": new javax.swing.DefaultComboBoxModel {
selectedItem: "wide popup if text is longer"
addElement( "wide popup if text is longer" )
@@ -251,7 +250,7 @@ new FormModel {
addElement( "cccc" )
}
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 5 4,growx"
"value": "cell 5 4,growx,wmax 100"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "spinnerLabel"

View File

@@ -83,6 +83,11 @@ class ControlBar
} );
}
} );
UIScale.addPropertyChangeListener( e -> {
// update info label because user scale factor may change
updateInfoLabel();
} );
}
void initialize( JFrame frame, JTabbedPane tabbedPane ) {

View File

@@ -81,6 +81,11 @@ class DataComponentsPanel
JScrollPane scrollPane5 = new JScrollPane();
table1 = new JTable();
dndCheckBox = new JCheckBox();
JPopupMenu popupMenu2 = new JPopupMenu();
JMenuItem menuItem3 = new JMenuItem();
JMenuItem menuItem4 = new JMenuItem();
JMenuItem menuItem5 = new JMenuItem();
JMenuItem menuItem6 = new JMenuItem();
//======== this ========
setLayout(new MigLayout(
@@ -126,6 +131,7 @@ class DataComponentsPanel
@Override
public String getElementAt(int i) { return values[i]; }
});
list1.setComponentPopupMenu(popupMenu2);
scrollPane1.setViewportView(list1);
}
add(scrollPane1, "cell 1 0,growx");
@@ -198,6 +204,7 @@ class DataComponentsPanel
add(node1);
}
}));
tree1.setComponentPopupMenu(popupMenu2);
scrollPane3.setViewportView(tree1);
}
add(scrollPane3, "cell 1 1,growx");
@@ -287,6 +294,7 @@ class DataComponentsPanel
}))));
}
table1.setAutoCreateRowSorter(true);
table1.setComponentPopupMenu(popupMenu2);
scrollPane5.setViewportView(table1);
}
add(scrollPane5, "cell 1 2 2 1,growx,width 300");
@@ -296,6 +304,27 @@ class DataComponentsPanel
dndCheckBox.setMnemonic('D');
dndCheckBox.addActionListener(e -> dndChanged());
add(dndCheckBox, "cell 0 3 3 1");
//======== popupMenu2 ========
{
//---- menuItem3 ----
menuItem3.setText("Some Action");
popupMenu2.add(menuItem3);
//---- menuItem4 ----
menuItem4.setText("More Action");
popupMenu2.add(menuItem4);
popupMenu2.addSeparator();
//---- menuItem5 ----
menuItem5.setText("No Action");
popupMenu2.add(menuItem5);
//---- menuItem6 ----
menuItem6.setText("Noop Action");
popupMenu2.add(menuItem6);
}
// JFormDesigner - End of component initialization //GEN-END:initComponents
((JComboBox)((DefaultCellEditor)table1.getColumnModel().getColumn( 3 ).getCellEditor()).getComponent()).setEditable( true );

View File

@@ -1,4 +1,4 @@
JFDML JFormDesigner: "7.0.0.0.194" Java: "13.0.1" encoding: "UTF-8"
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -39,6 +39,7 @@ new FormModel {
addElement( "item 14" )
addElement( "item 15" )
}
"componentPopupMenu": new FormReference( "popupMenu2" )
auxiliary() {
"JavaCodeGenerator.typeParameters": "String"
"JavaCodeGenerator.variableLocal": false
@@ -143,6 +144,7 @@ new FormModel {
} )
} )
} )
"componentPopupMenu": new FormReference( "popupMenu2" )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
@@ -299,6 +301,7 @@ new FormModel {
add( null )
} )
"autoCreateRowSorter": true
"componentPopupMenu": new FormReference( "popupMenu2" )
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
@@ -321,5 +324,29 @@ new FormModel {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 790, 715 )
} )
add( new FormContainer( "javax.swing.JPopupMenu", new FormLayoutManager( class javax.swing.JPopupMenu ) ) {
name: "popupMenu2"
add( new FormComponent( "javax.swing.JMenuItem" ) {
name: "menuItem3"
"text": "Some Action"
} )
add( new FormComponent( "javax.swing.JMenuItem" ) {
name: "menuItem4"
"text": "More Action"
} )
add( new FormComponent( "javax.swing.JPopupMenu$Separator" ) {
name: "separator1"
} )
add( new FormComponent( "javax.swing.JMenuItem" ) {
name: "menuItem5"
"text": "No Action"
} )
add( new FormComponent( "javax.swing.JMenuItem" ) {
name: "menuItem6"
"text": "Noop Action"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 740 )
} )
}
}

View File

@@ -20,6 +20,7 @@ import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.text.DefaultEditorKit;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.demo.intellijthemes.*;
import com.formdev.flatlaf.extras.FlatSVGIcon;
import net.miginfocom.swing.*;
@@ -52,12 +53,53 @@ class DemoFrame
DemoPrefs.getState().putInt( FlatLafDemo.KEY_TAB, tabbedPane.getSelectedIndex() );
}
private void menuItemActionPerformed(ActionEvent e) {
private void menuItemActionPerformed( ActionEvent e ) {
SwingUtilities.invokeLater( () -> {
JOptionPane.showMessageDialog( this, e.getActionCommand(), "Menu Item", JOptionPane.PLAIN_MESSAGE );
} );
}
private void fontFamilyChanged( ActionEvent e ) {
String fontFamily = e.getActionCommand();
Font font = UIManager.getFont( "defaultFont" );
Font newFont = new Font( fontFamily, font.getStyle(), font.getSize() );
UIManager.put( "defaultFont", newFont );
FlatLaf.updateUI();
}
private void fontSizeChanged( ActionEvent e ) {
String fontSizeStr = e.getActionCommand();
Font font = UIManager.getFont( "defaultFont" );
Font newFont = font.deriveFont( (float) Integer.parseInt( fontSizeStr ) );
UIManager.put( "defaultFont", newFont );
FlatLaf.updateUI();
}
private void restoreFont() {
UIManager.put( "defaultFont", null );
FlatLaf.updateUI();
}
private void incrFont() {
Font font = UIManager.getFont( "defaultFont" );
Font newFont = font.deriveFont( (float) (font.getSize() + 1) );
UIManager.put( "defaultFont", newFont );
FlatLaf.updateUI();
}
private void decrFont() {
Font font = UIManager.getFont( "defaultFont" );
Font newFont = font.deriveFont( (float) Math.max( font.getSize() - 1, 8 ) );
UIManager.put( "defaultFont", newFont );
FlatLaf.updateUI();
}
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
JMenuBar menuBar1 = new JMenuBar();
@@ -86,6 +128,10 @@ class DemoFrame
JRadioButtonMenuItem radioButtonMenuItem1 = new JRadioButtonMenuItem();
JRadioButtonMenuItem radioButtonMenuItem2 = new JRadioButtonMenuItem();
JRadioButtonMenuItem radioButtonMenuItem3 = new JRadioButtonMenuItem();
fontMenu = new JMenu();
JMenuItem restoreFontMenuItem = new JMenuItem();
JMenuItem incrFontMenuItem = new JMenuItem();
JMenuItem decrFontMenuItem = new JMenuItem();
JMenu helpMenu = new JMenu();
JMenuItem aboutMenuItem = new JMenuItem();
JToolBar toolBar1 = new JToolBar();
@@ -285,6 +331,30 @@ class DemoFrame
}
menuBar1.add(viewMenu);
//======== fontMenu ========
{
fontMenu.setText("Font");
//---- restoreFontMenuItem ----
restoreFontMenuItem.setText("Restore Font");
restoreFontMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_0, KeyEvent.CTRL_MASK));
restoreFontMenuItem.addActionListener(e -> restoreFont());
fontMenu.add(restoreFontMenuItem);
//---- incrFontMenuItem ----
incrFontMenuItem.setText("Increase Font Size");
incrFontMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_PLUS, KeyEvent.CTRL_MASK));
incrFontMenuItem.addActionListener(e -> incrFont());
fontMenu.add(incrFontMenuItem);
//---- decrFontMenuItem ----
decrFontMenuItem.setText("Decrease Font Size");
decrFontMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_MINUS, KeyEvent.CTRL_MASK));
decrFontMenuItem.addActionListener(e -> decrFont());
fontMenu.add(decrFontMenuItem);
}
menuBar1.add(fontMenu);
//======== helpMenu ========
{
helpMenu.setText("Help");
@@ -387,9 +457,30 @@ class DemoFrame
cutMenuItem.addActionListener( new DefaultEditorKit.CutAction() );
copyMenuItem.addActionListener( new DefaultEditorKit.CopyAction() );
pasteMenuItem.addActionListener( new DefaultEditorKit.PasteAction() );
// add font families
fontMenu.addSeparator();
String[] fontFamilies = { "Arial", "Comic Sans MS", "Courier New", "Dialog",
"Monospaced", "SansSerif", "Serif", "Tahoma", "Verdana" };
for( String fontFamily : fontFamilies ) {
JMenuItem fontItem = new JMenuItem( fontFamily );
fontItem.addActionListener( this::fontFamilyChanged );
fontMenu.add( fontItem );
}
// add font sizes
fontMenu.addSeparator();
int[] fontSizes = { 8, 10, 12, 14, 16, 18, 20, 24, 28 };
for( int fontSize : fontSizes ) {
String fontSizeStr = Integer.toString( fontSize );
JMenuItem fontItem = new JMenuItem( fontSizeStr );
fontItem.addActionListener( this::fontSizeChanged );
fontMenu.add( fontItem );
}
}
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JMenu fontMenu;
private JTabbedPane tabbedPane;
private ControlBar controlBar;
// JFormDesigner - End of variables declaration //GEN-END:variables

View File

@@ -1,4 +1,4 @@
JFDML JFormDesigner: "7.0.0.0.194" Java: "13.0.1" encoding: "UTF-8"
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -285,6 +285,31 @@ new FormModel {
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "menuItemActionPerformed", true ) )
} )
} )
add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
name: "fontMenu"
"text": "Font"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
}
add( new FormComponent( "javax.swing.JMenuItem" ) {
name: "restoreFontMenuItem"
"text": "Restore Font"
"accelerator": static javax.swing.KeyStroke getKeyStroke( 48, 130, false )
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "restoreFont", false ) )
} )
add( new FormComponent( "javax.swing.JMenuItem" ) {
name: "incrFontMenuItem"
"text": "Increase Font Size"
"accelerator": static javax.swing.KeyStroke getKeyStroke( 521, 130, false )
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "incrFont", false ) )
} )
add( new FormComponent( "javax.swing.JMenuItem" ) {
name: "decrFontMenuItem"
"text": "Decrease Font Size"
"accelerator": static javax.swing.KeyStroke getKeyStroke( 45, 130, false )
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "decrFont", false ) )
} )
} )
add( new FormContainer( "javax.swing.JMenu", new FormLayoutManager( class javax.swing.JMenu ) ) {
name: "helpMenu"
"text": "Help"

View File

@@ -16,6 +16,7 @@
package com.formdev.flatlaf.demo;
import java.io.File;
import java.io.FileInputStream;
import java.util.prefs.Preferences;
import javax.swing.UIManager;
@@ -23,6 +24,8 @@ import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.FlatLightLaf;
import com.formdev.flatlaf.IntelliJTheme;
import com.formdev.flatlaf.demo.intellijthemes.IJThemesPanel;
import com.formdev.flatlaf.demo.intellijthemes.IJThemesPanel.PropertiesLaf;
import com.formdev.flatlaf.util.StringUtils;
/**
* @author Karl Tauber
@@ -30,12 +33,12 @@ import com.formdev.flatlaf.demo.intellijthemes.IJThemesPanel;
public class DemoPrefs
{
public static final String KEY_LAF = "laf";
public static final String KEY_LAF_INTELLIJ_THEME = "lafIntelliJTheme";
public static final String KEY_LAF_THEME = "lafTheme";
public static final String RESOURCE_PREFIX = "res:";
public static final String FILE_PREFIX = "file:";
public static final String INTELLIJ_THEME_UI_KEY = "__FlatLaf.demo.intelliJTheme";
public static final String THEME_UI_KEY = "__FlatLaf.demo.theme";
private static Preferences state;
@@ -55,16 +58,27 @@ public class DemoPrefs
else {
String lafClassName = state.get( KEY_LAF, FlatLightLaf.class.getName() );
if( IntelliJTheme.ThemeLaf.class.getName().equals( lafClassName ) ) {
String intelliJTheme = state.get( KEY_LAF_INTELLIJ_THEME, "" );
if( intelliJTheme.startsWith( RESOURCE_PREFIX ) )
IntelliJTheme.install( IJThemesPanel.class.getResourceAsStream( intelliJTheme.substring( RESOURCE_PREFIX.length() ) ) );
else if( intelliJTheme.startsWith( FILE_PREFIX ) )
FlatLaf.install( IntelliJTheme.createLaf( new FileInputStream( intelliJTheme.substring( FILE_PREFIX.length() ) ) ) );
String theme = state.get( KEY_LAF_THEME, "" );
if( theme.startsWith( RESOURCE_PREFIX ) )
IntelliJTheme.install( IJThemesPanel.class.getResourceAsStream( IJThemesPanel.THEMES_PACKAGE + theme.substring( RESOURCE_PREFIX.length() ) ) );
else if( theme.startsWith( FILE_PREFIX ) )
FlatLaf.install( IntelliJTheme.createLaf( new FileInputStream( theme.substring( FILE_PREFIX.length() ) ) ) );
else
FlatLightLaf.install();
if( !intelliJTheme.isEmpty() )
UIManager.getLookAndFeelDefaults().put( INTELLIJ_THEME_UI_KEY, intelliJTheme );
if( !theme.isEmpty() )
UIManager.getLookAndFeelDefaults().put( THEME_UI_KEY, theme );
} else if( IJThemesPanel.PropertiesLaf.class.getName().equals( lafClassName ) ) {
String theme = state.get( KEY_LAF_THEME, "" );
if( theme.startsWith( FILE_PREFIX ) ) {
File themeFile = new File( theme.substring( FILE_PREFIX.length() ) );
String themeName = StringUtils.removeTrailing( themeFile.getName(), ".properties" );
FlatLaf.install( new PropertiesLaf( themeName, themeFile ) );
} else
FlatLightLaf.install();
if( !theme.isEmpty() )
UIManager.getLookAndFeelDefaults().put( THEME_UI_KEY, theme );
} else
UIManager.setLookAndFeel( lafClassName );
}

View File

@@ -101,6 +101,7 @@ class MoreComponentsPanel
JButton button7 = new JButton();
JButton button8 = new JButton();
JToggleButton toggleButton6 = new JToggleButton();
JButton button1 = new JButton();
//======== this ========
setLayout(new MigLayout(
@@ -380,6 +381,11 @@ class MoreComponentsPanel
toggleButton6.setIcon(UIManager.getIcon("Tree.leafIcon"));
toggleButton6.setSelected(true);
toolBar1.add(toggleButton6);
//---- button1 ----
button1.setIcon(new ImageIcon(getClass().getResource("/com/formdev/flatlaf/demo/icons/intellij-showWriteAccess.png")));
button1.setEnabled(false);
toolBar1.add(button1);
}
add(toolBar1, "cell 1 10 3 1,growx");
// JFormDesigner - End of component initialization //GEN-END:initComponents

View File

@@ -1,4 +1,4 @@
JFDML JFormDesigner: "7.0.0.0.194" Java: "11.0.2" encoding: "UTF-8"
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -355,6 +355,11 @@ new FormModel {
"icon": new com.jformdesigner.model.SwingIcon( 2, "Tree.leafIcon" )
"selected": true
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button1"
"icon": new com.jformdesigner.model.SwingIcon( 0, "/com/formdev/flatlaf/demo/icons/intellij-showWriteAccess.png" )
"enabled": false
} )
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 10 3 1,growx"
} )

View File

@@ -1,4 +1,4 @@
JFDML JFormDesigner: "7.0.0.0.194" Java: "11.0.2" encoding: "UTF-8"
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -243,7 +243,7 @@ new FormModel {
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 790, 840 )
"size": new java.awt.Dimension( 840, 900 )
} )
}
}

View File

@@ -0,0 +1,178 @@
/*
* Copyright 2020 FormDev Software GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.formdev.flatlaf.demo.intellijthemes;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
/**
* This tool creates look and feel classes for all themes listed in themes.json.
*
* @author Karl Tauber
*/
public class IJThemesClassGenerator
{
public static void main( String[] args ) {
IJThemesManager themesManager = new IJThemesManager();
themesManager.loadBundledThemes();
String toPath = "../flatlaf-intellij-themes/src/main/java" + IJThemesPanel.THEMES_PACKAGE + "..";
StringBuilder allInfos = new StringBuilder();
StringBuilder markdownTable = new StringBuilder();
markdownTable.append( "Name | Class\n" );
markdownTable.append( "-----|------\n" );
for( IJThemeInfo ti : themesManager.bundledThemes ) {
if( ti.sourceCodeUrl == null || ti.sourceCodePath == null )
continue;
generateClass( ti, toPath, allInfos, markdownTable );
}
Path out = new File( toPath, "FlatAllIJThemes.java" ).toPath();
String allThemes = CLASS_HEADER + ALL_THEMES_TEMPLATE.replace( "${allInfos}", allInfos );
writeFile( out, allThemes );
System.out.println( markdownTable );
}
private static void generateClass( IJThemeInfo ti, String toPath, StringBuilder allInfos, StringBuilder markdownTable ) {
String resourceName = ti.resourceName;
String resourcePath = null;
int resSep = resourceName.indexOf( '/' );
if( resSep >= 0 ) {
resourcePath = resourceName.substring( 0, resSep );
resourceName = resourceName.substring( resSep + 1 );
}
String name = ti.name;
int nameSep = name.indexOf( '/' );
if( nameSep >= 0 )
name = name.substring( nameSep + 1 ).trim();
StringBuilder buf = new StringBuilder();
for( String n : name.split( " " ) ) {
if( n.length() == 0 || n.equals( "-" ) )
continue;
if( Character.isUpperCase( n.charAt( 0 ) ) )
buf.append( n );
else
buf.append( Character.toUpperCase( n.charAt( 0 ) ) ).append( n.substring( 1 ) );
}
String subPackage = (resourcePath != null) ? '.' + resourcePath.replace( "-", "" ) : "";
String themeClass = "Flat" + buf + "IJTheme";
String themeFile = resourceName;
String classBody = CLASS_HEADER + CLASS_TEMPLATE
.replace( "${subPackage}", subPackage )
.replace( "${themeClass}", themeClass )
.replace( "${themeFile}", themeFile );
File toDir = new File( toPath );
if( resourcePath != null )
toDir = new File( toDir, resourcePath.replace( "-", "" ) );
Path out = new File( toDir, themeClass + ".java" ).toPath();
writeFile( out, classBody );
if( allInfos.length() > 0 )
allInfos.append( '\n' );
allInfos.append( THEME_TEMPLATE
.replace( "${subPackage}", subPackage )
.replace( "${themeClass}", themeClass )
.replace( "${themeName}", name ) );
markdownTable.append( String.format( "[%s](%s) | `com.formdev.flatlaf.intellijthemes%s.%s`\n",
name, ti.sourceCodeUrl, subPackage, themeClass ) );
}
private static void writeFile( Path out, String content ) {
try {
Files.write( out, content.getBytes( StandardCharsets.ISO_8859_1 ),
StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING );
} catch( IOException ex ) {
ex.printStackTrace();
}
}
private static final String CLASS_HEADER =
"/*\n" +
" * Copyright 2020 FormDev Software GmbH\n" +
" *\n" +
" * Licensed under the Apache License, Version 2.0 (the \"License\");\n" +
" * you may not use this file except in compliance with the License.\n" +
" * You may obtain a copy of the License at\n" +
" *\n" +
" * https://www.apache.org/licenses/LICENSE-2.0\n" +
" *\n" +
" * Unless required by applicable law or agreed to in writing, software\n" +
" * distributed under the License is distributed on an \"AS IS\" BASIS,\n" +
" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" +
" * See the License for the specific language governing permissions and\n" +
" * limitations under the License.\n" +
" */\n" +
"\n";
private static final String CLASS_TEMPLATE =
"package com.formdev.flatlaf.intellijthemes${subPackage};\n" +
"\n" +
"import com.formdev.flatlaf.IntelliJTheme;\n" +
"\n" +
"/**\n" +
" * @author Karl Tauber\n" +
" */\n" +
"public class ${themeClass}\n" +
" extends IntelliJTheme.ThemeLaf\n" +
"{\n" +
" public static boolean install( ) {\n" +
" try {\n" +
" return install( new ${themeClass}() );\n" +
" } catch( RuntimeException ex ) {\n" +
" return false;\n" +
" }\n" +
" }\n" +
"\n" +
" public ${themeClass}() {\n" +
" super( Utils.loadTheme( \"${themeFile}\" ) );\n" +
" }\n" +
"}\n";
private static final String ALL_THEMES_TEMPLATE =
"package com.formdev.flatlaf.intellijthemes;\n" +
"\n" +
"import javax.swing.UIManager.LookAndFeelInfo;\n" +
"\n" +
"/**\n" +
" * @author Karl Tauber\n" +
" */\n" +
"public class FlatAllIJThemes\n" +
"{\n" +
" public static final LookAndFeelInfo[] INFOS = {\n" +
"${allInfos}\n" +
" };\n" +
"}\n";
private static final String THEME_TEMPLATE =
" new LookAndFeelInfo( \"${themeName}\", \"com.formdev.flatlaf.intellijthemes${subPackage}.${themeClass}\" ),";
}

View File

@@ -68,7 +68,9 @@ class IJThemesManager
// get current working directory
File directory = new File( "" ).getAbsoluteFile();
File[] themeFiles = directory.listFiles( (dir, name) -> name.endsWith( ".theme.json" ) );
File[] themeFiles = directory.listFiles( (dir, name) -> {
return name.endsWith( ".theme.json" ) || name.endsWith( ".properties" );
} );
if( themeFiles == null )
return;
@@ -77,7 +79,10 @@ class IJThemesManager
moreThemes.clear();
for( File f : themeFiles ) {
String name = StringUtils.removeTrailing( f.getName(), ".theme.json" );
String fname = f.getName();
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 ) );
lastModifiedMap.put( f, f.lastModified() );
}

View File

@@ -28,6 +28,7 @@ import java.beans.PropertyChangeListener;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.Files;
@@ -37,6 +38,7 @@ import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.Properties;
import java.util.function.Predicate;
import javax.swing.*;
import javax.swing.border.CompoundBorder;
@@ -58,6 +60,8 @@ import net.miginfocom.swing.*;
public class IJThemesPanel
extends JPanel
{
public static final String THEMES_PACKAGE = "/com/formdev/flatlaf/intellijthemes/themes/";
private final IJThemesManager themesManager = new IJThemesManager();
private final List<IJThemeInfo> themes = new ArrayList<>();
private final HashMap<Integer, String> categories = new HashMap<>();
@@ -71,6 +75,7 @@ public class IJThemesPanel
private Window window;
private File lastDirectory;
private boolean isAdjustingThemesList;
public IJThemesPanel() {
initComponents();
@@ -134,6 +139,10 @@ public class IJThemesPanel
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() ) );
// add themes from directory
categories.put( themes.size(), "Current Directory" );
themes.addAll( themesManager.moreThemes );
// add uncategorized bundled themes
categories.put( themes.size(), "IntelliJ Themes" );
for( IJThemeInfo ti : themesManager.bundledThemes ) {
@@ -157,10 +166,6 @@ public class IJThemesPanel
themes.add( ti );
}
// add themes from directory
categories.put( themes.size(), "Current Directory" );
themes.addAll( themesManager.moreThemes );
// remember selection
IJThemeInfo oldSel = themesList.getSelectedValue();
@@ -193,7 +198,7 @@ public class IJThemesPanel
}
private void themesListValueChanged( ListSelectionEvent e ) {
if( e.getValueIsAdjusting() )
if( e.getValueIsAdjusting() || isAdjustingThemesList )
return;
IJThemeInfo themeInfo = themesList.getSelectedValue();
@@ -223,15 +228,19 @@ public class IJThemesPanel
}
} else if( themeInfo.themeFile != null ) {
try {
FlatLaf.install( IntelliJTheme.createLaf( new FileInputStream( themeInfo.themeFile ) ) );
DemoPrefs.getState().put( DemoPrefs.KEY_LAF_INTELLIJ_THEME, DemoPrefs.FILE_PREFIX + themeInfo.themeFile );
if( themeInfo.themeFile.getName().endsWith( ".properties" ) ) {
FlatLaf.install( new PropertiesLaf( themeInfo.name, themeInfo.themeFile ) );
} else
FlatLaf.install( IntelliJTheme.createLaf( new FileInputStream( themeInfo.themeFile ) ) );
DemoPrefs.getState().put( DemoPrefs.KEY_LAF_THEME, DemoPrefs.FILE_PREFIX + themeInfo.themeFile );
} catch( Exception ex ) {
ex.printStackTrace();
showInformationDialog( "Failed to load '" + themeInfo.themeFile + "'.", ex );
}
} else {
IntelliJTheme.install( getClass().getResourceAsStream( themeInfo.resourceName ) );
DemoPrefs.getState().put( DemoPrefs.KEY_LAF_INTELLIJ_THEME, DemoPrefs.RESOURCE_PREFIX + themeInfo.resourceName );
IntelliJTheme.install( getClass().getResourceAsStream( THEMES_PACKAGE + themeInfo.resourceName ) );
DemoPrefs.getState().put( DemoPrefs.KEY_LAF_THEME, DemoPrefs.RESOURCE_PREFIX + themeInfo.resourceName );
}
// update all components
@@ -253,7 +262,7 @@ public class IJThemesPanel
// save theme
try {
Files.copy( getClass().getResourceAsStream( themeInfo.resourceName ),
Files.copy( getClass().getResourceAsStream( THEMES_PACKAGE + themeInfo.resourceName ),
file.toPath(), StandardCopyOption.REPLACE_EXISTING );
} catch( IOException ex ) {
showInformationDialog( "Failed to save theme to '" + file + "'.", ex );
@@ -266,7 +275,7 @@ public class IJThemesPanel
File licenseFile = new File( file.getParentFile(),
StringUtils.removeTrailing( file.getName(), ".theme.json" ) +
themeInfo.licenseFile.substring( themeInfo.licenseFile.indexOf( '.' ) ) );
Files.copy( getClass().getResourceAsStream( themeInfo.licenseFile ),
Files.copy( getClass().getResourceAsStream( THEMES_PACKAGE + themeInfo.licenseFile ),
licenseFile.toPath(), StandardCopyOption.REPLACE_EXISTING );
} catch( IOException ex ) {
showInformationDialog( "Failed to save theme license to '" + file + "'.", ex );
@@ -331,17 +340,17 @@ public class IJThemesPanel
private void selectedCurrentLookAndFeel() {
LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
String intelliJTheme = UIManager.getLookAndFeelDefaults().getString( DemoPrefs.INTELLIJ_THEME_UI_KEY );
String theme = UIManager.getLookAndFeelDefaults().getString( DemoPrefs.THEME_UI_KEY );
if( intelliJTheme == null && lookAndFeel instanceof IntelliJTheme.ThemeLaf )
if( theme == null && (lookAndFeel instanceof IntelliJTheme.ThemeLaf || lookAndFeel instanceof PropertiesLaf) )
return;
Predicate<IJThemeInfo> test;
if( intelliJTheme != null && intelliJTheme.startsWith( DemoPrefs.RESOURCE_PREFIX ) ) {
String resourceName = intelliJTheme.substring( DemoPrefs.RESOURCE_PREFIX.length() );
if( theme != null && theme.startsWith( DemoPrefs.RESOURCE_PREFIX ) ) {
String resourceName = theme.substring( DemoPrefs.RESOURCE_PREFIX.length() );
test = ti -> Objects.equals( ti.resourceName, resourceName );
} else if( intelliJTheme != null && intelliJTheme.startsWith( DemoPrefs.FILE_PREFIX ) ) {
File themeFile = new File( intelliJTheme.substring( DemoPrefs.FILE_PREFIX.length() ) );
} else if( theme != null && theme.startsWith( DemoPrefs.FILE_PREFIX ) ) {
File themeFile = new File( theme.substring( DemoPrefs.FILE_PREFIX.length() ) );
test = ti -> Objects.equals( ti.themeFile, themeFile );
} else {
String lafClassName = lookAndFeel.getClass().getName();
@@ -356,11 +365,13 @@ public class IJThemesPanel
}
}
isAdjustingThemesList = true;
if( newSel >= 0 ) {
if( newSel != themesList.getSelectedIndex() )
themesList.setSelectedIndex( newSel );
} else
themesList.clearSelection();
isAdjustingThemesList = false;
}
private void initComponents() {
@@ -420,4 +431,78 @@ public class IJThemesPanel
private JScrollPane themesScrollPane;
private JList<IJThemeInfo> themesList;
// JFormDesigner - End of variables declaration //GEN-END:variables
//---- class PropertiesLaf ------------------------------------------------
public static class PropertiesLaf
extends FlatLaf
{
private final String name;
private final String baseTheme;
private final boolean dark;
private final Properties properties;
public PropertiesLaf( String name, File propertiesFile )
throws IOException
{
this.name = name;
properties = new Properties();
try( InputStream in = new FileInputStream( propertiesFile ) ) {
if( in != null )
properties.load( in );
}
baseTheme = properties.getProperty( "@baseTheme", "light" );
dark = "dark".equalsIgnoreCase( baseTheme ) || "darcula".equalsIgnoreCase( baseTheme );
}
@Override
public String getName() {
return name;
}
@Override
public String getDescription() {
return name;
}
@Override
public boolean isDark() {
return dark;
}
@Override
protected ArrayList<Class<?>> getLafClassesForDefaultsLoading() {
ArrayList<Class<?>> lafClasses = new ArrayList<>();
lafClasses.add( FlatLaf.class );
switch( baseTheme.toLowerCase() ) {
default:
case "light":
lafClasses.add( FlatLightLaf.class );
break;
case "dark":
lafClasses.add( FlatDarkLaf.class );
break;
case "intellij":
lafClasses.add( FlatLightLaf.class );
lafClasses.add( FlatIntelliJLaf.class );
break;
case "darcula":
lafClasses.add( FlatDarkLaf.class );
lafClasses.add( FlatDarculaLaf.class );
break;
}
lafClasses.add( PropertiesLaf.class );
return lafClasses;
}
@Override
protected Properties getAdditionalDefaults() {
return properties;
}
}
}

View File

@@ -46,7 +46,7 @@ public class IJThemesUpdater
else if( fromUrl.contains( "gitlab.com" ) )
fromUrl = fromUrl.replace( "/blob/", "/raw/" );
String toPath = "src/main/resources/com/formdev/flatlaf/demo/intellijthemes/" + ti.resourceName;
String toPath = "../flatlaf-intellij-themes/src/main/resources" + IJThemesPanel.THEMES_PACKAGE + ti.resourceName;
download( fromUrl, toPath );
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

View File

@@ -1,322 +0,0 @@
{
"author": "Vlad Volkov",
"colors": {
"accent": "#FFC83C",
"greyDot15": "#d8d8d8",
"greyDot25": "#bfbfbf",
"greyDot33": "#aaaaaa",
"greyDot50": "#7d7d7d",
"greyDot65": "#5a5a5a",
"greyDot70": "#4d4d4d",
"greyDot75": "#434343",
"greyDot80": "#323232",
"greyDot85": "#252525",
"greyDot90": "#191919",
"navyDot85": "#191d21",
"navyDot90": "#1f2021",
"lightBlue": "#90dae6",
"green": "#5B8021",
"red": "#800040",
"desaturatedBlue": "#1e282d",
"desaturatedOrange": "#8049117f",
"transparentGreen": "#5B80217f",
"transparentRed": "#8000407f",
"transparentYellow": "#8066357f",
"transparentViolet": "#9478F67f",
"yellow": "#806635"
},
"dark": true,
"editorScheme": "/Hiberbee.xml",
"icons": {
"ColorPalette": {
"Actions.Grey": "#afafaf",
"Actions.Red": "#ff0072",
"Actions.Yellow": "#f7cd46",
"Actions.Green": "#A6E22E",
"Actions.Blue": "#307bf6",
"Actions.GreyInline": "#afafaf",
"Actions.GreyInline.Dark": "#7d7d7d",
"Objects.Grey": "#c8c8c8",
"Objects.RedStatus": "#EC5F5D",
"Objects.Red": "#ff0072",
"Objects.Pink": "#ffa9ca",
"Objects.Yellow": "#f7cd46",
"Objects.Green": "#78b756",
"Objects.Purple": "#9478f6",
"Objects.BlackText": "#4d4d4d",
"Objects.Blue": "#49b0f1",
"Objects.YellowDark": "#fd971f",
"Objects.GreenAndroid": "#78c856"
}
},
"name": "Hiberbee",
"ui": {
"ActionButton.hoverBackground": "greyDot65",
"ActionButton.hoverBorderColor": "greyDot50",
"ActionButton.pressedBackground": "greyDot65",
"Borders.ContrastBorderColor": "greyDot65",
"ActionButton.pressedBorderColor": "lightBlue",
"Borders.color": "greyDot65",
"Button.arc": "5",
"Button.background": "greyDot80",
"Button.default.endBackground": "greyDot80",
"Button.default.endBorderColor": "greyDot65",
"Button.default.startBorderColor": "greyDot65",
"Button.default.focusColor": "greyDot50",
"Button.default.focusedBorderColor": "lightBlue",
"Button.default.foreground": "greyDot25",
"Button.default.shadowColor": "navyDot90",
"Button.default.startBackground": "greyDot80",
"Button.endBackground": "greyDot80",
"Button.startBorderColor": "greyDot65",
"Button.endBorderColor": "greyDot65",
"Button.focusedBorderColor": "accent",
"Button.foreground": "greyDot25",
"Button.shadowColor": "navyDot90",
"Button.shadowWidth": "0",
"Button.startBackground": "greyDot80",
"CheckBox.background": "greyDot80",
"CheckBoxMenuItem.background": "greyDot80",
"CheckBoxMenuItem.disabledBackground": "greyDot85",
"CheckBoxMenuItem.selectionForeground": "accent",
"ComboBox.ArrowButton.disabledIconColor": "greyDot50",
"ComboBox.ArrowButton.iconColor": "accent",
"ComboBox.ArrowButton.nonEditableBackground": "greyDot70",
"ComboBox.background": "greyDot80",
"ComboBox.modifiedItemForeground": "accent",
"ComboBox.nonEditableBackground": "greyDot75",
"ComboPopup.border": "1,1,1,1,5a5a5a",
"CompletionPopup.foreground": "greyDot25",
"CompletionPopup.matchForeground": "accent",
"CompletionPopup.selectionBackground": "navyDot85",
"CompletionPopup.selectionInactiveBackground": "greyDot80",
"Component.arc": "5",
"Component.borderColor": "greyDot65",
"Component.errorFocusColor": "red",
"Component.focusColor": "accent",
"Component.focusWidth": "0",
"Component.focusedBorderColor": "greyDot50",
"Component.hoverIconColor": "accent",
"Component.iconColor": "lightBlue",
"Component.inactiveErrorFocusColor": "transparentRed",
"Component.inactiveWarningFocusColor": "transparentYellow",
"Component.warningFocusColor": "yellow",
"Counter.background": "greyDot80",
"Counter.foreground": "greyDot25",
"Debugger.Variables.changedValueForeground": "accent",
"Debugger.Variables.evaluatingExpressionForeground": "lightBlue",
"DebuggerPopup.borderColor": "greyDot65",
"DefaultTabs.background": "greyDot80",
"DefaultTabs.borderColor": "greyDot65",
"DefaultTabs.hoverBackground": "navyDot85",
"DefaultTabs.underlineColor": "accent",
"DefaultTabs.underlineHeight": 1,
"DefaultTabs.underlinedTabBackground": "greyDot75",
"DefaultTabs.underlinedTabForeground": "lightBlue",
"DragAndDrop.areaBackground": "greyDot75",
"DragAndDrop.areaForeground": "greyDot25",
"Editor.background": "greyDot90",
"Editor.foreground": "greyDot25",
"EditorPane.background": "greyDot80",
"EditorPane.caretForeground": "accent",
"EditorPane.foreground": "greyDot25",
"EditorPane.inactiveBackground": "greyDot85",
"EditorPane.inactiveForeground": "greyDot50",
"EditorPane.selectionBackground": "navyDot85",
"EditorPane.selectionForeground": "accent",
"EditorTabs.underlineHeight": 1,
"FileColor.Blue": "#23282d",
"FileColor.Green": "#232d28",
"FileColor.Orange": "#2d2823",
"FileColor.Rose": "#2d2323",
"FileColor.Violet": "#2D232D",
"FileColor.Yellow": "#2d2d23",
"GutterTooltip.infoForeground": "greyDot50",
"InplaceRefactoringPopup.borderColor": "lightBlue",
"Label.background": "greyDot80",
"Link.activeForeground": "lightBlue",
"Link.hoverForeground": "accent",
"Link.pressedForeground": "lightBlue",
"Link.visitedForeground": "greyDot25",
"List.background": "greyDot80",
"List.selectionBackground": "navyDot85",
"List.selectionForeground": "accent",
"MemoryIndicator.allocatedBackground": "green",
"MemoryIndicator.usedBackground": "red",
"Menu.acceleratorForeground": "greyDot25",
"Menu.acceleratorSelectionForeground": "accent",
"Menu.background": "greyDot80",
"Menu.borderColor": "greyDot65",
"Menu.foreground": "greyDot25",
"Menu.selectionForeground": "accent",
"Menu.separatorColor": "greyDot65",
"MenuBar.borderColor": "greyDot65",
"MenuBar.selectionBackground": "navyDot85",
"MenuBar.shadow": "navyDot90",
"MenuItem.selectionForeground": "accent",
"Notification.MoreButton.background": "greyDot85",
"Notification.MoreButton.innerBorderColor": "greyDot65",
"Notification.ToolWindow.errorBackground": "red",
"Notification.ToolWindow.errorBorderColor": "greyDot50",
"Notification.ToolWindow.errorForeground": "greyDot15",
"Notification.ToolWindow.informativeBackground": "#304000",
"Notification.ToolWindow.informativeBorderColor": "greyDot65",
"Notification.ToolWindow.informativeForeground": "greyDot15",
"Notification.ToolWindow.warningBackground": "yellow",
"Notification.ToolWindow.warningBorderColor": "greyDot65",
"Notification.ToolWindow.warningForeground": "greyDot15",
"Notification.background": "greyDot85",
"Notification.errorBackground": "red",
"Notification.errorBorderColor": "greyDot65",
"Notification.errorForeground": "greyDot15",
"Notification.foreground": "greyDot25",
"OptionPane.background": "greyDot80",
"OptionPane.foreground": "greyDot25",
"Panel.background": "greyDot80",
"Panel.foreground": "greyDot25",
"ParameterInfo.background": "greyDot85",
"ParameterInfo.currentOverloadBackground": "lightBlue",
"ParameterInfo.currentParameterForeground": "accent",
"ParameterInfo.foreground": "greyDot25",
"ParameterInfo.infoForeground": "greyDot33",
"ParameterInfo.lineSeparatorColor": "greyDot70",
"Plugins.Button.installBackground": "greyDot80",
"Plugins.Button.installBorderColor": "greyDot65",
"Plugins.Button.installFillBackground": "greyDot80",
"Plugins.Button.installFillForeground": "greyDot25",
"Plugins.Button.installForeground": "accent",
"Plugins.SearchField.background": "greyDot75",
"Plugins.SectionHeader.background": "greyDot75",
"Plugins.SectionHeader.foreground": "greyDot25",
"Plugins.Tab.hoverBackground": "navyDot85",
"Plugins.Tab.selectedBackground": "greyDot85",
"Plugins.background": "greyDot80",
"Plugins.disabledForeground": "greyDot50",
"Plugins.lightSelectionBackground": "greyDot70",
"Plugins.tagBackground": "greyDot85",
"Plugins.tagForeground": "greyDot25",
"Popup.Advertiser.background": "greyDot85",
"Popup.Advertiser.foreground": "greyDot50",
"Popup.Header.activeBackground": "greyDot75",
"Popup.Header.inactiveBackground": "greyDot85",
"Popup.paintBorder": true,
"PopupMenu.background": "greyDot80",
"PopupMenu.foreground": "greyDot25",
"PopupMenu.selectionBackground": "navyDot85",
"PopupMenu.selectionForeground": "lightBlue",
"PopupMenuSeparator.stripeWidth": 1,
"ProgressBar.failedColor": "red",
"ProgressBar.failedEndColor": "greyDot65",
"ProgressBar.indeterminateEndColor": "greyDot25",
"ProgressBar.indeterminateStartColor": "accent",
"ProgressBar.passedColor": "green",
"ProgressBar.passedEndColor": "greyDot65",
"ProgressBar.progressColor": "accent",
"ProgressBar.trackColor": "greyDot75",
"RadioButton.background": "greyDot75",
"ScrollBar.Mac.hoverTrackColor": "greyDot75",
"ScrollBar.Mac.trackColor": "greyDot75",
"ScrollPane.background": "greyDot85",
"ScrollPane.foreground": "greyDot25",
"SearchEverywhere.Advertiser.background": "greyDot85",
"SearchEverywhere.Advertiser.foreground": "greyDot33",
"SearchEverywhere.Header.background": "greyDot85",
"SearchEverywhere.List.separatorColor": "greyDot70",
"SearchEverywhere.List.separatorForeground": "greyDot70",
"SearchEverywhere.SearchField.background": "greyDot75",
"SearchEverywhere.SearchField.borderColor": "greyDot70",
"SearchEverywhere.SearchField.infoForeground": "greyDot50",
"SearchEverywhere.Tab.selectedBackground": "greyDot70",
"SearchEverywhere.Tab.selectedForeground": "accent",
"SearchMatch.endBackground": "accent",
"SearchMatch.startBackground": "accent",
"Separator.separatorColor": "greyDot70",
"SidePanel.background": "greyDot85",
"Slider.background": "greyDot80",
"Slider.focus": "greyDot65",
"SpeedSearch.background": "greyDot80",
"SpeedSearch.borderColor": "greyDot70",
"SpeedSearch.errorForeground": "red",
"SpeedSearch.foreground": "accent",
"SplitPane.background": "greyDot80",
"SplitPane.darkShadow": "navyDot90",
"SplitPane.highlight": "accent",
"SplitPane.shadow": "navyDot90",
"TabbedPane.background": "greyDot80",
"TabbedPane.contentAreaColor": "greyDot80",
"TabbedPane.disabledUnderlineColor": "greyDot75",
"TabbedPane.focusColor": "greyDot65",
"TabbedPane.foreground": "greyDot25",
"TabbedPane.hoverColor": "navyDot85",
"TabbedPane.tabSelectionHeight": 1,
"TabbedPane.underlineColor": "accent",
"Table.background": "greyDot80",
"Table.dropLineColor": "greyDot75",
"Table.dropLineShortColor": "greyDot70",
"Table.focusCellForeground": "accent",
"Table.selectionBackground": "navyDot85",
"Table.selectionForeground": "accent",
"Table.sortIconColor": "accent",
"Table.stripeColor": "greyDot75",
"TableHeader.background": "greyDot85",
"TableHeader.bottomSeparatorColor": "greyDot75",
"TableHeader.separatorColor": "greyDot70",
"TextArea.background": "greyDot85",
"TextArea.caretForeground": "accent",
"TextArea.foreground": "greyDot25",
"TextArea.selectionBackground": "navyDot85",
"TextField.background": "greyDot75",
"TextField.caretForeground": "accent",
"TextField.darkShadow": "navyDot90",
"TextField.foreground": "greyDot25",
"TextField.highlight": "greyDot15",
"TextField.selectionBackground": "navyDot85",
"TextPane.background": "greyDot80",
"TitlePane.background": "greyDot85",
"ToggleButton.borderColor": "greyDot70",
"ToggleButton.buttonColor": "greyDot75",
"ToggleButton.offBackground": "greyDot75",
"ToggleButton.offForeground": "greyDot25",
"ToggleButton.onBackground": "greyDot50",
"ToggleButton.onForeground": "accent",
"ToolBar.background": "greyDot80",
"ToolBar.borderHandleColor": "greyDot70",
"ToolBar.darkShadow": "navyDot90",
"ToolBar.shadow": "navyDot90",
"ToolTip.Actions.background": "greyDot80",
"ToolTip.Actions.infoForeground": "greyDot50",
"ToolTip.background": "greyDot75",
"ToolTip.foreground": "greyDot25",
"ToolTip.infoForeground": "greyDot50",
"ToolWindow.Button.hoverBackground": "navyDot85",
"ToolWindow.Button.selectedBackground": "greyDot70",
"ToolWindow.Button.selectedForeground": "accent",
"ToolWindow.Header.background": "greyDot85",
"ToolWindow.Header.inactiveBackground": "greyDot80",
"ToolWindow.HeaderTab.hoverBackground": "navyDot85",
"ToolWindow.HeaderTab.hoverInactiveBackground": "navyDot90",
"ToolWindow.HeaderTab.inactiveUnderlineColor": "greyDot75",
"ToolWindow.HeaderTab.selectedInactiveBackground": "greyDot80",
"ToolWindow.HeaderTab.underlineColor": "accent",
"ToolWindow.HeaderTab.underlineHeight": 1,
"ToolWindow.HeaderTab.underlinedTabInactiveBackground": "greyDot75",
"Tree.background": "greyDot85",
"Tree.modifiedItemForeground": "accent",
"Tree.paintLines": 0,
"Tree.rowHeight": 20,
"Tree.selectionBackground": "navyDot85",
"Tree.selectionForeground": "accent",
"Tree.selectionInactiveBackground": "navyDot90",
"ValidationTooltip.errorBackground": "red",
"ValidationTooltip.errorBorderColor": "greyDot65",
"ValidationTooltip.warningBackground": "#805e00",
"ValidationTooltip.warningBorderColor": "greyDot65",
"VersionControl.FileHistory.Commit.selectedBranchBackground": "greyDot70",
"VersionControl.Log.Commit.currentBranchBackground": "greyDot85",
"VersionControl.Log.Commit.unmatchedForeground": "greyDot25",
"WelcomeScreen.Projects.selectionBackground": "navyDot85",
"WelcomeScreen.Projects.selectionInactiveBackground": "navyDot90",
"WelcomeScreen.separatorColor": "greyDot65",
"Window.border": "0,0,0,0,5a5a5a"
}
}

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2016 CloudCannon
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,119 +0,0 @@
{
"name": "IntelliJ Light Preview",
"dark": false,
"author": "",
"editorScheme": "/Light.xml",
"ui": {
"*": {
"selectionBackground": "#2675BF",
"selectionBackgroundInactive": "#D5D5D5",
"selectionInactiveBackground": "#D5D5D5",
"disabledForeground": "#8C8C8C",
"disabledText": "#8C8C8C",
"inactiveForeground": "#8C8C8C",
"infoForeground": "#808080",
"modifiedItemForeground": "#005ad9",
"acceleratorSelectionForeground": "#FFFFFF",
"separatorColor": "#d1d1d1",
"separatorForeground": "#999999"
},
"Borders": {
"color": "#D1D1D1",
"ContrastBorderColor": "#D1D1D1"
},
"Button": {
"shadowColor": "#A6A6A620",
"startBorderColor": "#C4C4C4",
"endBorderColor": "#C4C4C4",
"default": {
"foreground": "#FFFFFF",
"startBackground": "#528CC7",
"endBackground": "#4989CC",
"startBorderColor": "#487EB8",
"endBorderColor": "#346DAD",
"shadowColor": "#A6A6A650",
"focusedBorderColor": "#A9C9F5"
}
},
"ComboBox": {
"background": "#FFFFFF",
"nonEditableBackground": "#FFFFFF",
"ArrowButton.background": "#fafafa"
},
"ComboBoxButton.background": "#FFFFFF",
"CompletionPopup": {
"selectionBackground": "#c5dffc",
"selectionInactiveBackground": "#e0e0e0"
},
"Component.borderColor": "#C4C4C4",
"DefaultTabs.background": "#F2F2F2",
"EditorTabs.underlinedTabBackground": "#ffffff",
"Editor": {
"background": "#cccccc",
"foreground": "#737373",
"shortcutForeground": "#4274A6"
},
"Label.errorForeground": "#C7222D",
"Link": {
"activeForeground": "#2470B3",
"hoverForeground": "#2470B3",
"pressedForeground": "#2470B3",
"visitedForeground": "#2470B3",
"secondaryForeground": "#77a8d9"
},
"Notification": {
"borderColor": "#D1D1D1"
},
"Menu.borderColor": "#d9d9d9",
"Panel.background": "#F2F2F2",
"PasswordField.background": "#FFFFFF",
"Popup": {
"separatorColor": "#d9d9d9",
"Advertiser.borderColor": "#D1D1D1",
"borderColor": "#adadad"
},
"ProgressBar": {
"trackColor": "#D1D1D1",
"progressColor": "#1E82E6",
"indeterminateStartColor": "#91C5F2",
"indeterminateEndColor": "#1E82E6"
},
"StatusBar.borderColor": "#D1D1D1",
"ToolWindow.Header.inactiveBackground": "#F2F2F2",
"Tree.rowHeight": 20
},
"icons": {
"ColorPalette": {
"Checkbox.Border.Default": "#b0b0b0",
"Checkbox.Background.Selected": "#4F9EE3",
"Checkbox.Border.Selected": "#4B97D9"
}
}
}

View File

@@ -1,127 +0,0 @@
{
"name": "gruvbox-theme",
"dark": true,
"author": "Vincent Parizet",
"editorScheme": "/gruvbox_theme.xml",
"ui": {
"*": {
"background": "#282828",
"foreground": "#fbf1c7",
"infoForeground": "#ebdbb2",
"lightSelectionBackground": "#3c3836",
"selectionBackground": "#4F4945",
"selectionForeground": "#fbf1c7",
"selectionBackgroundInactive": "#3c3836",
"selectedBackground": "#1d2021",
"selectedForeground": "#fbf1c7",
"selectedInactiveBackground": "#3c3836",
"selectedBackgroundInactive": "#3c3836",
"hoverBackground": "#28282866",
"borderColor": "#3c3836",
"disabledBorderColor": "#1d2021",
"separatorColor": "#3c3836"
},
"ActionButton": {
"hoverBackground": "#504945"
},
"Button": {
"startBackground": "#282828",
"endBackground": "#282828",
"startBorderColor": "#504945",
"endBorderColor": "#504945",
"default": {
"foreground": "#fbf1c7",
"startBackground": "#32302F",
"endBackground": "#32302F",
"startBorderColor": "#4F4945",
"endBorderColor": "#4F4945",
"focusedBorderColor": "#282828"
}
},
"ComboBox": {
"nonEditableBackground": "#282828",
"ArrowButton": {
"iconColor": "#fbf1c7",
"disabledIconColor": "#fbf1c7",
"nonEditableBackground": "#282828"
}
},
"EditorTabs": {
"selectedBackground": "#3c3836",
"underlineColor": "#83a598",
"inactiveMaskColor": "#28282866"
},
"ToolWindow": {
"Header": {
"background": "#3c3836",
"inactiveBackground": "#282828"
},
"HeaderTab": {
"selectedInactiveBackground": "#1d2021",
"hoverInactiveBackground": "#1d2021"
}
},
"Table": {
"stripeColor": "#3c3836",
"lightSelectionForeground": "#fbf1c7",
"lightSelectionInactiveForeground":"#a89984",
"lightSelectionBackground": "#504945",
"lightSelectionInactiveBackground":"#282828"
},
"FileColor": {
"Yellow": "#fabd2f22",
"Green": "#b8bb2622",
"Blue": "#83a59822",
"Violet": "#d3869b22",
"Orange": "#fe801922",
"Rose": "#cc241d22"
},
"Link": {
"activeForeground": "#83a598",
"hoverForeground": "#83a598",
"pressedForeground": "#83a598",
"visitedForeground": "#83a598"
}
},
"icons": {
"ColorPalette": {
"Actions.Grey": "#928374",
"Actions.Red": "#fb4934",
"Actions.Yellow": "#fabd2f",
"Actions.Green": "#98971a",
"Actions.Blue": "#458588",
"Actions.GreyInline.Dark": "#fbf1c7",
"Objects.Grey": "#928374FF",
"Objects.RedStatus": "#fb4934FF",
"Objects.Red": "#fb4934FF",
"Objects.Pink": "#d3869bFF",
"Objects.Yellow": "#fabd2fFF",
"Objects.Green": "#98971aFF",
"Objects.Blue": "#458588FF",
"Objects.Purple": "#b16286FF",
"Objects.BlackText": "#000000FF",
"Objects.YellowDark": "#d79921FF",
"Objects.GreenAndroid": "#b8bb26FF",
"Checkbox.Background.Default.Dark": "#282828",
"Checkbox.Border.Default.Dark": "#fbf1c7",
"Checkbox.Foreground.Selected.Dark": "#fbf1c7",
"Checkbox.Focus.Wide.Dark": "#458588",
"Checkbox.Focus.Thin.Default.Dark": "#458588",
"Checkbox.Focus.Thin.Selected.Dark": "#458588",
"Checkbox.Background.Disabled.Dark": "#282828",
"Checkbox.Border.Disabled.Dark": "#a89984",
"Checkbox.Foreground.Disabled.Dark": "#a89984"
}
}
}

View File

@@ -69,19 +69,33 @@
"sourceCodeUrl": "https://github.com/OlyaB/GreyTheme",
"sourceCodePath": "blob/master/src/Gray.theme.json"
},
"gruvbox_theme.theme.json": {
"name": "Gruvbox",
"gruvbox_dark_hard.theme.json": {
"name": "Gruvbox Dark Hard",
"license": "MIT",
"licenseFile": "gruvbox_theme.LICENSE.txt",
"sourceCodeUrl": "https://github.com/Vincent-P/gruvbox-intellij-theme",
"sourceCodePath": "blob/master/src/main/resources/gruvbox_theme.theme.json"
"sourceCodePath": "blob/master/src/main/resources/gruvbox_dark_hard.theme.json"
},
"Hiberbee.theme.json": {
"name": "Hiberbee",
"gruvbox_dark_medium.theme.json": {
"name": "Gruvbox Dark Medium",
"license": "MIT",
"licenseFile": "gruvbox_theme.LICENSE.txt",
"sourceCodeUrl": "https://github.com/Vincent-P/gruvbox-intellij-theme",
"sourceCodePath": "blob/master/src/main/resources/gruvbox_dark_medium.theme.json"
},
"gruvbox_dark_soft.theme.json": {
"name": "Gruvbox Dark Soft",
"license": "MIT",
"licenseFile": "gruvbox_theme.LICENSE.txt",
"sourceCodeUrl": "https://github.com/Vincent-P/gruvbox-intellij-theme",
"sourceCodePath": "blob/master/src/main/resources/gruvbox_dark_soft.theme.json"
},
"HiberbeeDark.theme.json": {
"name": "Hiberbee Dark",
"license": "MIT",
"licenseFile": "Hiberbee.LICENSE.txt",
"sourceCodeUrl": "https://github.com/Hiberbee/code-highlight-themes",
"sourceCodePath": "blob/master/src/main/resources/Hiberbee.theme.json"
"sourceCodePath": "blob/master/src/main/resources/HiberbeeDark.theme.json"
},
"HighContrast.theme.json": {
"name": "High contrast",
@@ -90,13 +104,6 @@
"sourceCodeUrl": "https://github.com/OlyaB/HighContrastTheme",
"sourceCodePath": "blob/master/src/HighContrast.theme.json"
},
"Light.theme.json": {
"name": "IntelliJ Light Preview",
"license": "MIT",
"licenseFile": "Light.LICENSE.txt",
"sourceCodeUrl": "https://github.com/OlyaB/IntelliJLightTheme",
"sourceCodePath": "blob/master/src/Light.theme.json"
},
"LightFlatTheme.theme.json": {
"name": "Light Flat",
"license": "MIT",

View File

@@ -0,0 +1,108 @@
FlatLaf IntelliJ Themes Pack
============================
This addon for FlatLaf bundles many popular open-source 3rd party themes from
JetBrains Plugins Repository into a JAR and provides Java classes to use them.
Use [FlatLaf Demo](https://github.com/JFormDesigner/FlatLaf#demo) to try them
out.
Download
--------
FlatLaf IntelliJ Themes Pack binaries are available on **JCenter** and **Maven
Central**.
If you use Maven or Gradle, add a dependency with following coordinates to your
build script:
groupId: com.formdev
artifactId: flatlaf-intellij-themes
version: (see button below)
Otherwise download `flatlaf-intellij-themes-<version>.jar` here:
[![Download](https://api.bintray.com/packages/jformdesigner/flatlaf/flatlaf-intellij-themes/images/download.svg)](https://bintray.com/jformdesigner/flatlaf/flatlaf-intellij-themes/_latestVersion)
You also need `flatlaf-<version>.jar`, which you can download here:
[![Download](https://api.bintray.com/packages/jformdesigner/flatlaf/flatlaf/images/download.svg)](https://bintray.com/jformdesigner/flatlaf/flatlaf/_latestVersion)
How to use?
-----------
Choose a theme (see list below) and invoke its `install` method. E.g.:
~~~java
FlatArcOrangeIJTheme.install();
~~~
Themes
------
This addon contains following themes.
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`
[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`
[Dracula](https://github.com/dracula/jetbrains) | `com.formdev.flatlaf.intellijthemes.FlatDraculaIJTheme`
[Gradianto Dark Fuchsia](https://github.com/thvardhan/Gradianto) | `com.formdev.flatlaf.intellijthemes.FlatGradiantoDarkFuchsiaIJTheme`
[Gradianto Deep Ocean](https://github.com/thvardhan/Gradianto) | `com.formdev.flatlaf.intellijthemes.FlatGradiantoDeepOceanIJTheme`
[Gradianto Midnight Blue](https://github.com/thvardhan/Gradianto) | `com.formdev.flatlaf.intellijthemes.FlatGradiantoMidnightBlueIJTheme`
[Gray](https://github.com/OlyaB/GreyTheme) | `com.formdev.flatlaf.intellijthemes.FlatGrayIJTheme`
[Gruvbox Dark Hard](https://github.com/Vincent-P/gruvbox-intellij-theme) | `com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkHardIJTheme`
[Gruvbox Dark Medium](https://github.com/Vincent-P/gruvbox-intellij-theme) | `com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkMediumIJTheme`
[Gruvbox Dark Soft](https://github.com/Vincent-P/gruvbox-intellij-theme) | `com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkSoftIJTheme`
[Hiberbee Dark](https://github.com/Hiberbee/code-highlight-themes) | `com.formdev.flatlaf.intellijthemes.FlatHiberbeeDarkIJTheme`
[High contrast](https://github.com/OlyaB/HighContrastTheme) | `com.formdev.flatlaf.intellijthemes.FlatHighContrastIJTheme`
[Light Flat](https://github.com/nerzhulart/LightFlatTheme) | `com.formdev.flatlaf.intellijthemes.FlatLightFlatIJTheme`
[Material Design Dark](https://github.com/xinkunZ/NotReallyMDTheme) | `com.formdev.flatlaf.intellijthemes.FlatMaterialDesignDarkIJTheme`
[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`
[Spacegray](https://github.com/mturlo/intellij-spacegray) | `com.formdev.flatlaf.intellijthemes.FlatSpacegrayIJTheme`
[Vuesion](https://github.com/vuesion/intellij-theme) | `com.formdev.flatlaf.intellijthemes.FlatVuesionIJTheme`
Material Theme UI Lite:
Name | Class
-----|------
[Arc Dark](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatArcDarkIJTheme`
[Arc Dark Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatArcDarkContrastIJTheme`
[Atom One Dark](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneDarkIJTheme`
[Atom One Dark Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneDarkContrastIJTheme`
[Atom One Light](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneLightIJTheme`
[Atom One Light Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneLightContrastIJTheme`
[Dracula](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatDraculaIJTheme`
[Dracula Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatDraculaContrastIJTheme`
[GitHub](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatGitHubIJTheme`
[GitHub Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatGitHubContrastIJTheme`
[Light Owl](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatLightOwlIJTheme`
[Light Owl Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatLightOwlContrastIJTheme`
[Material Darker](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDarkerIJTheme`
[Material Darker Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDarkerContrastIJTheme`
[Material Deep Ocean](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDeepOceanIJTheme`
[Material Deep Ocean Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDeepOceanContrastIJTheme`
[Material Lighter](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialLighterIJTheme`
[Material Lighter Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialLighterContrastIJTheme`
[Material Oceanic](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialOceanicIJTheme`
[Material Oceanic Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialOceanicContrastIJTheme`
[Material Palenight](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialPalenightIJTheme`
[Material Palenight Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialPalenightContrastIJTheme`
[Monokai Pro](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMonokaiProIJTheme`
[Monokai Pro Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMonokaiProContrastIJTheme`
[Night Owl](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatNightOwlIJTheme`
[Night Owl Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatNightOwlContrastIJTheme`
[Solarized Dark](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedDarkIJTheme`
[Solarized Dark Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedDarkContrastIJTheme`
[Solarized Light](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedLightIJTheme`
[Solarized Light Contrast](https://github.com/mallowigi/material-theme-ui-lite) | `com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedLightContrastIJTheme`

View File

@@ -0,0 +1,169 @@
/*
* 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.
*/
plugins {
`java-library`
`maven-publish`
id( "com.jfrog.bintray" )
id( "com.jfrog.artifactory" )
}
dependencies {
implementation( project( ":flatlaf-core" ) )
}
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
sourceSets {
create( "module-info" ) {
java {
// include "src/main/java" here to get compile errors if classes are
// used from other modules that are not specified in module dependencies
setSrcDirs( listOf( "src/main/module-info", "src/main/java" ) )
}
}
}
}
tasks {
assemble {
dependsOn(
"sourcesJar",
"javadocJar"
)
}
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
named<JavaCompile>( "compileModuleInfoJava" ) {
sourceCompatibility = "9"
targetCompatibility = "9"
dependsOn( ":flatlaf-core:jar" )
options.compilerArgs.add( "--module-path" )
options.compilerArgs.add( project( ":flatlaf-core" ).tasks["jar"].outputs.files.asPath )
}
}
jar {
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
from( sourceSets["module-info"].output ) {
include( "module-info.class" )
}
}
}
javadoc {
options {
this as StandardJavadocDocletOptions
tags = listOf( "uiDefault", "clientProperty" )
}
isFailOnError = false
}
register( "sourcesJar", Jar::class ) {
archiveClassifier.set( "sources" )
from( sourceSets.main.get().allJava )
}
register( "javadocJar", Jar::class ) {
archiveClassifier.set( "javadoc" )
from( javadoc )
}
}
publishing {
publications {
create<MavenPublication>( "maven" ) {
artifactId = "flatlaf-intellij-themes"
groupId = "com.formdev"
from( components["java"] )
artifact( tasks["sourcesJar"] )
artifact( tasks["javadocJar"] )
pom {
name.set( "FlatLaf IntelliJ Themes Pack" )
description.set( "Flat Look and Feel IntelliJ Themes Pack" )
url.set( "https://github.com/JFormDesigner/FlatLaf" )
licenses {
license {
name.set( "The Apache License, Version 2.0" )
url.set( "https://www.apache.org/licenses/LICENSE-2.0.txt" )
}
}
developers {
developer {
name.set( "Karl Tauber" )
organization.set( "FormDev Software GmbH" )
organizationUrl.set( "https://www.formdev.com/" )
}
}
scm {
url.set( "https://github.com/JFormDesigner/FlatLaf" )
}
}
}
}
}
bintray {
user = rootProject.extra["bintray.user"] as String?
key = rootProject.extra["bintray.key"] as String?
setPublications( "maven" )
with( pkg ) {
repo = "flatlaf"
name = "flatlaf-intellij-themes"
setLicenses( "Apache-2.0" )
vcsUrl = "https://github.com/JFormDesigner/FlatLaf"
with( version ) {
name = project.version.toString()
}
publish = rootProject.extra["bintray.publish"] as Boolean
dryRun = rootProject.extra["bintray.dryRun"] as Boolean
}
}
artifactory {
setContextUrl( "https://oss.jfrog.org" )
publish( closureOf<org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig> {
repository( delegateClosureOf<groovy.lang.GroovyObject> {
setProperty( "repoKey", "oss-snapshot-local" )
setProperty( "username", rootProject.extra["bintray.user"] as String? )
setProperty( "password", rootProject.extra["bintray.key"] as String? )
} )
defaults( delegateClosureOf<groovy.lang.GroovyObject> {
invokeMethod( "publications", "maven" )
setProperty( "publishArtifacts", true )
setProperty( "publishPom", true )
} )
} )
resolve( delegateClosureOf<org.jfrog.gradle.plugin.artifactory.dsl.ResolverConfig> {
setProperty( "repoKey", "jcenter" )
} )
}

View File

@@ -0,0 +1,82 @@
/*
* 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 javax.swing.UIManager.LookAndFeelInfo;
/**
* @author Karl Tauber
*/
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( "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" ),
new LookAndFeelInfo( "Dracula", "com.formdev.flatlaf.intellijthemes.FlatDraculaIJTheme" ),
new LookAndFeelInfo( "Gradianto Dark Fuchsia", "com.formdev.flatlaf.intellijthemes.FlatGradiantoDarkFuchsiaIJTheme" ),
new LookAndFeelInfo( "Gradianto Deep Ocean", "com.formdev.flatlaf.intellijthemes.FlatGradiantoDeepOceanIJTheme" ),
new LookAndFeelInfo( "Gradianto Midnight Blue", "com.formdev.flatlaf.intellijthemes.FlatGradiantoMidnightBlueIJTheme" ),
new LookAndFeelInfo( "Gray", "com.formdev.flatlaf.intellijthemes.FlatGrayIJTheme" ),
new LookAndFeelInfo( "Gruvbox Dark Hard", "com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkHardIJTheme" ),
new LookAndFeelInfo( "Gruvbox Dark Medium", "com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkMediumIJTheme" ),
new LookAndFeelInfo( "Gruvbox Dark Soft", "com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkSoftIJTheme" ),
new LookAndFeelInfo( "Hiberbee Dark", "com.formdev.flatlaf.intellijthemes.FlatHiberbeeDarkIJTheme" ),
new LookAndFeelInfo( "High contrast", "com.formdev.flatlaf.intellijthemes.FlatHighContrastIJTheme" ),
new LookAndFeelInfo( "Light Flat", "com.formdev.flatlaf.intellijthemes.FlatLightFlatIJTheme" ),
new LookAndFeelInfo( "Material Design Dark", "com.formdev.flatlaf.intellijthemes.FlatMaterialDesignDarkIJTheme" ),
new LookAndFeelInfo( "Monocai", "com.formdev.flatlaf.intellijthemes.FlatMonocaiIJTheme" ),
new LookAndFeelInfo( "Nord", "com.formdev.flatlaf.intellijthemes.FlatNordIJTheme" ),
new LookAndFeelInfo( "One Dark", "com.formdev.flatlaf.intellijthemes.FlatOneDarkIJTheme" ),
new LookAndFeelInfo( "Solarized Dark", "com.formdev.flatlaf.intellijthemes.FlatSolarizedDarkIJTheme" ),
new LookAndFeelInfo( "Solarized Light", "com.formdev.flatlaf.intellijthemes.FlatSolarizedLightIJTheme" ),
new LookAndFeelInfo( "Spacegray", "com.formdev.flatlaf.intellijthemes.FlatSpacegrayIJTheme" ),
new LookAndFeelInfo( "Vuesion", "com.formdev.flatlaf.intellijthemes.FlatVuesionIJTheme" ),
new LookAndFeelInfo( "Arc Dark", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatArcDarkIJTheme" ),
new LookAndFeelInfo( "Arc Dark Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatArcDarkContrastIJTheme" ),
new LookAndFeelInfo( "Atom One Dark", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneDarkIJTheme" ),
new LookAndFeelInfo( "Atom One Dark Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneDarkContrastIJTheme" ),
new LookAndFeelInfo( "Atom One Light", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneLightIJTheme" ),
new LookAndFeelInfo( "Atom One Light Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatAtomOneLightContrastIJTheme" ),
new LookAndFeelInfo( "Dracula", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatDraculaIJTheme" ),
new LookAndFeelInfo( "Dracula Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatDraculaContrastIJTheme" ),
new LookAndFeelInfo( "GitHub", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatGitHubIJTheme" ),
new LookAndFeelInfo( "GitHub Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatGitHubContrastIJTheme" ),
new LookAndFeelInfo( "Light Owl", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatLightOwlIJTheme" ),
new LookAndFeelInfo( "Light Owl Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatLightOwlContrastIJTheme" ),
new LookAndFeelInfo( "Material Darker", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDarkerIJTheme" ),
new LookAndFeelInfo( "Material Darker Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDarkerContrastIJTheme" ),
new LookAndFeelInfo( "Material Deep Ocean", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDeepOceanIJTheme" ),
new LookAndFeelInfo( "Material Deep Ocean Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialDeepOceanContrastIJTheme" ),
new LookAndFeelInfo( "Material Lighter", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialLighterIJTheme" ),
new LookAndFeelInfo( "Material Lighter Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialLighterContrastIJTheme" ),
new LookAndFeelInfo( "Material Oceanic", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialOceanicIJTheme" ),
new LookAndFeelInfo( "Material Oceanic Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialOceanicContrastIJTheme" ),
new LookAndFeelInfo( "Material Palenight", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialPalenightIJTheme" ),
new LookAndFeelInfo( "Material Palenight Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMaterialPalenightContrastIJTheme" ),
new LookAndFeelInfo( "Monokai Pro", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMonokaiProIJTheme" ),
new LookAndFeelInfo( "Monokai Pro Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatMonokaiProContrastIJTheme" ),
new LookAndFeelInfo( "Night Owl", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatNightOwlIJTheme" ),
new LookAndFeelInfo( "Night Owl Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatNightOwlContrastIJTheme" ),
new LookAndFeelInfo( "Solarized Dark", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedDarkIJTheme" ),
new LookAndFeelInfo( "Solarized Dark Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedDarkContrastIJTheme" ),
new LookAndFeelInfo( "Solarized Light", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedLightIJTheme" ),
new LookAndFeelInfo( "Solarized Light Contrast", "com.formdev.flatlaf.intellijthemes.materialthemeuilite.FlatSolarizedLightContrastIJTheme" ),
};
}

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 FlatArcIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatArcIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatArcIJTheme() {
super( Utils.loadTheme( "arc-theme.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 FlatArcOrangeIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatArcOrangeIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatArcOrangeIJTheme() {
super( Utils.loadTheme( "arc-theme-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 FlatCyanLightIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatCyanLightIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatCyanLightIJTheme() {
super( Utils.loadTheme( "Cyan.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 FlatDarkFlatIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatDarkFlatIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatDarkFlatIJTheme() {
super( Utils.loadTheme( "DarkFlatTheme.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 FlatDarkPurpleIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatDarkPurpleIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatDarkPurpleIJTheme() {
super( Utils.loadTheme( "DarkPurple.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 FlatDraculaIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatDraculaIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatDraculaIJTheme() {
super( Utils.loadTheme( "Dracula.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 FlatGradiantoDarkFuchsiaIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatGradiantoDarkFuchsiaIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatGradiantoDarkFuchsiaIJTheme() {
super( Utils.loadTheme( "Gradianto_dark_fuchsia.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 FlatGradiantoDeepOceanIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatGradiantoDeepOceanIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatGradiantoDeepOceanIJTheme() {
super( Utils.loadTheme( "Gradianto_deep_ocean.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 FlatGradiantoMidnightBlueIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatGradiantoMidnightBlueIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatGradiantoMidnightBlueIJTheme() {
super( Utils.loadTheme( "Gradianto_midnight_blue.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 FlatGrayIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatGrayIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatGrayIJTheme() {
super( Utils.loadTheme( "Gray.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 FlatGruvboxDarkHardIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatGruvboxDarkHardIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatGruvboxDarkHardIJTheme() {
super( Utils.loadTheme( "gruvbox_dark_hard.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 FlatGruvboxDarkMediumIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatGruvboxDarkMediumIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatGruvboxDarkMediumIJTheme() {
super( Utils.loadTheme( "gruvbox_dark_medium.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 FlatGruvboxDarkSoftIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatGruvboxDarkSoftIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatGruvboxDarkSoftIJTheme() {
super( Utils.loadTheme( "gruvbox_dark_soft.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 FlatHiberbeeDarkIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatHiberbeeDarkIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatHiberbeeDarkIJTheme() {
super( Utils.loadTheme( "HiberbeeDark.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 FlatHighContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatHighContrastIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatHighContrastIJTheme() {
super( Utils.loadTheme( "HighContrast.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 FlatLightFlatIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatLightFlatIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatLightFlatIJTheme() {
super( Utils.loadTheme( "LightFlatTheme.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 FlatMaterialDesignDarkIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatMaterialDesignDarkIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatMaterialDesignDarkIJTheme() {
super( Utils.loadTheme( "MaterialTheme.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 FlatMonocaiIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatMonocaiIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatMonocaiIJTheme() {
super( Utils.loadTheme( "Monocai.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 FlatNordIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatNordIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatNordIJTheme() {
super( Utils.loadTheme( "nord.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 FlatOneDarkIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatOneDarkIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatOneDarkIJTheme() {
super( Utils.loadTheme( "one_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 FlatSolarizedDarkIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatSolarizedDarkIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatSolarizedDarkIJTheme() {
super( Utils.loadTheme( "solarized_dark_theme.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 FlatSolarizedLightIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatSolarizedLightIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatSolarizedLightIJTheme() {
super( Utils.loadTheme( "solarized_light_theme.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 FlatSpacegrayIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatSpacegrayIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatSpacegrayIJTheme() {
super( Utils.loadTheme( "Spacegray.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 FlatVuesionIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatVuesionIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatVuesionIJTheme() {
super( Utils.loadTheme( "vuesion_theme.theme.json" ) );
}
}

View File

@@ -0,0 +1,42 @@
/*
* 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 java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
class Utils
{
static final Logger LOG = Logger.getLogger( FlatLaf.class.getName() );
static IntelliJTheme loadTheme( String name ) {
try {
return new IntelliJTheme( Utils.class.getResourceAsStream(
"/com/formdev/flatlaf/intellijthemes/themes/" + name ) );
} catch( IOException ex ) {
String msg = "FlatLaf: Failed to load IntelliJ theme '" + name + "'";
LOG.log( Level.SEVERE, msg, ex );
throw new RuntimeException( msg, ex );
}
}
}

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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatArcDarkContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatArcDarkContrastIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatArcDarkContrastIJTheme() {
super( Utils.loadTheme( "Arc Dark Contrast.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.materialthemeuilite;
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 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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatAtomOneDarkContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatAtomOneDarkContrastIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatAtomOneDarkContrastIJTheme() {
super( Utils.loadTheme( "Atom One Dark Contrast.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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatAtomOneDarkIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatAtomOneDarkIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatAtomOneDarkIJTheme() {
super( Utils.loadTheme( "Atom One 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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatAtomOneLightContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatAtomOneLightContrastIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatAtomOneLightContrastIJTheme() {
super( Utils.loadTheme( "Atom One Light Contrast.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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatAtomOneLightIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatAtomOneLightIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatAtomOneLightIJTheme() {
super( Utils.loadTheme( "Atom One Light.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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatDraculaContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatDraculaContrastIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatDraculaContrastIJTheme() {
super( Utils.loadTheme( "Dracula Contrast.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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatDraculaIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatDraculaIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatDraculaIJTheme() {
super( Utils.loadTheme( "Dracula.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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatGitHubContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatGitHubContrastIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatGitHubContrastIJTheme() {
super( Utils.loadTheme( "GitHub Contrast.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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatGitHubIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatGitHubIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatGitHubIJTheme() {
super( Utils.loadTheme( "GitHub.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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatLightOwlContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatLightOwlContrastIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatLightOwlContrastIJTheme() {
super( Utils.loadTheme( "Light Owl Contrast.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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatLightOwlIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatLightOwlIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatLightOwlIJTheme() {
super( Utils.loadTheme( "Light Owl.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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatMaterialDarkerContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatMaterialDarkerContrastIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatMaterialDarkerContrastIJTheme() {
super( Utils.loadTheme( "Material Darker Contrast.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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatMaterialDarkerIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatMaterialDarkerIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatMaterialDarkerIJTheme() {
super( Utils.loadTheme( "Material Darker.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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatMaterialDeepOceanContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatMaterialDeepOceanContrastIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatMaterialDeepOceanContrastIJTheme() {
super( Utils.loadTheme( "Material Deep Ocean Contrast.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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatMaterialDeepOceanIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatMaterialDeepOceanIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatMaterialDeepOceanIJTheme() {
super( Utils.loadTheme( "Material Deep Ocean.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.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatMaterialLighterContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
try {
return install( new FlatMaterialLighterContrastIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public FlatMaterialLighterContrastIJTheme() {
super( Utils.loadTheme( "Material Lighter Contrast.theme.json" ) );
}
}

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