Compare commits

..

90 Commits
1.5 ... 1.6

Author SHA1 Message Date
Karl Tauber
ae28c595f9 release 1.6 2021-09-14 15:00:29 +02:00
Karl Tauber
1d08ddda60 InternalFrame: added missing since 1.6 2021-09-14 14:56:21 +02:00
Karl Tauber
578379fd00 Table and TableHeader: renamed UI keys Table[Header].showLastVerticalLine to Table[Header].showTrailingVerticalLine (issue #332) 2021-09-14 14:31:17 +02:00
Karl Tauber
7c9f550d4c ComboBox: fixed popup location if shown above of combo box (Java 8 only) 2021-09-14 14:16:53 +02:00
Karl Tauber
84d4510d70 ComboBox: fixed popup border painting on HiDPI screens (e.g. at 150% scaling) 2021-09-14 12:46:51 +02:00
Karl Tauber
fa194ec258 TableHeader: fixed missing trailing vertical separator line if used in upper left corner of scroll pane (issue #332) 2021-09-14 00:52:59 +02:00
Karl Tauber
fd56de403d Slider: fixed calculation of baseline (see also PR #214) 2021-09-13 22:05:48 +02:00
Karl Tauber
85fde46504 Testing: FlatSingleComponentTest: revalidate and repaint when changing component orientation using Alt+R 2021-09-13 10:11:09 +02:00
Karl Tauber
b283178979 Spinner: fixed painting of border corners on left side (issue #382; regression since FlatLaf 1.4)
ComboBox (editable): fixed wrong border of internal text field under special circumstances
2021-09-10 16:37:07 +02:00
Karl Tauber
bddef38a7c Theme Editor: preview: added "editable" check box for text components 2021-09-08 00:22:02 +02:00
Karl Tauber
b5f2f77944 Theme Editor: layout of "All" preview tab improvements:
- right align "enabled" and "focused" check boxes
- two columns for controls
- removed help button
- JTextArea, JEditorPane and JTextPane in single line
- reduced some vertical gaps
2021-09-08 00:10:53 +02:00
Karl Tauber
fca0718ed0 Native window decorations: fixed unwanted uninstall of native window border when using JInternalFrame (which has its own JRootPane) and invoking updateUI() on internal frame (e.g. in preview of FlatLaf Theme Editor) 2021-09-07 17:55:45 +02:00
Karl Tauber
0d44ade6ea Theme Editor: preview improvements:
- remember state of "enabled", "focused" and "buttonType" and sync it with all editors
- added "_" button near "JMenuBar" label to test menu underline selection
2021-09-07 14:31:09 +02:00
Karl Tauber
6018f83a22 Theme Editor: center some labels and help buttons in preview 2021-09-05 22:15:49 +02:00
Karl Tauber
0b6247851b Theme Editor: fixed preview of focused list and table selection 2021-09-05 22:05:21 +02:00
Karl Tauber
8640dee053 Theme Editor: preview improvements:
- added "focused" checkbox to "All" tab to preview focused components
- added "button type" selector to "Buttons" tab
- added "unfocused"/"focused" header labels to "Buttons" and "Switches" tabs
- use local variables instead of fields where possible
2021-09-05 21:08:36 +02:00
Karl Tauber
824db2e3bd Table and TableHeader: added UI defaults to show last vertical line (issue #332) 2021-09-05 11:51:28 +02:00
Karl Tauber
c2c79c4676 Theme Editor:
- remember last used preview tab
- sync selected preview tab with all editors
2021-09-05 11:13:29 +02:00
Karl Tauber
4795fe5687 Theme Editor:
- added preview of buttons, checkboxes, radiobuttons, etc in various states (hover, pressed, focused, selected, disabled)
  (copied from `FlatComponentStateTest`)
- moved components preview panel from FlatThemePreview.jfd` to FlatThemePreviewAll.jfd`
- added tabs at top of preview area
2021-09-05 10:55:51 +02:00
Karl Tauber
d508f339c1 TableHeader: do not show resize cursor for last column if resizing last column is not possible because auto resize mode of table is not off (issue #332) 2021-09-04 18:20:21 +02:00
Karl Tauber
c7054537e7 Testing: FlatSingleComponentTest: support changing component orientation using Alt+R 2021-09-04 13:28:02 +02:00
Karl Tauber
b98b904023 added missing UI defaults to javadoc 2021-09-04 13:24:19 +02:00
Karl Tauber
253df9325d Extras: FlatAnimatedLafChange: made animated Laf change transition smoother 2021-09-04 13:19:12 +02:00
Karl Tauber
78a9cc1d0c Theme Editor: fixed: editor was not focused after startup or when switching directory 2021-09-03 17:32:59 +02:00
Karl Tauber
b25fcc3381 OptionPane: fixed rendering of longer HTML text if it is passed as StringBuilder, StringBuffer, or any other object that returns HTML text in method toString() (similar to issue #12) 2021-09-03 11:26:30 +02:00
Karl Tauber
51d7bc2c37 TextField, FormattedTextField, PasswordField and ComboBox: fixed alignment of placeholder text in right-to-left component orientation 2021-09-02 16:18:53 +02:00
Karl Tauber
09a18b2305 Theme Editor:
- highlight opened directory in history combobox list
- support removing directories from history ('x' button in combobox list)
2021-08-29 18:39:40 +02:00
Karl Tauber
31f2feee2e Theme Editor:
- special renderer for directory history combobox list that dimes path parts
- disable menu items and buttons if no directory or editor is open
- set editor font size when opening new editor if increased/decreased
2021-08-29 16:06:50 +02:00
Karl Tauber
218bb62bfd Theme Editor:
- fixed increasing layout and wrong top border color of find/replace bar when switching Laf
- fixed duplicate keys in reference auto-completion
2021-08-29 14:28:11 +02:00
Karl Tauber
694c2ad767 Theme Editor: preview improvements:
- added JSplitPane (contains JList and JTree)
- sort first column in JTable to have preview of sort direction arrow
- fixed background color of JEditorPane and JTextPane when enabling/disabling
- keep first JMenu enabled, but disable the menu items
2021-08-29 11:44:38 +02:00
Karl Tauber
97943fcd38 Theme Editor: changed main class to com.formdev.flatlaf.themeeditor.FlatThemeEditor 2021-08-28 17:38:51 +02:00
Karl Tauber
77f33467d2 Theme Editor: fixed endless look in "replace all" when replacing e.g. "a" with "aa" 2021-08-28 17:37:02 +02:00
Karl Tauber
651454170d Theme Editor:
- fixed duplicate lines action if selection includes line separator at the end
- preview: do not disable internal components of JInternalFrame
2021-08-28 14:30:11 +02:00
Karl Tauber
7ca48bd136 Theme Editor:
- support lazy values and icon colors in overlay color preview
- support icon colors in preview
- support icon colors in reference auto-completion
- support changing preview theme when editing FlatLaf.properties via adding `@baseTheme = dark|darcula|intellij`
2021-08-28 14:18:11 +02:00
Karl Tauber
968e508bb5 Theme Editor:
- change border color of find field to red if noting found/matches
- update search match highlighting after reloading file on external change
2021-08-27 22:53:04 +02:00
Karl Tauber
a6d318a197 Theme Editor: fixed missing keys (e.g. Button.foreground) in reference auto-completion, which are defined as wildcards or have some prefix 2021-08-27 22:32:59 +02:00
Karl Tauber
cd20f4086b Theme Editor: fixed preview of focused button in FlatDarkLaf (and probably other null value related issues) 2021-08-27 18:32:42 +02:00
Karl Tauber
ebd5905947 Theme Editor: preview improvements:
- added JToolBar, JProgressBar with string painted, JDesktopPane and JInternalFrame
- placed text components side-by-side to save vertical space
- changed button texts and removed tooltips
- fixed painting of table cell focus border
- added missing add.svg
2021-08-27 16:10:10 +02:00
Karl Tauber
817a3c62bb Theme Editor: preview improvements:
- fixed table header borders (runWithUIDefaultsGetter() in paint())
- cache lazy values
- use runWithUIDefaultsGetter() in layout(), validateTree() and paint()
2021-08-24 22:32:48 +02:00
Karl Tauber
f8f58400fe Theme Editor: added list, tree and table to preview 2021-08-24 21:49:09 +02:00
Karl Tauber
ef06840649 Theme Editor: basic README.md with shapshot download link 2021-08-24 18:38:21 +02:00
Karl Tauber
b17c14d62e Theme Editor: use UTF-8 encoding to load properties files 2021-08-24 17:50:03 +02:00
Karl Tauber
19dba94064 IntelliJ Themes: removed deprecated install() methods
but keep them in the flatlaf-core for API compatibility in NetBeans plugin
2021-08-24 17:38:19 +02:00
Karl Tauber
601e24f9e7 Theme Editor: fixed "..." in menus 2021-08-24 16:52:45 +02:00
Karl Tauber
c7f323ee13 Theme Editor: added window icon 2021-08-24 16:49:55 +02:00
Karl Tauber
e4522f3af4 Theme Editor: added "About" dialog
Demo: updated "About" dialog
2021-08-24 16:40:17 +02:00
Karl Tauber
79af461a5b Theme Editor: instead of creating empty FlatLightLaf.properties and FlatDarkLaf.properties, add some how-to-use description to those files 2021-08-24 15:38:15 +02:00
Karl Tauber
2e8e07faf6 Theme Editor: auto-completion for keys improved:
- now also contains variables and keys defined in current and base themes
- appended " = "
- removes some unsupported keys (fonts and input maps)
2021-08-24 15:13:30 +02:00
Karl Tauber
ecdb000818 Theme Editor: avoid changing editor text (and adding item to undo history) when simply pressing OK button in "Insert Color" dialog without changing anything 2021-08-23 23:56:27 +02:00
Karl Tauber
999fd0d4da Theme Editor: generate .java file when creating new theme 2021-08-23 23:52:22 +02:00
Karl Tauber
705dd9558f Theme Editor:
- added "New Properties File" action to "File" menu
- added "+" button to tabbed pane
- ask to create .properties files when opening a directory that does not contain .properties files
- fixed Darcula baseTheme/preview
2021-08-23 23:02:41 +02:00
Karl Tauber
97ca866ffa OptionPane: fixed OptionPane.sameSizeButtons, which did not work as expected when setting to false 2021-08-23 16:53:23 +02:00
Karl Tauber
543b977db7 updated SVG icons from IntelliJ IDEA Community Edition to latest versions that include license header; added license header to SVGs where it were missing 2021-08-23 15:57:26 +02:00
Karl Tauber
ebb8a6d025 Theme Editor: ignore custom UI delegates in preview 2021-08-23 15:00:28 +02:00
Karl Tauber
506543281e Theme Editor: "Insert Color" dialog now immediately updates editor with new color, which updates "live" preview; also save/restore location of dialog 2021-08-23 14:41:53 +02:00
Karl Tauber
60322be22a Theme Editor: added "Insert Color" action to "Edit" menu that opens a color chooser dialog and inserts/edits a color at caret position 2021-08-23 14:06:18 +02:00
Karl Tauber
e1f30f24a8 Theme Editor: to toggle comment, add Ctrl+7 for German keyboards where Ctrl+/ does not work 2021-08-22 17:34:18 +02:00
Karl Tauber
1759f6b25c Theme Editor: increment/decrement color parts (red, green, blue or alpha) at caret using Ctrl+UP/Ctrl+DOWN 2021-08-22 17:26:29 +02:00
Karl Tauber
6578f25cc9 GitHub Actions: upload theme editor 2021-08-22 16:10:29 +02:00
Karl Tauber
8c26e0323f Theme Editor: increment/decrement numbers at caret using Ctrl+UP/Ctrl+DOWN 2021-08-22 15:33:29 +02:00
Karl Tauber
a5575894ab Theme Editor:
- update preview after 300ms (was 500ms)
- added separator between editor and preview
2021-08-22 14:26:18 +02:00
Karl Tauber
357823a027 Theme Editor: added "Show HSL/RGB colors" menu items to "View" menu to control display of color models in overlay color preview 2021-08-22 12:34:48 +02:00
Karl Tauber
a6d3f6b3eb Theme Editor: added menu components to preview 2021-08-22 11:19:47 +02:00
Karl Tauber
ae4c69e75c Theme Editor: fixed preview when switching Laf 2021-08-22 11:13:05 +02:00
Karl Tauber
31cadc532b Theme Editor:
- F12 now activates editor if focus is in preview or in find/replace
- changed accelerators for light/dark themes from F11/F12 to Alt+F1/F2
2021-08-22 00:33:34 +02:00
Karl Tauber
6e8443473b Theme Editor: special order for tabs: first core themes, then other themes 2021-08-21 23:27:43 +02:00
Karl Tauber
cca4ab3cd8 Theme Editor: fixed tabbed pane "more tabs" popup in preview 2021-08-21 18:24:57 +02:00
Karl Tauber
dab0ee3306 Theme Editor: added "live" preview 2021-08-21 18:09:59 +02:00
Karl Tauber
c6d1ed91a7 Menus: fixed missing modifiers flags in ActionEvent (issue #371; regression since FlatLaf 1.3) 2021-08-13 20:32:07 +02:00
Karl Tauber
a613a244f4 InternalFrame: double-click on icon in internal frame title bar now closes the internal frame (issue #374) 2021-08-13 19:11:03 +02:00
Karl Tauber
268fe15004 Tree: improved support for JTree.getPathForLocation(int x, int y) in wide selection (issue #373)
this is experimental and disabled by default; enable with:
`UIManager.put( "FlatLaf.experimental.tree.widePathForLocation", true );`
2021-08-13 00:19:34 +02:00
Karl Tauber
7bc9be686f FlatLaf: use larger initial capacity for UI defaults table to avoid resizing hash table and to save some memory 2021-08-13 00:13:54 +02:00
Karl Tauber
751919ec5a Theme Editor: find/replace improvements:
- while typing in find field, select match near caret and scroll to it
- PageUp/PageDown keys scroll editor if find/replace fields have focus
2021-08-12 22:05:08 +02:00
Karl Tauber
da913b426e Theme Editor: paint current line highlight always in the line where the caret is, which makes it easier to locate current match when using find/replace
RSyntaxTextArea paints line highlight only if selection is empty (caret dot == mark)
2021-08-11 23:59:33 +02:00
Karl Tauber
d8ef99cd8f Theme Editor: support resolving properties that use wildcards 2021-08-11 23:24:55 +02:00
Karl Tauber
d08a6d7dd3 Theme Editor: support loading/resolving base properties from core themes 2021-08-11 22:38:35 +02:00
Karl Tauber
896e9bca8e Theme Editor: re-implemented support loading/resolving base properties from other editors in opened directory 2021-08-11 21:53:10 +02:00
Karl Tauber
1df9597bb1 Theme Editor: support Ctrl+PageDown/PageUp to switch to next/previous editor 2021-08-09 10:19:24 +02:00
Karl Tauber
eaf55f2099 Theme Editor: store unscaled window bounds in preferences so that using Java 8 or 9+ results in same size on screen 2021-08-08 19:15:10 +02:00
Karl Tauber
5018a1f9eb Theme Editor: increase/decrease editor font size 2021-08-08 19:14:46 +02:00
Karl Tauber
71ba8f55a7 Theme Editor:
- support dark theme (menu "View > Dark Laf")
- moved RSyntaxTextArea theme config from XML to properties files
- bracket matching enabled
- highlight selected tab background
2021-08-08 17:43:59 +02:00
Karl Tauber
b65db707ed Theme Editor: auto-completion improved: support auto-activate after spaces, tabs or ',' 2021-08-07 14:59:20 +02:00
Karl Tauber
ed62266a43 Theme Editor: always select all text in find/replace text fields 2021-08-07 12:55:25 +02:00
Karl Tauber
49913b7dad Theme Editor: duplicate lines with Ctrl+Alt+Up or Ctrl+Alt+Down 2021-08-07 12:51:00 +02:00
Karl Tauber
3eeeb9e00b Theme Editor: update RSyntaxTextArea from 3.1.2 to 3.1.3 2021-08-07 11:18:00 +02:00
Karl Tauber
bfb1642284 UIDefaultsDump: dump HSL color values 2021-08-06 10:45:57 +02:00
Karl Tauber
0544a605c3 UIDefaultsLoader: added tint() and shade() color functions (inspired by Less CSS) 2021-08-05 23:37:42 +02:00
Karl Tauber
3f5acda132 UI defaults inspector: round HSL values (as also done in theme editor) 2021-08-05 18:49:03 +02:00
Karl Tauber
02b1ba2926 UIDefaultsLoader: added mix() color function (inspired by Less CSS) 2021-08-05 18:19:42 +02:00
Karl Tauber
7f7f9e3c7c UIDefaultsLoader: added changeHue(), changeSaturation(), changeLightness() and changeAlpha() color functions (inspired by Sass CSS color.change() function) 2021-08-05 17:08:20 +02:00
177 changed files with 9366 additions and 2464 deletions

View File

@@ -97,11 +97,22 @@ jobs:
restore-keys: ${{ runner.os }}-gradle
- name: Publish snapshot to oss.sonatype.org
run: ./gradlew publish -Dorg.gradle.internal.publish.checksums.insecure=true
run: ./gradlew publish :flatlaf-theme-editor:build -Dorg.gradle.internal.publish.checksums.insecure=true
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
- name: Upload theme editor
uses: sebastianpopp/ftp-action@releases/v2
with:
host: ${{ secrets.FTP_SERVER }}
user: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
forceSsl: true
localDir: "flatlaf-theme-editor/build/libs"
remoteDir: "snapshots"
options: "--only-newer --no-recursion --verbose=1"
release:
runs-on: ubuntu-latest
@@ -133,7 +144,7 @@ jobs:
restore-keys: ${{ runner.os }}-gradle
- name: Release a new stable version to Maven Central
run: ./gradlew publish :flatlaf-demo:build -Drelease=true
run: ./gradlew publish :flatlaf-demo:build :flatlaf-theme-editor:build -Drelease=true
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
@@ -150,3 +161,14 @@ jobs:
localDir: "flatlaf-demo/build/libs"
remoteDir: "."
options: "--only-newer --no-recursion --verbose=1"
- name: Upload theme editor
uses: sebastianpopp/ftp-action@releases/v2
with:
host: ${{ secrets.FTP_SERVER }}
user: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
forceSsl: true
localDir: "flatlaf-theme-editor/build/libs"
remoteDir: "."
options: "--only-newer --no-recursion --verbose=1"

View File

@@ -1,13 +1,47 @@
FlatLaf Change Log
==================
## 1.6
#### New features and improvements
- InternalFrame: Double-click on icon in internal frame title bar now closes the
internal frame. (issue #374)
- IntelliJ Themes: Removed deprecated `install()` methods.
#### Fixed bugs
- Menus: Fixed missing modifiers flags in `ActionEvent` (e.g. `Ctrl` key
pressed) when running in Java 9+ on Linux, macOS. Occurs also on Windows in
large popup menus that do not fit into the window. (issue #371; regression
since FlatLaf 1.3)
- OptionPane: Fixed `OptionPane.sameSizeButtons`, which did not work as expected
when setting to `false`.
- OptionPane: Fixed rendering of longer HTML text if it is passed as
`StringBuilder`, `StringBuffer`, or any other object that returns HTML text in
method `toString()`. (similar to issue #12)
- ComboBox: Fixed popup border painting on HiDPI screens (e.g. at 150% scaling).
- ComboBox: Fixed popup location if shown above of combo box (Java 8 only).
- ComboBox (editable): Fixed wrong border of internal text field under special
circumstances.
- Spinner: Fixed painting of border corners on left side. (issue #382;
regression since FlatLaf 1.4)
- TableHeader: Do not show resize cursor for last column if resizing last column
is not possible because auto resize mode of table is not off. (issue #332)
- TableHeader: Fixed missing trailing vertical separator line if used in upper
left corner of scroll pane. (issue #332)
- TextField, FormattedTextField, PasswordField and ComboBox: Fixed alignment of
placeholder text in right-to-left component orientation.
- Slider: Fixed calculation of baseline, which was wrong under some
circumstances.
## 1.5
#### New features and improvements
- SwingX: Added search and clear icons to `JXSearchField`. (issue #359)
#### Fixed bugs
- Button and TextComponent: Do not apply minimum width/height if margins are

View File

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

View File

@@ -35,6 +35,7 @@ import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.Properties;
@@ -66,6 +67,7 @@ import javax.swing.text.html.HTMLEditorKit;
import com.formdev.flatlaf.ui.FlatNativeWindowBorder;
import com.formdev.flatlaf.ui.FlatPopupFactory;
import com.formdev.flatlaf.ui.FlatRootPaneUI;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.GrayFilter;
import com.formdev.flatlaf.util.LoggingFacade;
import com.formdev.flatlaf.util.MultiResolutionImageSupport;
@@ -96,6 +98,7 @@ public abstract class FlatLaf
private MnemonicHandler mnemonicHandler;
private Consumer<UIDefaults> postInitialization;
private List<Function<Object, Object>> uiDefaultsGetters;
/**
* Sets the application look and feel to the given LaF
@@ -354,7 +357,14 @@ public abstract class FlatLaf
@Override
public UIDefaults getDefaults() {
UIDefaults defaults = super.getDefaults();
// use larger initial capacity to avoid resizing UI defaults hash table
// (from 610 to 1221 to 2443 entries) and to save some memory
UIDefaults defaults = new FlatUIDefaults( 1500, 0.75f );
// initialize basic defaults (see super.getDefaults())
initClassDefaults( defaults );
initSystemColorDefaults( defaults );
initComponentDefaults( defaults );
// add flag that indicates whether the LaF is light or dark
// (can be queried without using FlatLaf API)
@@ -914,6 +924,139 @@ public abstract class FlatLaf
return super.hashCode();
}
/**
* Registers a UI defaults getter function that is invoked before the standard getter.
* This allows using different UI defaults for special purposes
* (e.g. using multiple themes at the same time).
* <p>
* The key is passed as parameter to the function.
* If the function returns {@code null}, then the next registered function is invoked.
* If all registered functions return {@code null}, then the current look and feel is asked.
* If the function returns {@link #NULL_VALUE}, then the UI value becomes {@code null}.
*
* @see #unregisterUIDefaultsGetter(Function)
* @see #runWithUIDefaultsGetter(Function, Runnable)
* @since 1.6
*/
public void registerUIDefaultsGetter( Function<Object, Object> uiDefaultsGetter ) {
if( uiDefaultsGetters == null )
uiDefaultsGetters = new ArrayList<>();
uiDefaultsGetters.remove( uiDefaultsGetter );
uiDefaultsGetters.add( uiDefaultsGetter );
// disable shared UIs
FlatUIUtils.setUseSharedUIs( false );
}
/**
* Unregisters a UI defaults getter function that was invoked before the standard getter.
*
* @see #registerUIDefaultsGetter(Function)
* @see #runWithUIDefaultsGetter(Function, Runnable)
* @since 1.6
*/
public void unregisterUIDefaultsGetter( Function<Object, Object> uiDefaultsGetter ) {
if( uiDefaultsGetters == null )
return;
uiDefaultsGetters.remove( uiDefaultsGetter );
// enable shared UIs
if( uiDefaultsGetters.isEmpty() )
FlatUIUtils.setUseSharedUIs( true );
}
/**
* Registers a UI defaults getter function that is invoked before the standard getter,
* runs the given runnable and unregisters the UI defaults getter function again.
* This allows using different UI defaults for special purposes
* (e.g. using multiple themes at the same time).
* If the current look and feel is not FlatLaf, then the getter is ignored and
* the given runnable invoked.
* <p>
* The key is passed as parameter to the function.
* If the function returns {@code null}, then the next registered function is invoked.
* If all registered functions return {@code null}, then the current look and feel is asked.
* If the function returns {@link #NULL_VALUE}, then the UI value becomes {@code null}.
* <p>
* Example:
* <pre>{@code
* // create secondary theme
* UIDefaults darkDefaults = new FlatDarkLaf().getDefaults();
*
* // create panel using secondary theme
* FlatLaf.runWithUIDefaultsGetter( key -> {
* Object value = darkDefaults.get( key );
* return (value != null) ? value : FlatLaf.NULL_VALUE;
* }, () -> {
* // TODO create components that should use secondary theme here
* } );
* }</pre>
*
* @see #registerUIDefaultsGetter(Function)
* @see #unregisterUIDefaultsGetter(Function)
* @since 1.6
*/
public static void runWithUIDefaultsGetter( Function<Object, Object> uiDefaultsGetter, Runnable runnable ) {
LookAndFeel laf = UIManager.getLookAndFeel();
if( laf instanceof FlatLaf ) {
((FlatLaf)laf).registerUIDefaultsGetter( uiDefaultsGetter );
try {
runnable.run();
} finally {
((FlatLaf)laf).unregisterUIDefaultsGetter( uiDefaultsGetter );
}
} else
runnable.run();
}
/**
* Special value returned by functions used in {@link #runWithUIDefaultsGetter(Function, Runnable)}
* or {@link #registerUIDefaultsGetter(Function)} to indicate that the UI value should
* become {@code null}.
*
* @see #runWithUIDefaultsGetter(Function, Runnable)
* @see #registerUIDefaultsGetter(Function)
* @since 1.6
*/
public static final Object NULL_VALUE = new Object();
//---- class FlatUIDefaults -----------------------------------------------
private class FlatUIDefaults
extends UIDefaults
{
FlatUIDefaults( int initialCapacity, float loadFactor ) {
super( initialCapacity, loadFactor );
}
@Override
public Object get( Object key ) {
Object value = getValue( key );
return (value != null) ? (value != NULL_VALUE ? value : null) : super.get( key );
}
@Override
public Object get( Object key, Locale l ) {
Object value = getValue( key );
return (value != null) ? (value != NULL_VALUE ? value : null) : super.get( key, l );
}
private Object getValue( Object key ) {
if( uiDefaultsGetters == null )
return null;
for( int i = uiDefaultsGetters.size() - 1; i >= 0; i-- ) {
Object value = uiDefaultsGetters.get( i ).apply( key );
if( value != null )
return value;
}
return null;
}
}
//---- class ActiveFont ---------------------------------------------------
private static class ActiveFont

View File

@@ -604,6 +604,13 @@ class UIDefaultsLoader
case "fadeout": return parseColorHSLIncreaseDecrease( 3, false, params, resolver, reportError );
case "fade": return parseColorFade( params, resolver, reportError );
case "spin": return parseColorSpin( params, resolver, reportError );
case "changeHue": return parseColorChange( 0, params, resolver, reportError );
case "changeSaturation":return parseColorChange( 1, params, resolver, reportError );
case "changeLightness": return parseColorChange( 2, params, resolver, reportError );
case "changeAlpha": return parseColorChange( 3, params, resolver, reportError );
case "mix": return parseColorMix( null, params, resolver, reportError );
case "tint": return parseColorMix( "#fff", params, resolver, reportError );
case "shade": return parseColorMix( "#000", params, resolver, reportError );
}
} finally {
parseColorDepth--;
@@ -753,6 +760,68 @@ class UIDefaultsLoader
return parseFunctionBaseColor( colorStr, function, derived, resolver, reportError );
}
/**
* Syntax: changeHue(color,value[,options]) or
* changeSaturation(color,value[,options]) or
* changeLightness(color,value[,options]) or
* changeAlpha(color,value[,options])
* - color: a color (e.g. #f00) or a color function
* - value: for hue: number of degrees; otherwise: percentage 0-100%
* - options: [derived]
*/
private static Object parseColorChange( int hslIndex,
List<String> params, Function<String, String> resolver, boolean reportError )
{
String colorStr = params.get( 0 );
int value = (hslIndex == 0)
? parseInteger( params.get( 1 ), true )
: parsePercentage( params.get( 1 ) );
boolean derived = false;
if( params.size() > 2 ) {
String options = params.get( 2 );
derived = options.contains( "derived" );
}
// create function
ColorFunction function = new ColorFunctions.HSLChange( hslIndex, value );
// parse base color, apply function and create derived color
return parseFunctionBaseColor( colorStr, function, derived, resolver, reportError );
}
/**
* Syntax: mix(color1,color2[,weight]) or
* tint(color[,weight]) or
* shade(color[,weight])
* - color1: a color (e.g. #f00) or a color function
* - color2: a color (e.g. #f00) or a color function
* - weight: the weight (in range 0-100%) to mix the two colors
* larger weight uses more of first color, smaller weight more of second color
*/
private static Object parseColorMix( String color1Str, List<String> params, Function<String, String> resolver, boolean reportError ) {
int i = 0;
if( color1Str == null )
color1Str = params.get( i++ );
String color2Str = params.get( i++ );
int weight = 50;
if( params.size() > i )
weight = parsePercentage( params.get( i++ ) );
// parse second color
String resolvedColor2Str = resolver.apply( color2Str );
ColorUIResource color2 = (ColorUIResource) parseColorOrFunction( resolvedColor2Str, resolver, reportError );
if( color2 == null )
return null;
// create function
ColorFunction function = new ColorFunctions.Mix( color2, weight );
// parse first color, apply function and create mixed color
return parseFunctionBaseColor( color1Str, function, false, resolver, reportError );
}
private static Object parseFunctionBaseColor( String colorStr, ColorFunction function,
boolean derived, Function<String, String> resolver, boolean reportError )
{

View File

@@ -45,6 +45,7 @@ import com.formdev.flatlaf.util.DerivedColor;
*
* @uiDefault Component.focusWidth int
* @uiDefault Component.innerFocusWidth int or float
* @uiDefault Component.innerOutlineWidth int or float
* @uiDefault Component.focusColor Color
* @uiDefault Component.borderColor Color
* @uiDefault Component.disabledBorderColor Color

View File

@@ -44,7 +44,6 @@ import java.beans.PropertyChangeListener;
import javax.swing.AbstractAction;
import javax.swing.BorderFactory;
import javax.swing.CellRendererPane;
import javax.swing.ComboBoxEditor;
import javax.swing.DefaultListCellRenderer;
import javax.swing.InputMap;
import javax.swing.JButton;
@@ -338,33 +337,25 @@ public class FlatComboBoxUI
}
@Override
protected ComboBoxEditor createEditor() {
ComboBoxEditor comboBoxEditor = super.createEditor();
protected void configureEditor() {
super.configureEditor();
Component editor = comboBoxEditor.getEditorComponent();
if( editor instanceof JTextField ) {
JTextField textField = (JTextField) editor;
textField.setColumns( editorColumns );
// assign a non-null and non-javax.swing.plaf.UIResource border to the text field,
// otherwise it is replaced with default text field border when switching LaF
// because javax.swing.plaf.basic.BasicComboBoxEditor.BorderlessTextField.setBorder()
// uses "border instanceof javax.swing.plaf.basic.BasicComboBoxEditor.UIResource"
// instead of "border instanceof javax.swing.plaf.UIResource"
textField.setBorder( BorderFactory.createEmptyBorder() );
// remove default text field border from editor
Border border = textField.getBorder();
if( border == null || border instanceof UIResource ) {
// assign a non-null and non-javax.swing.plaf.UIResource border to the text field,
// otherwise it is replaced with default text field border when switching LaF
// because javax.swing.plaf.basic.BasicComboBoxEditor.BorderlessTextField.setBorder()
// uses "border instanceof javax.swing.plaf.basic.BasicComboBoxEditor.UIResource"
// instead of "border instanceof javax.swing.plaf.UIResource"
textField.setBorder( BorderFactory.createEmptyBorder() );
}
}
return comboBoxEditor;
}
@Override
protected void configureEditor() {
super.configureEditor();
// remove default text field border from editor
if( editor instanceof JTextField && ((JTextField)editor).getBorder() instanceof FlatTextBorder )
((JTextField)editor).setBorder( BorderFactory.createEmptyBorder() );
// explicitly make non-opaque
if( editor instanceof JComponent )
((JComponent)editor).setOpaque( false );
@@ -704,6 +695,9 @@ public class FlatComboBoxUI
protected void configurePopup() {
super.configurePopup();
// make opaque to avoid that background shines thru border (e.g. at 150% scaling)
setOpaque( true );
Border border = UIManager.getBorder( "PopupMenu.border" );
if( border != null )
setBorder( border );
@@ -736,6 +730,21 @@ public class FlatComboBoxUI
return height;
}
@Override
public void show( Component invoker, int x, int y ) {
// Java 8: fix y coordinate if popup is shown above the combobox
// (already fixed in Java 9+ https://bugs.openjdk.java.net/browse/JDK-7072653)
if( y < 0 && !SystemInfo.isJava_9_orLater ) {
Border popupBorder = getBorder();
if( popupBorder != null ) {
Insets insets = popupBorder.getBorderInsets( this );
y -= insets.top + insets.bottom;
}
}
super.show( invoker, x, y );
}
@Override
protected void paintChildren( Graphics g ) {
super.paintChildren( g );

View File

@@ -21,6 +21,7 @@ import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.LayoutManager;
import java.awt.Rectangle;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.BorderFactory;
@@ -146,6 +147,19 @@ public class FlatInternalFrameTitlePane
closeButton.setVisible( frame.isClosable() );
}
Rectangle getFrameIconBounds() {
Icon icon = titleLabel.getIcon();
if( icon == null )
return null;
int iconWidth = icon.getIconWidth();
int iconHeight = icon.getIconHeight();
boolean leftToRight = titleLabel.getComponentOrientation().isLeftToRight();
int x = titleLabel.getX() + (leftToRight ? 0 : (titleLabel.getWidth() - iconWidth));
int y = titleLabel.getY() + ((titleLabel.getHeight() - iconHeight) / 2);
return new Rectangle( x, y, iconWidth, iconHeight );
}
/**
* Does nothing because FlatLaf internal frames do not have system menus.
*/

View File

@@ -22,10 +22,13 @@ import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.event.MouseEvent;
import javax.swing.JComponent;
import javax.swing.JInternalFrame;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import javax.swing.event.MouseInputAdapter;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicInternalFrameUI;
@@ -122,6 +125,11 @@ public class FlatInternalFrameUI
return new FlatWindowResizer.InternalFrameResizer( frame, this::getDesktopManager );
}
@Override
protected MouseInputAdapter createBorderListener( JInternalFrame w ) {
return new FlatBorderListener();
}
//---- class FlatInternalFrameBorder --------------------------------------
public static class FlatInternalFrameBorder
@@ -195,4 +203,29 @@ public class FlatInternalFrameUI
}
}
}
//---- class FlatBorderListener -------------------------------------------
/**
* @since 1.6
*/
protected class FlatBorderListener
extends BorderListener
{
@Override
public void mouseClicked( MouseEvent e ) {
if( e.getClickCount() == 2 && !frame.isIcon() &&
e.getSource() instanceof FlatInternalFrameTitlePane )
{
Rectangle iconBounds = ((FlatInternalFrameTitlePane)e.getSource()).getFrameIconBounds();
if( iconBounds != null && iconBounds.contains( e.getX(), e.getY() ) ) {
if( frame.isClosable() )
frame.doDefaultCloseAction();
return;
}
}
super.mouseClicked( e );
}
}
}

View File

@@ -20,10 +20,12 @@ import java.awt.Color;
import java.awt.EventQueue;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.beans.PropertyChangeListener;
import javax.swing.JComponent;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicListUI;
import com.formdev.flatlaf.FlatClientProperties;
/**
* Provides the Flat LaF UI delegate for {@link javax.swing.JList}.
@@ -95,6 +97,17 @@ public class FlatListUI
selectionInactiveForeground = null;
}
@Override
protected PropertyChangeListener createPropertyChangeListener() {
PropertyChangeListener superListener = super.createPropertyChangeListener();
return e -> {
superListener.propertyChange( e );
if( FlatClientProperties.COMPONENT_FOCUS_OWNER.equals( e.getPropertyName() ) )
toggleSelectionColors();
};
}
@Override
protected FocusListener createFocusListener() {
return new BasicListUI.FocusHandler() {

View File

@@ -17,6 +17,7 @@
package com.formdev.flatlaf.ui;
import java.awt.Color;
import java.awt.Container;
import java.awt.Rectangle;
import java.awt.Window;
import java.beans.PropertyChangeListener;
@@ -24,7 +25,6 @@ import java.util.List;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JRootPane;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.event.ChangeListener;
import com.formdev.flatlaf.FlatClientProperties;
@@ -76,6 +76,11 @@ public class FlatNativeWindowBorder
if( !isSupported() )
return null;
// do nothing if root pane has a parent that is not a window (e.g. a JInternalFrame)
Container parent = rootPane.getParent();
if( parent != null && !(parent instanceof Window) )
return null;
// Check whether root pane already has a window, which is the case when
// switching from another LaF to FlatLaf.
// Also check whether the window is displayable, which is required to install
@@ -83,9 +88,8 @@ public class FlatNativeWindowBorder
// If the window is not displayable, then it was probably closed/disposed but not yet removed
// from the list of windows that AWT maintains and returns with Window.getWindows().
// It could be also be a window that is currently hidden, but may be shown later.
Window window = SwingUtilities.windowForComponent( rootPane );
if( window != null && window.isDisplayable() )
install( window );
if( parent instanceof Window && parent.isDisplayable() )
install( (Window) parent );
// Install FlatLaf native window border, which must be done late,
// when the native window is already created, because it needs access to the window.
@@ -174,9 +178,9 @@ public class FlatNativeWindowBorder
return;
// uninstall native window border
Window window = SwingUtilities.windowForComponent( rootPane );
if( window != null )
uninstall( window );
Container parent = rootPane.getParent();
if( parent instanceof Window )
uninstall( (Window) parent );
}
private static void uninstall( Window window ) {

View File

@@ -24,6 +24,7 @@ import java.awt.GridBagConstraints;
import java.awt.Insets;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
@@ -91,6 +92,7 @@ public class FlatOptionPaneUI
protected int messagePadding;
protected int maxCharactersPerLine;
private int focusWidth;
private boolean sameSizeButtons;
public static ComponentUI createUI( JComponent c ) {
return new FlatOptionPaneUI();
@@ -104,6 +106,7 @@ public class FlatOptionPaneUI
messagePadding = UIManager.getInt( "OptionPane.messagePadding" );
maxCharactersPerLine = UIManager.getInt( "OptionPane.maxCharactersPerLine" );
focusWidth = UIManager.getInt( "Component.focusWidth" );
sameSizeButtons = FlatUIUtils.getUIBoolean( "OptionPane.sameSizeButtons", true );
}
@Override
@@ -160,8 +163,15 @@ public class FlatOptionPaneUI
cons.insets.bottom = UIScale.scale( messagePadding );
// disable line wrapping for HTML
if( msg instanceof String && BasicHTML.isHTMLString( (String) msg ) )
maxll = Integer.MAX_VALUE;
if( msg != null &&
!(msg instanceof Component) &&
!(msg instanceof Object[]) &&
!(msg instanceof Icon) )
{
msg = msg.toString();
if( BasicHTML.isHTMLString( (String) msg ) )
maxll = Integer.MAX_VALUE;
}
// fix right-to-left alignment if super.addMessageComponents() breaks longer lines
// into multiple labels and puts them into a box that aligns them to the left
@@ -217,6 +227,11 @@ public class FlatOptionPaneUI
return null;
}
@Override
protected boolean getSizeButtonsToSameWidth() {
return sameSizeButtons;
}
//---- class NonUIResourceBorder ------------------------------------------
private static class NonUIResourceBorder

View File

@@ -24,8 +24,8 @@ import javax.swing.plaf.ComponentUI;
*
* <!-- BasicSeparatorUI -->
*
* @uiDefault PopupMenuSeparator.background Color unused
* @uiDefault PopupMenuSeparator.foreground Color
* @uiDefault Separator.background Color unused
* @uiDefault Separator.foreground Color
*
* <!-- FlatSeparatorUI -->
*

View File

@@ -27,9 +27,11 @@ import java.awt.Insets;
import java.awt.LayoutManager;
import java.awt.LayoutManager2;
import java.awt.Window;
import java.awt.event.HierarchyEvent;
import java.awt.event.HierarchyListener;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.function.Function;
import javax.swing.JComponent;
import javax.swing.JDialog;
@@ -38,6 +40,7 @@ import javax.swing.JLayeredPane;
import javax.swing.JMenuBar;
import javax.swing.JRootPane;
import javax.swing.LookAndFeel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.border.Border;
import javax.swing.plaf.BorderUIResource;
@@ -81,7 +84,8 @@ public class FlatRootPaneUI
private Object nativeWindowBorderData;
private LayoutManager oldLayout;
private HierarchyListener hierarchyListener;
private PropertyChangeListener ancestorListener;
private ComponentListener componentListener;
public static ComponentUI createUI( JComponent c ) {
return new FlatRootPaneUI();
@@ -149,16 +153,32 @@ public class FlatRootPaneUI
// This is very disturbing in dark themes, but hard to notice in light themes.
// Seems to be a rounding issue when Swing adds dirty region of window
// using RepaintManager.nativeAddDirtyRegion().
hierarchyListener = e -> {
if( (e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0 &&
rootPane.getParent() instanceof Window )
{
// add whole root pane to dirty regions when window is initially shown
rootPane.getParent().repaint( rootPane.getX(), rootPane.getY(),
rootPane.getWidth(), rootPane.getHeight() );
//
// Note: Not using a HierarchyListener here, which would be much easier,
// because this causes problems with mouse clicks in heavy-weight popups.
// Instead, add a listener to the root pane that waits until it is added
// to a window, then add a component listener to the window.
// See: https://github.com/JFormDesigner/FlatLaf/issues/371
ancestorListener = e -> {
Object oldValue = e.getOldValue();
Object newValue = e.getNewValue();
if( newValue instanceof Window ) {
if( componentListener == null ) {
componentListener = new ComponentAdapter() {
@Override
public void componentShown( ComponentEvent e ) {
// add whole root pane to dirty regions when window is initially shown
root.getParent().repaint( root.getX(), root.getY(), root.getWidth(), root.getHeight() );
}
};
}
((Window)newValue).addComponentListener( componentListener );
} else if( newValue == null && oldValue instanceof Window ) {
if( componentListener != null )
((Window)oldValue).removeComponentListener( componentListener );
}
};
root.addHierarchyListener( hierarchyListener );
root.addPropertyChangeListener( "ancestor", ancestorListener );
}
}
@@ -167,8 +187,14 @@ public class FlatRootPaneUI
super.uninstallListeners( root );
if( SystemInfo.isJava_9_orLater ) {
root.removeHierarchyListener( hierarchyListener );
hierarchyListener = null;
if( componentListener != null ) {
Window window = SwingUtilities.windowForComponent( root );
if( window != null )
window.removeComponentListener( componentListener );
componentListener = null;
}
root.removePropertyChangeListener( "ancestor", ancestorListener );
ancestorListener = null;
}
}

View File

@@ -18,9 +18,11 @@ package com.formdev.flatlaf.ui;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.event.MouseEvent;
@@ -176,9 +178,27 @@ public class FlatSliderUI
if( slider.getOrientation() == JSlider.VERTICAL )
return -1;
// use default font (instead of slider font) because the slider font size
// may be different to label font size, but we want align the track/thumb with labels
Font font = UIManager.getFont( "defaultFont" );
if( font == null )
font = slider.getFont();
FontMetrics fm = slider.getFontMetrics( font );
// calculate track y coordinate and height
// (not using field trackRect here because slider size may be [0,0]
// and field trackRect may have invalid values in this case)
Insets insets = slider.getInsets();
int thumbHeight = getThumbSize().height;
int contentHeight = height - insets.top - insets.bottom - focusInsets.top - focusInsets.bottom;
int centerSpacing = thumbHeight
+ (slider.getPaintTicks() ? getTickLength() : 0)
+ (slider.getPaintLabels() ? getHeightOfTallestLabel() : 0);
int trackY = insets.top + focusInsets.top + (contentHeight - centerSpacing - 1) / 2;
int trackHeight = thumbHeight;
// compute a baseline so that the track is vertically centered
FontMetrics fm = slider.getFontMetrics( slider.getFont() );
return trackRect.y + Math.round( (trackRect.height - fm.getHeight()) / 2f ) + fm.getAscent() - 1;
return trackY + Math.round( (trackHeight - fm.getHeight()) / 2f ) + fm.getAscent() - 1;
}
@Override

View File

@@ -175,15 +175,7 @@ public class FlatSpinnerUI
@Override
protected JComponent createEditor() {
JComponent editor = super.createEditor();
// explicitly make non-opaque
editor.setOpaque( false );
JTextField textField = getEditorTextField( editor );
if( textField != null )
textField.setOpaque( false );
updateEditorPadding();
updateEditorColors();
configureEditor( editor );
return editor;
}
@@ -191,8 +183,19 @@ public class FlatSpinnerUI
protected void replaceEditor( JComponent oldEditor, JComponent newEditor ) {
super.replaceEditor( oldEditor, newEditor );
configureEditor( newEditor );
removeEditorFocusListener( oldEditor );
addEditorFocusListener( newEditor );
}
/** @since 1.6 */
protected void configureEditor( JComponent editor ) {
// explicitly make non-opaque
editor.setOpaque( false );
JTextField textField = getEditorTextField( editor );
if( textField != null )
textField.setOpaque( false );
updateEditorPadding();
updateEditorColors();

View File

@@ -24,6 +24,7 @@ import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import javax.swing.JScrollBar;
import javax.swing.JScrollPane;
import javax.swing.JViewport;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.table.JTableHeader;
@@ -44,6 +45,7 @@ public class FlatTableHeaderBorder
{
protected Color separatorColor = UIManager.getColor( "TableHeader.separatorColor" );
protected Color bottomSeparatorColor = UIManager.getColor( "TableHeader.bottomSeparatorColor" );
/** @since 1.6 */ protected boolean showTrailingVerticalLine = UIManager.getBoolean( "TableHeader.showTrailingVerticalLine" );
public FlatTableHeaderBorder() {
super( UIManager.getInsets( "TableHeader.cellMargins" ) );
@@ -108,12 +110,23 @@ public class FlatTableHeaderBorder
}
protected boolean hideTrailingVerticalLine( JTableHeader header ) {
if( showTrailingVerticalLine )
return false;
// do not hide if table header is not a child of a scroll pane
Container viewport = header.getParent();
Container viewportParent = (viewport != null) ? viewport.getParent() : null;
if( !(viewportParent instanceof JScrollPane) )
return true;
return false;
JScrollBar vsb = ((JScrollPane)viewportParent).getVerticalScrollBar();
// do not hide if table header is not the column header of the scroll pane
JScrollPane scrollPane = (JScrollPane) viewportParent;
JViewport columnHeader = scrollPane.getColumnHeader();
if( viewport != columnHeader )
return false;
// hide if vertical scroll bar is not shown
JScrollBar vsb = scrollPane.getVerticalScrollBar();
if( vsb == null || !vsb.isVisible() )
return true;

View File

@@ -18,10 +18,13 @@ package com.formdev.flatlaf.ui;
import java.awt.Color;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.event.MouseEvent;
import java.awt.geom.Rectangle2D;
import java.util.Objects;
import javax.swing.Icon;
@@ -31,6 +34,7 @@ import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.UIManager;
import javax.swing.border.Border;
import javax.swing.event.MouseInputListener;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicTableHeaderUI;
@@ -58,6 +62,7 @@ import com.formdev.flatlaf.util.UIScale;
* @uiDefault TableHeader.cellMargins Insets
* @uiDefault TableHeader.separatorColor Color
* @uiDefault TableHeader.bottomSeparatorColor Color
* @uiDefault TableHeader.showTrailingVerticalLine boolean
*
* @author Karl Tauber
*/
@@ -94,6 +99,11 @@ public class FlatTableHeaderUI
bottomSeparatorColor = null;
}
@Override
protected MouseInputListener createMouseInputListener() {
return new FlatMouseInputHandler();
}
// overridden and made public to allow usage in custom renderers
@Override
public int getRolloverColumn() {
@@ -252,4 +262,54 @@ public class FlatTableHeaderUI
return (origBorder != null) ? origBorder.isBorderOpaque() : false;
}
}
//---- class FlatMouseInputHandler ----------------------------------------
/**
* @since 1.6
*/
protected class FlatMouseInputHandler
extends MouseInputHandler
{
Cursor oldCursor;
@Override
public void mouseMoved( MouseEvent e ) {
// restore old cursor, which is necessary because super.mouseMoved() swaps cursors
if( oldCursor != null ) {
header.setCursor( oldCursor );
oldCursor = null;
}
super.mouseMoved( e );
// if resizing last column is not possible, then Swing still shows a resize cursor,
// which can be confusing for the user --> change cursor to standard cursor
JTable table;
int column;
if( header.isEnabled() &&
(table = header.getTable()) != null &&
table.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF &&
header.getCursor() == Cursor.getPredefinedCursor( Cursor.E_RESIZE_CURSOR ) &&
(column = header.columnAtPoint( e.getPoint() )) >= 0 &&
column == header.getColumnModel().getColumnCount() - 1 )
{
// mouse is in last column
Rectangle r = header.getHeaderRect( column );
r.grow( -3, 0 );
if( !r.contains( e.getX(), e.getY() ) ) {
// mouse is in left or right resize area of last column
boolean isResizeLastColumn = (e.getX() >= r.x + (r.width / 2));
if( !header.getComponentOrientation().isLeftToRight() )
isResizeLastColumn = !isResizeLastColumn;
if( isResizeLastColumn ) {
// resize is not possible --> change cursor to standard cursor
oldCursor = header.getCursor();
header.setCursor( Cursor.getDefaultCursor() );
}
}
}
}
}
}

View File

@@ -25,6 +25,7 @@ import java.awt.Graphics2D;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.geom.Rectangle2D;
import java.beans.PropertyChangeListener;
import javax.swing.JComponent;
import javax.swing.JScrollPane;
import javax.swing.JViewport;
@@ -34,6 +35,7 @@ import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTableUI;
import javax.swing.table.JTableHeader;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.util.Graphics2DProxy;
import com.formdev.flatlaf.util.SystemInfo;
import com.formdev.flatlaf.util.UIScale;
@@ -69,6 +71,7 @@ import com.formdev.flatlaf.util.UIScale;
* @uiDefault Table.rowHeight int
* @uiDefault Table.showHorizontalLines boolean
* @uiDefault Table.showVerticalLines boolean
* @uiDefault Table.showTrailingVerticalLine boolean
* @uiDefault Table.intercellSpacing Dimension
* @uiDefault Table.selectionInactiveBackground Color
* @uiDefault Table.selectionInactiveForeground Color
@@ -90,6 +93,7 @@ public class FlatTableUI
{
protected boolean showHorizontalLines;
protected boolean showVerticalLines;
/** @since 1.6 */ protected boolean showTrailingVerticalLine;
protected Dimension intercellSpacing;
protected Color selectionBackground;
@@ -101,6 +105,8 @@ public class FlatTableUI
private boolean oldShowVerticalLines;
private Dimension oldIntercellSpacing;
private PropertyChangeListener propertyChangeListener;
public static ComponentUI createUI( JComponent c ) {
return new FlatTableUI();
}
@@ -111,6 +117,7 @@ public class FlatTableUI
showHorizontalLines = UIManager.getBoolean( "Table.showHorizontalLines" );
showVerticalLines = UIManager.getBoolean( "Table.showVerticalLines" );
showTrailingVerticalLine = UIManager.getBoolean( "Table.showTrailingVerticalLine" );
intercellSpacing = UIManager.getDimension( "Table.intercellSpacing" );
selectionBackground = UIManager.getColor( "Table.selectionBackground" );
@@ -159,6 +166,25 @@ public class FlatTableUI
table.setIntercellSpacing( oldIntercellSpacing );
}
@Override
protected void installListeners() {
super.installListeners();
propertyChangeListener = e -> {
if( FlatClientProperties.COMPONENT_FOCUS_OWNER.equals( e.getPropertyName() ) )
toggleSelectionColors();
};
table.addPropertyChangeListener( propertyChangeListener );
}
@Override
protected void uninstallListeners() {
super.uninstallListeners();
table.removePropertyChangeListener( propertyChangeListener );
propertyChangeListener = null;
}
@Override
protected FocusListener createFocusListener() {
return new BasicTableUI.FocusHandler() {
@@ -292,6 +318,10 @@ public class FlatTableUI
}
protected boolean hideLastVerticalLine() {
if( showTrailingVerticalLine )
return false;
// do not hide if table is not a child of a scroll pane
Container viewport = SwingUtilities.getUnwrappedParent( table );
Container viewportParent = (viewport != null) ? viewport.getParent() : null;
if( !(viewportParent instanceof JScrollPane) )

View File

@@ -237,12 +237,13 @@ public class FlatTextFieldUI
// compute placeholder location
Rectangle r = getVisibleEditorRect();
FontMetrics fm = c.getFontMetrics( c.getFont() );
String clippedPlaceholder = JavaCompatibility.getClippedString( c, fm, (String) placeholder, r.width );
int x = r.x + (c.getComponentOrientation().isLeftToRight() ? 0 : r.width - fm.stringWidth( clippedPlaceholder ));
int y = r.y + fm.getAscent() + ((r.height - fm.getHeight()) / 2);
// paint placeholder
g.setColor( placeholderForeground );
String clippedPlaceholder = JavaCompatibility.getClippedString( c, fm, (String) placeholder, r.width );
FlatUIUtils.drawString( c, g, clippedPlaceholder, r.x, y );
FlatUIUtils.drawString( c, g, clippedPlaceholder, x, y );
}
@Override

View File

@@ -230,6 +230,26 @@ public class FlatTreeUI
tree.repaint( 0, r.y, tree.getWidth(), r.height );
}
@Override
public Rectangle getPathBounds( JTree tree, TreePath path ) {
Rectangle bounds = super.getPathBounds( tree, path );
// If this method was invoked from JTree.getPathForLocation(int x, int y) to check whether
// the location is within tree node bounds, then return the bounds of a wide node.
// This changes the behavior of JTree.getPathForLocation(int x, int y) and
// JTree.getRowForLocation(int x, int y), which now return the path/row even
// if [x,y] is in the wide row area outside of the actual tree node.
if( bounds != null &&
isWideSelection() &&
UIManager.getBoolean( "FlatLaf.experimental.tree.widePathForLocation" ) &&
StackUtils.wasInvokedFrom( JTree.class.getName(), "getPathForLocation", 5 ) )
{
bounds.x = 0;
bounds.width = tree.getWidth();
}
return bounds;
}
/**
* Same as super.paintRow(), but supports wide selection and uses
* inactive selection background/foreground if tree is not focused.

View File

@@ -69,6 +69,7 @@ public class FlatUIUtils
{
public static final boolean MAC_USE_QUARTZ = Boolean.getBoolean( "apple.awt.graphics.UseQuartz" );
private static boolean useSharedUIs = true;
private static WeakHashMap<LookAndFeel, IdentityHashMap<Object, ComponentUI>> sharedUIinstances = new WeakHashMap<>();
public static Rectangle addInsets( Rectangle r, Insets insets ) {
@@ -825,6 +826,27 @@ debug*/
return explicitlySet;
}
/**
* Returns whether shared UI delegates are used.
*
* @since 1.6
*/
public static boolean isUseSharedUIs() {
return useSharedUIs;
}
/**
* Specifies whether shared UI delegates are used.
* This does not change already existing UI delegates.
*
* @since 1.6
*/
public static boolean setUseSharedUIs( boolean useSharedUIs ) {
boolean old = FlatUIUtils.useSharedUIs;
FlatUIUtils.useSharedUIs = useSharedUIs;
return old;
}
/**
* Creates a shared component UI for the given key and the current Laf.
* Each Laf instance has its own shared component UI instance.
@@ -833,6 +855,9 @@ debug*/
* may use multiple Laf instances at the same time.
*/
public static ComponentUI createSharedUI( Object key, Supplier<ComponentUI> newInstanceSupplier ) {
if( !useSharedUIs )
return newInstanceSupplier.get();
return sharedUIinstances
.computeIfAbsent( UIManager.getLookAndFeel(), k -> new IdentityHashMap<>() )
.computeIfAbsent( key, k -> newInstanceSupplier.get() );

View File

@@ -70,9 +70,10 @@ public class JBRCustomDecorations
return null;
// check whether root pane already has a parent, which is the case when switching LaF
Window window = SwingUtilities.windowForComponent( rootPane );
if( window != null ) {
FlatNativeWindowBorder.install( window );
Container parent = rootPane.getParent();
if( parent != null ) {
if( parent instanceof Window )
FlatNativeWindowBorder.install( (Window) parent );
return null;
}
@@ -110,9 +111,9 @@ public class JBRCustomDecorations
// since it is actually not possible to uninstall JBR decorations,
// simply reduce titleBarHeight so that it is still possible to resize window
// and remove hitTestSpots
Window window = SwingUtilities.windowForComponent( rootPane );
if( window != null )
setHasCustomDecoration( window, false );
Container parent = rootPane.getParent();
if( parent instanceof Window )
setHasCustomDecoration( (Window) parent, false );
}
static boolean hasCustomDecoration( Window window ) {

View File

@@ -26,13 +26,16 @@ import java.awt.Color;
public class ColorFunctions
{
public static Color applyFunctions( Color color, ColorFunction... functions ) {
// convert RGB to HSL
float[] hsl = HSLColor.fromRGB( color );
float alpha = color.getAlpha() / 255f;
float[] hsla = { hsl[0], hsl[1], hsl[2], alpha * 100 };
// apply color functions
for( ColorFunction function : functions )
function.apply( hsla );
// convert HSL to RGB
return HSLColor.toRGB( hsla[0], hsla[1], hsla[2], hsla[3] / 100 );
}
@@ -145,7 +148,46 @@ public class ColorFunctions
}
}
//---- class HSLIncreaseDecrease ------------------------------------------
//---- class HSLChange ----------------------------------------------------
/**
* Set the hue, saturation, luminance or alpha of a color.
*
* @since 1.6
*/
public static class HSLChange
implements ColorFunction
{
public final int hslIndex;
public final float value;
public HSLChange( int hslIndex, float value ) {
this.hslIndex = hslIndex;
this.value = value;
}
@Override
public void apply( float[] hsla ) {
hsla[hslIndex] = (hslIndex == 0)
? value % 360
: clamp( value );
}
@Override
public String toString() {
String name;
switch( hslIndex ) {
case 0: name = "changeHue"; break;
case 1: name = "changeSaturation"; break;
case 2: name = "changeLightness"; break;
case 3: name = "changeAlpha"; break;
default: throw new IllegalArgumentException();
}
return String.format( "%s(%.0f%s)", name, value, (hslIndex == 0 ? "" : "%") );
}
}
//---- class Fade ---------------------------------------------------------
/**
* Set the alpha of a color.
@@ -169,4 +211,42 @@ public class ColorFunctions
return String.format( "fade(%.0f%%)", amount );
}
}
//---- class Mix ----------------------------------------------------------
/**
* Mix two colors.
*
* @since 1.6
*/
public static class Mix
implements ColorFunction
{
public final Color color2;
public final float weight;
public Mix( Color color2, float weight ) {
this.color2 = color2;
this.weight = weight;
}
@Override
public void apply( float[] hsla ) {
// convert from HSL to RGB because color mixing is done on RGB values
Color color1 = HSLColor.toRGB( hsla[0], hsla[1], hsla[2], hsla[3] / 100 );
// mix
Color color = mix( color1, color2, weight / 100 );
// convert RGB to HSL
float[] hsl = HSLColor.fromRGB( color );
System.arraycopy( hsl, 0, hsla, 0, hsl.length );
hsla[3] = (color.getAlpha() / 255f) * 100;
}
@Override
public String toString() {
return String.format( "mix(#%08x,%.0f%%)", color2.getRGB(), weight );
}
}
}

View File

@@ -628,6 +628,7 @@ TabbedPane.closeCrossLineWidth = {float}1
Table.rowHeight = 20
Table.showHorizontalLines = false
Table.showVerticalLines = false
Table.showTrailingVerticalLine = false
Table.consistentHomeEndKeyBehavior = true
Table.intercellSpacing = {dimension}0,0
Table.scrollPaneBorder = com.formdev.flatlaf.ui.FlatBorder
@@ -657,7 +658,7 @@ TableHeader.cellBorder = com.formdev.flatlaf.ui.FlatTableHeaderBorder
TableHeader.cellMargins = 2,3,2,3
TableHeader.focusCellBackground = $TableHeader.background
TableHeader.background = @textComponentBackground
TableHeader.showTrailingVerticalLine = false
#---- TextArea ----

View File

@@ -18,6 +18,10 @@ package com.formdev.flatlaf.demo;
import java.awt.*;
import java.awt.event.*;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.time.Year;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.prefs.Preferences;
@@ -37,6 +41,7 @@ import com.formdev.flatlaf.extras.FlatSVGUtils;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.ui.JBRCustomDecorations;
import com.formdev.flatlaf.util.SystemInfo;
import com.formdev.flatlaf.util.UIScale;
import net.miginfocom.layout.ConstraintParser;
import net.miginfocom.layout.LC;
import net.miginfocom.layout.UnitValue;
@@ -128,7 +133,36 @@ class DemoFrame
}
private void aboutActionPerformed() {
JOptionPane.showMessageDialog( this, "FlatLaf Demo", "About", JOptionPane.PLAIN_MESSAGE );
JLabel titleLabel = new JLabel( "FlatLaf Demo" );
Font titleFont = titleLabel.getFont();
titleLabel.setFont( titleFont.deriveFont( (float) titleFont.getSize() + UIScale.scale( 6 ) ) );
String link = "https://www.formdev.com/flatlaf/";
JLabel linkLabel = new JLabel( "<html><a href=\"#\">" + link + "</a></html>" );
linkLabel.setCursor( Cursor.getPredefinedCursor( Cursor.HAND_CURSOR ) );
linkLabel.addMouseListener( new MouseAdapter() {
@Override
public void mouseClicked( MouseEvent e ) {
try {
Desktop.getDesktop().browse( new URI( link ) );
} catch( IOException | URISyntaxException ex ) {
JOptionPane.showMessageDialog( linkLabel,
"Failed to open '" + link + "' in browser.",
"About", JOptionPane.PLAIN_MESSAGE );
}
}
} );
JOptionPane.showMessageDialog( this,
new Object[] {
titleLabel,
"Demonstrates FlatLaf Swing look and feel",
" ",
"Copyright 2019-" + Year.now() + " FormDev Software GmbH",
linkLabel,
},
"About", JOptionPane.PLAIN_MESSAGE );
}
private void selectedTabChanged() {

View File

@@ -169,14 +169,6 @@ public class IJThemesClassGenerator
" }\n" +
" }\n" +
"\n" +
" /**\n" +
" * @deprecated use {@link #setup()} instead; this method will be removed in a future version\n" +
" */\n" +
" @Deprecated\n" +
" public static boolean install() {\n" +
" return setup();\n" +
" }\n" +
"\n" +
" public static void installLafInfo() {\n" +
" installLafInfo( NAME, ${themeClass}.class );\n" +
" }\n" +

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd" transform="translate(2 2)">
<rect width="5.5" height="5.5" fill="#59A869"/>

Before

Width:  |  Height:  |  Size: 403 B

After

Width:  |  Height:  |  Size: 550 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<path fill="#6E6E6E" d="M11,3 L4,3 L4,11 L2,11 L2,1 L11,1 L11,3 Z"/>

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 510 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<polygon fill="#59A869" fill-rule="evenodd" points="4 2 14 8 4 14"/>
</svg>

Before

Width:  |  Height:  |  Size: 162 B

After

Width:  |  Height:  |  Size: 309 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<rect width="6" height="1" x="5" y="12" fill="#6E6E6E"/>

Before

Width:  |  Height:  |  Size: 493 B

After

Width:  |  Height:  |  Size: 640 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<rect width="6" height="1" x="5" y="12" fill="#6E6E6E"/>

Before

Width:  |  Height:  |  Size: 493 B

After

Width:  |  Height:  |  Size: 640 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<rect width="10" height="10" x="3" y="3" fill="#DB5860" fill-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 318 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
<path fill="#DB5860" fill-rule="evenodd" d="M16,30 C8.2680135,30 2,23.7319865 2,16 C2,8.2680135 8.2680135,2 16,2 C23.7319865,2 30,8.2680135 30,16 C30,23.7319865 23.7319865,30 16,30 Z M14,7 L14,18 L18,18 L18,7 L14,7 Z M14,21 L14,25 L18,25 L18,21 L14,21 Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 497 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
<path fill="#389FD6" fill-rule="evenodd" d="M16,30 C8.2680135,30 2,23.7319865 2,16 C2,8.2680135 8.2680135,2 16,2 C23.7319865,2 30,8.2680135 30,16 C30,23.7319865 23.7319865,30 16,30 Z M14,7 L14,18 L18,18 L18,7 L14,7 Z M14,21 L14,25 L18,25 L18,21 L14,21 Z" transform="rotate(180 16 16)"/>
</svg>

Before

Width:  |  Height:  |  Size: 380 B

After

Width:  |  Height:  |  Size: 527 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<defs>
<rect id="abstractclass-a" width="8" height="14"/>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<defs>
<rect id="abstractmethod-a" width="8" height="14"/>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<path fill="#62B543" fill-opacity=".6" d="M15,8 C15,11.866 11.866,15 8,15 C4.134,15 1,11.866 1,8 C1,4.134 4.134,1 8,1 C11.866,1 15,4.134 15,8"/>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -1,10 +1,17 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<polygon fill="#9AA7B0" fill-opacity=".8" points="7 1 3 5 7 5"/>
<polygon fill="#9AA7B0" fill-opacity=".8" points="8 1 8 6 3 6 3 8 13 8 13 1"/>
<polygon fill="#40B6E0" fill-opacity=".7" points="1 16 16 16 16 9 1 9"/>
<path fill="#231F20" fill-opacity=".7" d="M0,2.501 C0,1 0.931,2.02832126e-16 2.256,0 C3.20239258,0 3.55,0.311 3.969,0.753 L3.42669678,1.42712402 C3.07669678,1.06812402 2.75,1 2.25,1 C1.418,1 1,1.73791504 1,2.487 C1,3.23608496 1.412,4 2.25,4 C2.787,4 3.05169678,3.89340869 3.42669678,3.50640869 L4,4.144 C3.544,4.669 3.19732666,5 2.225,5 C0.949,5 7.35277938e-17,4.002 0,2.501 Z" transform="translate(2 10)"/>
<path fill="#231F20" fill-opacity=".7" d="M0.972767969,1.50152588 C0.972767969,1.13305664 1.284,1 1.845,1 C1.85033333,1 2.23533333,1 3,1 L3,0 C2.26266667,0 1.88266667,0 1.86,0 C0.778,0 0,0.45916748 0,1.45 C0,2.31452637 0.419555664,2.69049072 1.47125244,2.91607666 C2.24158869,3.08131157 2.496155,3.22862939 2.496155,3.548 C2.496155,3.86737061 2.13842773,4 1.47125244,4 C1.46058577,4 1.07016829,4 0.3,4 L0.3,5 C1.07550163,5 1.46591911,5 1.47125244,5 C3.5,5 3.5,4 3.5,3.548 C3.5,2.91607666 3.02026367,2.42071533 2.15869141,2.14685059 C1.29711914,1.87298584 0.972767969,1.86999512 0.972767969,1.50152588 Z" transform="translate(7 10)"/>
<path fill="#231F20" fill-opacity=".7" d="M0.972767969,1.50152588 C0.972767969,1.13305664 1.284,1 1.845,1 C1.85033333,1 2.23533333,1 3,1 L3,0 C2.26266667,0 1.88266667,0 1.86,0 C0.778,0 0,0.45916748 0,1.45 C0,2.31452637 0.419555664,2.69049072 1.47125244,2.91607666 C2.24158869,3.08131157 2.496155,3.22862939 2.496155,3.548 C2.496155,3.86737061 2.13842773,4 1.47125244,4 C1.46058577,4 1.07016829,4 0.3,4 L0.3,5 C1.07550163,5 1.46591911,5 1.47125244,5 C3.5,5 3.5,4 3.5,3.548 C3.5,2.91607666 3.02026367,2.42071533 2.15869141,2.14685059 C1.29711914,1.87298584 0.972767969,1.86999512 0.972767969,1.50152588 Z" transform="translate(11 10)"/>
</g>
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="css">
<path id="Fill 1" fill-rule="evenodd" clip-rule="evenodd" d="M7 1L3 5H7V1Z" fill="#9AA7B0" fill-opacity="0.8"/>
<path id="Fill 3" fill-rule="evenodd" clip-rule="evenodd" d="M8 1V6H3V8H13V1H8Z" fill="#9AA7B0" fill-opacity="0.8"/>
<path id="Fill 5" fill-rule="evenodd" clip-rule="evenodd" d="M1 16H16V9H1V16Z" fill="#F98B9E" fill-opacity="0.6"/>
<g id="&#226;&#140;&#152;/alphabet/C">
<path id="&#226;&#140;&#152;/alphabet/C_2" fill-rule="evenodd" clip-rule="evenodd" d="M2 12.501C2 11 2.931 10 4.256 10C5.20239 10 5.55 10.311 5.969 10.753L5.4267 11.4271C5.0767 11.0681 4.75 11 4.25 11C3.418 11 3 11.7379 3 12.487C3 13.2361 3.412 14 4.25 14C4.787 14 5.0517 13.8934 5.4267 13.5064L6 14.144C5.544 14.669 5.19733 15 4.225 15C2.949 15 2 14.002 2 12.501Z" fill="#231F20" fill-opacity="0.7"/>
</g>
<g id="&#226;&#140;&#152;/alphabet/S">
<path id="&#226;&#140;&#152;/alphabet/S_2" fill-rule="evenodd" clip-rule="evenodd" d="M7.97277 11.5015C7.97277 11.1331 8.284 11 8.845 11C8.853 11 10 11 10 11V10C10 10 8.894 10 8.86 10C7.778 10 7 10.4592 7 11.45C7 12.3145 7.41956 12.6905 8.47125 12.9161C9.24159 13.0813 9.49616 13.2286 9.49616 13.548C9.49616 13.8674 9.13843 14 8.47125 14C8.45525 14 7.3 14 7.3 14V15C7.3 15 8.46325 15 8.47125 15C10.5 15 10.5 14 10.5 13.548C10.5 12.9161 10.0203 12.4207 9.15869 12.1469C8.29712 11.873 7.97277 11.87 7.97277 11.5015Z" fill="#231F20" fill-opacity="0.7"/>
</g>
<g id="&#226;&#140;&#152;/alphabet/S_3">
<path id="&#226;&#140;&#152;/alphabet/S_4" fill-rule="evenodd" clip-rule="evenodd" d="M11.9728 11.5015C11.9728 11.1331 12.284 11 12.845 11C12.853 11 14 11 14 11V10C14 10 12.894 10 12.86 10C11.778 10 11 10.4592 11 11.45C11 12.3145 11.4196 12.6905 12.4713 12.9161C13.2416 13.0813 13.4962 13.2286 13.4962 13.548C13.4962 13.8674 13.1384 14 12.4713 14C12.4553 14 11.3 14 11.3 14V15C11.3 15 12.4633 15 12.4713 15C14.5 15 14.5 14 14.5 13.548C14.5 12.9161 14.0203 12.4207 13.1587 12.1469C12.2971 11.873 11.9728 11.87 11.9728 11.5015Z" fill="#231F20" fill-opacity="0.7"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<polygon fill="#F4AF3D" fill-opacity=".7" points="1 16 16 16 16 9 1 9"/>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<polygon fill="#F26522" fill-opacity=".7" points="1 16 16 16 16 9 1 9"/>

Before

Width:  |  Height:  |  Size: 498 B

After

Width:  |  Height:  |  Size: 645 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
<path fill="#EDA200" fill-rule="evenodd" d="M16,2 L31,28 L1,28 L16,2 Z M18,25 L18,21 L14,21 L14,25 L18,25 Z M18,18 L18,10 L14,10 L14,18 L18,18 Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 241 B

After

Width:  |  Height:  |  Size: 388 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10 0C8.02219 0 6.08879 0.58649 4.4443 1.6853C2.79981 2.78412 1.51809 4.3459 0.761209 6.17317C0.00433284 8.00043 -0.193701 10.0111 0.192152 11.9509C0.578004 13.8907 1.53041 15.6725 2.92894 17.0711C4.32746 18.4696 6.10929 19.422 8.0491 19.8079C9.98891 20.1937 11.9996 19.9957 13.8268 19.2388C15.6541 18.4819 17.2159 17.2002 18.3147 15.5557C19.4135 13.9112 20 11.9778 20 10C20 7.34784 18.9464 4.8043 17.0711 2.92893C15.1957 1.05357 12.6522 0 10 0ZM10 18.2C8.3782 18.2 6.79281 17.7191 5.44433 16.8181C4.09585 15.917 3.04483 14.6364 2.42419 13.138C1.80355 11.6397 1.64117 9.9909 1.95757 8.40026C2.27396 6.80961 3.05494 5.34852 4.20173 4.20172C5.34852 3.05493 6.80962 2.27396 8.40026 1.95756C9.99091 1.64116 11.6397 1.80355 13.138 2.42419C14.6364 3.04483 15.917 4.09584 16.8181 5.44432C17.7191 6.79281 18.2 8.37819 18.2 10C18.1974 12.174 17.3326 14.2581 15.7954 15.7954C14.2581 17.3326 12.174 18.1974 10 18.2ZM10.9 9.43L14.46 11.09L13.7 12.72L9.10001 10.57V4H10.9V9.43Z" fill="#9AA7B0" fill-opacity="0.8"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="#6E6E6E" fill-rule="evenodd" transform="translate(1 3)">
<rect width="12" height="2" x="1" y="4"/>

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 589 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="#389FD6" fill-rule="evenodd" d="M14.0431479,8.44999981 L14.3048222,13.4430431 L12.574725,11.885269 C11.4741571,13.1817306 9.83248424,14.0044386 7.99865879,14.0044386 C5.03921121,14.0044386 2.58020312,11.8617896 2.08827651,9.04314243 L3.94798986,9.10858763 C4.43427312,10.8903005 6.0642585,12.2000519 8.00015362,12.2000519 C9.30169687,12.2000519 10.4649641,11.6080237 11.2353504,10.6785714 L9.05000019,8.71167959 L14.0431479,8.44999981 Z M7.99865879,2.00443857 C10.9184669,2.00443857 13.3511517,4.09007371 13.888219,6.85284133 L12.0226275,6.7880427 C11.5024638,5.05933714 9.89836709,3.8000774 8.00015362,3.8000774 C6.69883692,3.8000774 5.53574811,4.39189956 4.76535914,5.32107268 L6.95482203,7.29304326 L1.96167436,7.55472304 L1.70000005,2.56167973 L3.42768119,4.11762166 C4.52821742,2.82461451 6.1676575,2.00443857 7.99865879,2.00443857 Z" transform="rotate(3 8.002 8.004)"/>
</svg>

Before

Width:  |  Height:  |  Size: 981 B

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<polygon fill="#59A869" points="13.789 2.09 15.535 3.837 6.292 13.08 1.95 8.738 3.698 6.99 6.293 9.585"/>
</svg>

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 346 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<path fill="#6E6E6E" d="M11,3 L4,3 L4,11 L2,11 L2,1 L11,1 L11,3 Z"/>

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 510 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="#389FD6" fill-rule="evenodd" transform="translate(1)">
<path d="M10.9000003,4.89999992 L14.0999999,4.89999992 L9.9000001,9.09999973 L5.70000029,4.89999992 L8.90000027,4.89999992 L8.90000027,0.899999917 L10.9000003,0.899999917 L10.9000003,4.89999992 Z" transform="rotate(90 9.9 5)"/>

Before

Width:  |  Height:  |  Size: 630 B

After

Width:  |  Height:  |  Size: 777 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<polygon fill="#6E6E6E" points="9 7 12 7 8 11 4 7 7 7 7 2 9 2" transform="matrix(-1 0 0 1 16 0)"/>

Before

Width:  |  Height:  |  Size: 301 B

After

Width:  |  Height:  |  Size: 448 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<polygon fill="#F4AF3D" fill-rule="evenodd" points="7.998 11.522 3.673 14.311 4.989 9.336 1 6.084 6.138 5.798 7.998 1 9.858 5.798 14.996 6.084 11.007 9.336 12.323 14.311"/>
</svg>

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 413 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<rect width="11" height="2" x="2" y="7" fill="#6E6E6E" transform="matrix(-1 0 0 1 15 0)"/>

Before

Width:  |  Height:  |  Size: 484 B

After

Width:  |  Height:  |  Size: 631 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="#161514" fill-rule="evenodd" d="M7.99707713,1 C4.13339149,1 1,4.1329619 1,7.9979363 C1,11.0896581 3.00487223,13.7122732 5.78557461,14.6375989 C6.13568621,14.7020366 6.2632729,14.4859554 6.2632729,14.3003748 C6.2632729,14.1345551 6.25725871,13.6942307 6.25382203,13.1104249 C4.30737333,13.5331364 3.89669027,12.1722117 3.89669027,12.1722117 C3.57836793,11.3637332 3.11957137,11.1485112 3.11957137,11.1485112 C2.48421546,10.7146305 3.16768487,10.7232222 3.16768487,10.7232222 C3.87005601,10.7726245 4.23949893,11.4444951 4.23949893,11.4444951 C4.86368564,12.5137317 5.87750575,12.2048602 6.27616044,12.0257233 C6.33973899,11.5738001 6.52059419,11.2653582 6.72035112,11.0905172 C5.16654292,10.9139579 3.53283195,10.3133983 3.53283195,7.63193005 C3.53283195,6.86812829 3.80561829,6.24308241 4.25324565,5.75421492 C4.1810754,5.57722598 3.9409375,4.86540398 4.32197921,3.90227487 C4.32197921,3.90227487 4.90922163,3.71411673 6.24608951,4.61968148 C6.80412015,4.46417178 7.40296136,4.38684652 7.9979363,4.38383942 C8.59248165,4.38684652 9.19089327,4.46417178 9.74978309,4.61968148 C11.0857918,3.71411673 11.672175,3.90227487 11.672175,3.90227487 C12.0540759,4.86540398 11.813938,5.57722598 11.7421974,5.75421492 C12.1906839,6.24308241 12.4613223,6.86812829 12.4613223,7.63193005 C12.4613223,10.3202717 10.8250338,10.91181 9.26650019,11.0849326 C9.51737771,11.3010138 9.74119139,11.7280211 9.74119139,12.38099 C9.74119139,13.316196 9.7325997,14.0709765 9.7325997,14.3003748 C9.7325997,14.4876738 9.85889763,14.7054733 10.2137347,14.6371693 C12.9922891,13.7096957 14.995443,11.0887989 14.995443,7.9979363 C14.995443,4.1329619 11.8620515,1 7.99707713,1"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="#FFFFFE" fill-rule="evenodd" d="M7.99707713,1 C4.13339149,1 1,4.1329619 1,7.9979363 C1,11.0896581 3.00487223,13.7122732 5.78557461,14.6375989 C6.13568621,14.7020366 6.2632729,14.4859554 6.2632729,14.3003748 C6.2632729,14.1341255 6.25725871,13.6942307 6.25382203,13.1104249 C4.30737333,13.5331364 3.89669027,12.1722117 3.89669027,12.1722117 C3.57836793,11.3637332 3.11957137,11.1485112 3.11957137,11.1485112 C2.48421546,10.7146305 3.16768487,10.7232222 3.16768487,10.7232222 C3.87005601,10.7726245 4.23949893,11.4444951 4.23949893,11.4444951 C4.86368564,12.5137317 5.87750575,12.2048602 6.27616044,12.0257233 C6.33973899,11.5738001 6.52059419,11.2653582 6.72035112,11.0905172 C5.16654292,10.9139579 3.53283195,10.3133983 3.53283195,7.63193005 C3.53283195,6.86812829 3.80561829,6.24308241 4.25324565,5.75421492 C4.1810754,5.57722598 3.9409375,4.86540398 4.32197921,3.90227487 C4.32197921,3.90227487 4.90922163,3.71411673 6.24608951,4.61968148 C6.80412015,4.46417178 7.40296136,4.38684652 7.9979363,4.38383942 C8.59248165,4.38684652 9.19089327,4.46417178 9.74978309,4.61968148 C11.0857918,3.71411673 11.672175,3.90227487 11.672175,3.90227487 C12.0540759,4.86540398 11.813938,5.57722598 11.7421974,5.75421492 C12.1906839,6.24308241 12.4613223,6.86812829 12.4613223,7.63193005 C12.4613223,10.3202717 10.8250338,10.91181 9.26650019,11.0849326 C9.51737771,11.3010138 9.74119139,11.7280211 9.74119139,12.3805604 C9.74119139,13.316196 9.7325997,14.0709765 9.7325997,14.3003748 C9.7325997,14.4876738 9.85889763,14.7054733 10.2137347,14.6371693 C12.9922891,13.7096957 14.995443,11.0887989 14.995443,7.9979363 C14.995443,4.1329619 11.8620515,1 7.99707713,1"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<rect width="12" height="2" x="2" y="3" fill="#6E6E6E"/>

Before

Width:  |  Height:  |  Size: 320 B

After

Width:  |  Height:  |  Size: 467 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="#6E6E6E" d="M6.53206047,5.10906 C6.68535547,4.77581 6.77200047,4.40923501 6.77200047,4.01600001 C6.77200047,2.54303502 5.57896548,1.35000002 4.10600049,1.35000002 C2.63303549,1.35000002 1.4400005,2.54303502 1.4400005,4.01600001 C1.4400005,5.488965 2.63303549,6.68199999 4.10600049,6.68199999 C4.49923548,6.68199999 4.86581048,6.59535499 5.19906048,6.44205999 L6.77200047,8.01499999 L5.19906048,9.58793998 C4.86581048,9.43464498 4.49923548,9.34799998 4.10600049,9.34799998 C2.63303549,9.34799998 1.4400005,10.541035 1.4400005,12.014 C1.4400005,13.486965 2.63303549,14.6799999 4.10600049,14.6799999 C5.57896548,14.6799999 6.77200047,13.486965 6.77200047,12.014 C6.77200047,11.620765 6.68535547,11.25419 6.53206047,10.92094 L8.10500046,9.34799998 L12.7705004,14 L14.7700004,14 L14.7700004,13.347 L6.53206047,5.10906 Z M4.1053342,5.33702364 C3.37236745,5.33702364 2.77266738,4.74383861 2.77266738,4.00402356 C2.77266738,3.26420851 3.37236745,2.67102348 4.1053342,2.67102348 C4.83830096,2.67102348 5.43800103,3.26420851 5.43800103,4.00402356 C5.43800103,4.74383861 4.83830096,5.33702364 4.1053342,5.33702364 Z M4.1053342,13.3350241 C3.37236745,13.3350241 2.77266738,12.7418391 2.77266738,12.0020241 C2.77266738,11.262209 3.37236745,10.669024 4.1053342,10.669024 C4.83830096,10.669024 5.43800103,11.262209 5.43800103,12.0020241 C5.43800103,12.7418391 4.83830096,13.3350241 4.1053342,13.3350241 Z M8.10333468,8.33627383 C7.91676132,8.33627383 7.77016797,8.18964382 7.77016797,8.00302381 C7.77016797,7.8164038 7.91676132,7.66977379 8.10333468,7.66977379 C8.28990803,7.66977379 8.43650138,7.8164038 8.43650138,8.00302381 C8.43650138,8.18964382 8.28990803,8.33627383 8.10333468,8.33627383 Z M12.7710002,2.00452344 L8.77299971,6.00352368 L10.1056665,7.33652377 L14.7700004,2.67102348 L14.7700004,2.00452344 L12.7710002,2.00452344 Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,3 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="#6E6E6E" fill-rule="evenodd" d="M3,1 L3,0 L7,0 L7,1 L10,1 L10,13 L0,13 L0,1 L3,1 Z M4,1 L4,2 L6,2 L6,1 L4,1 Z M2,4 L2,11 L8,11 L8,4 L2,4 Z" transform="translate(3 1)"/>
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="menu-paste">
<g id="paste">
<path id="Shape" fill-rule="evenodd" clip-rule="evenodd" d="M6 2V1H10V2H13V14H3V2H6ZM7 2V3H9V2H7ZM5 5V12H11V5H5Z" fill="#6E6E6E"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 426 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<path fill="#9AA7B0" fill-opacity=".8" d="M1,1 L15,1 L15,14 L1,14 L1,1 Z M2,4 L2,13 L14,13 L14,4 L2,4 Z"/>

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 473 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="#6E6E6E" d="M8.35170965,4.66666667 C6.5846115,4.66666667 4.98422073,5.32666667 3.75058618,6.4 L1.35000002,4 L1.35000002,10 L7.35146542,10 L4.93754267,7.58666667 C5.86443566,6.81333333 7.04472385,6.33333333 8.35170965,6.33333333 C10.712286,6.33333333 12.7194428,7.87333333 13.4196138,10 L14.9999996,9.48 C14.0731067,6.68666667 11.4524668,4.66666667 8.35170965,4.66666667 Z" transform="matrix(-1 0 0 1 16.35 0)"/>
</svg>

Before

Width:  |  Height:  |  Size: 517 B

After

Width:  |  Height:  |  Size: 664 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="#6E6E6E" fill-rule="evenodd" d="M12.5747152,11.8852806 C11.4741474,13.1817355 9.83247882,14.0044386 7.99865879,14.0044386 C5.03907292,14.0044386 2.57997332,11.8615894 2.08820756,9.0427473 L3.94774327,9.10768372 C4.43372186,10.8898575 6.06393114,12.2000519 8.00015362,12.2000519 C9.30149237,12.2000519 10.4645985,11.6082097 11.2349873,10.6790094 L9.05000019,8.71167959 L14.0431479,8.44999981 L14.3048222,13.4430431 L12.5747152,11.8852806 Z M3.42785637,4.11741586 C4.52839138,2.82452748 6.16775464,2.00443857 7.99865879,2.00443857 C10.918604,2.00443857 13.3513802,4.09026967 13.8882946,6.8532307 L12.0226389,6.78808057 C11.5024872,5.05935553 9.89838095,3.8000774 8.00015362,3.8000774 C6.69867367,3.8000774 5.53545628,4.39204806 4.76506921,5.32142241 L6.95482203,7.29304326 L1.96167436,7.55472304 L1.70000005,2.56167973 L3.42785637,4.11741586 Z" transform="rotate(3 8.002 8.004)"/>
</svg>

Before

Width:  |  Height:  |  Size: 984 B

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="#7F8B91" fill-opacity=".9" fill-rule="evenodd" d="M11.038136,9.94904865 L13.9980971,12.9090097 L12.9374369,13.9696699 L9.98176525,11.0139983 C9.14925083,11.6334368 8.11743313,12 7,12 C4.23857625,12 2,9.76142375 2,7 C2,4.23857625 4.23857625,2 7,2 C9.76142375,2 12,4.23857625 12,7 C12,8.1028408 11.642948,9.12228765 11.038136,9.94904865 Z M7,11 C9.209139,11 11,9.209139 11,7 C11,4.790861 9.209139,3 7,3 C4.790861,3 3,4.790861 3,7 C3,9.209139 4.790861,11 7,11 Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 567 B

After

Width:  |  Height:  |  Size: 714 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="#6E6E6E" d="M8,3 C4.81818182,3 2.10090909,5.07333333 1,8 C2.10090909,10.9266667 4.81818182,13 8,13 C11.1818182,13 13.8990909,10.9266667 15,8 C13.8990909,5.07333333 11.1818182,3 8,3 Z M8,11.5 C6.068,11.5 4.5,9.932 4.5,8 C4.5,6.068 6.068,4.5 8,4.5 C9.932,4.5 11.5,6.068 11.5,8 C11.5,9.932 9.932,11.5 8,11.5 Z M8,6 C6.89333333,6 6,6.89333333 6,8 C6,9.10666667 6.89333333,10 8,10 C9.10666667,10 10,9.10666667 10,8 C10,6.89333333 9.10666667,6 8,6 Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 552 B

After

Width:  |  Height:  |  Size: 699 B

View File

@@ -1,3 +1,4 @@
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="#6E6E6E" d="M8.00170962,4.66666667 C6.23461148,4.66666667 4.63422071,5.32666667 3.40058616,6.4 L1,4 L1,10 L7.00146539,10 L4.58754265,7.58666667 C5.51443563,6.81333333 6.69472383,6.33333333 8.00170962,6.33333333 C10.362286,6.33333333 12.3694428,7.87333333 13.0696137,10 L14.6499996,9.48 C13.7231066,6.68666667 11.1024667,4.66666667 8.00170962,4.66666667 Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 463 B

After

Width:  |  Height:  |  Size: 610 B

View File

@@ -1 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><rect id="frame" width="16" height="16" fill="none"/><path d="M11.6 8.5c1.104 0 1.992-.88 1.992-1.964 0-1.085-.888-1.965-1.992-1.965s-2 .88-2 1.965c0 1.084.896 1.964 2 1.964zm-6-.786c1.328 0 2.392-1.053 2.392-2.357C7.992 4.053 6.928 3 5.6 3 4.272 3 3.2 4.053 3.2 5.357c0 1.304 1.072 2.357 2.4 2.357zm6 2.357c-1.464 0-4.4.723-4.4 2.161V14H16v-1.768c0-1.438-2.936-2.16-4.4-2.16zm-6-.785c-1.864 0-5.6.919-5.6 2.75V14h5.6v-1.768c0-.668.264-1.838 1.896-2.726-.696-.142-1.368-.22-1.896-.22z" fill="#6E6E6E"/></svg>
<!-- Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.6 8.5C12.704 8.5 13.592 7.62 13.592 6.53571C13.592 5.45143 12.704 4.57143 11.6 4.57143C10.496 4.57143 9.6 5.45143 9.6 6.53571C9.6 7.62 10.496 8.5 11.6 8.5ZM5.6 7.71429C6.928 7.71429 7.992 6.66143 7.992 5.35714C7.992 4.05286 6.928 3 5.6 3C4.272 3 3.2 4.05286 3.2 5.35714C3.2 6.66143 4.272 7.71429 5.6 7.71429ZM11.6 10.0714C10.136 10.0714 7.2 10.7943 7.2 12.2321V14H16V12.2321C16 10.7943 13.064 10.0714 11.6 10.0714ZM5.6 9.28571C3.736 9.28571 0 10.205 0 12.0357V14H5.6V12.2321C5.6 11.5643 5.864 10.3936 7.496 9.50571C6.8 9.36429 6.128 9.28571 5.6 9.28571Z" fill="#6E6E6E"/>
</svg>

Before

Width:  |  Height:  |  Size: 603 B

After

Width:  |  Height:  |  Size: 835 B

View File

@@ -19,6 +19,7 @@ package com.formdev.flatlaf.extras;
import java.awt.AlphaComposite;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Toolkit;
import java.awt.Window;
import java.awt.image.VolatileImage;
import java.util.Map;
@@ -51,9 +52,9 @@ public class FlatAnimatedLafChange
public static int duration = 160;
/**
* The resolution of the animation in milliseconds. Default is 40 ms.
* The resolution of the animation in milliseconds. Default is 30 ms.
*/
public static int resolution = 40;
public static int resolution = 30;
private static Animator animator;
private static final Map<JLayeredPane, JComponent> oldUIsnapshots = new WeakHashMap<>();
@@ -158,6 +159,8 @@ public class FlatAnimatedLafChange
if( e.getKey().isShowing() )
e.getValue().repaint();
}
Toolkit.getDefaultToolkit().sync();
}, () -> {
hideSnapshot();
animator = null;

View File

@@ -700,16 +700,16 @@ public class FlatUIDefaultsInspector
if( value instanceof Color ) {
Color color = (info instanceof Color[]) ? ((Color[])info)[0] : (Color) value;
HSLColor hslColor = new HSLColor( color );
int hue = Math.round( hslColor.getHue() );
int saturation = Math.round( hslColor.getSaturation() );
int luminance = Math.round( hslColor.getLuminance() );
if( color.getAlpha() == 255 ) {
return String.format( "%-9s HSL %3d %3d %3d",
color2hex( color ),
(int) hslColor.getHue(), (int) hslColor.getSaturation(),
(int) hslColor.getLuminance() );
color2hex( color ), hue, saturation, luminance );
} else {
int alpha = Math.round( hslColor.getAlpha() * 100 );
return String.format( "%-9s HSL %3d %3d %3d %2d",
color2hex( color ),
(int) hslColor.getHue(), (int) hslColor.getSaturation(),
(int) hslColor.getLuminance(), (int) (hslColor.getAlpha() * 100) );
color2hex( color ), hue, saturation, luminance, alpha );
}
} else if( value instanceof Insets ) {
Insets insets = (Insets) value;

View File

@@ -39,14 +39,6 @@ public class FlatArcDarkIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatArcDarkIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatArcDarkOrangeIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatArcDarkOrangeIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatArcIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatArcIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatArcOrangeIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatArcOrangeIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatCarbonIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatCarbonIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatCobalt2IJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatCobalt2IJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatCyanLightIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatCyanLightIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatDarkFlatIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatDarkFlatIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatDarkPurpleIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatDarkPurpleIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatDraculaIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatDraculaIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatGradiantoDarkFuchsiaIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGradiantoDarkFuchsiaIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatGradiantoDeepOceanIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGradiantoDeepOceanIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatGradiantoMidnightBlueIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGradiantoMidnightBlueIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatGradiantoNatureGreenIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGradiantoNatureGreenIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatGrayIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGrayIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatGruvboxDarkHardIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGruvboxDarkHardIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatGruvboxDarkMediumIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGruvboxDarkMediumIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatGruvboxDarkSoftIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGruvboxDarkSoftIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatHiberbeeDarkIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatHiberbeeDarkIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatHighContrastIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatHighContrastIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatLightFlatIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatLightFlatIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatMaterialDesignDarkIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMaterialDesignDarkIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatMonocaiIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMonocaiIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatNordIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatNordIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatOneDarkIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatOneDarkIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatSolarizedDarkIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatSolarizedDarkIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatSolarizedLightIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatSolarizedLightIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatSpacegrayIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatSpacegrayIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatVuesionIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatVuesionIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatArcDarkContrastIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatArcDarkContrastIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatArcDarkIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatArcDarkIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatAtomOneDarkContrastIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatAtomOneDarkContrastIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatAtomOneDarkIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatAtomOneDarkIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatAtomOneLightContrastIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatAtomOneLightContrastIJTheme.class );
}

View File

@@ -39,14 +39,6 @@ public class FlatAtomOneLightIJTheme
}
}
/**
* @deprecated use {@link #setup()} instead; this method will be removed in a future version
*/
@Deprecated
public static boolean install() {
return setup();
}
public static void installLafInfo() {
installLafInfo( NAME, FlatAtomOneLightIJTheme.class );
}

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