github JFormDesigner/FlatLaf 2.0-rc1

latest releases: 3.5.2, 3.5.1, 3.5...
2 years ago

Highlights

  • Styling individual components using string in CSS syntax (see PR #341 and #388)
  • Typography (see PR #396)
  • Unified backgrounds for window title bar is now enabled by default (Windows 10/11 only)
  • Support Windows 11 snap layouts menu (see #397)
  • TextField: support leading and trailing components and icons (see PR #386 and #378)
  • Reworked core themes to make it easier to create new themes (see PR #390)
  • Easier changing accent color (see PR #375)
  • CheckBox and RadioButton improvements (see PR #414)

grafik

Incompatibilities

If you're using own FlatLaf properties files, then you may be affected by some incompatible changes.
See PR #390 and #414.

Change Log

New features and improvements

  • Styling:
    • Styling individual components using string in CSS syntax or java.util.Map. (PR #341)
      E.g.: mySlider.putClientProperty( "FlatLaf.style", "trackWidth: 2" );
    • Style classes allow defining style rules at a single place (in UI defaults)
      and use them in any component. (PR #388)
      E.g.: mySlider.putClientProperty( "FlatLaf.styleClass", "myclass" );
  • Typography defines several font styles for headers and various text sizes,
    which makes it easy to use consistent font styles across the application. (PR #396)
  • Native window decorations (Windows 10/11 only):
    • Unified backgrounds for window title bar is now enabled by default (window
      title bar has now same background color as window content). Bottom separator
      for menu bars is no longer painted (if unified background is enabled).
    • Show Windows 11 snap layouts menu when hovering the mouse over the maximize
      button. (issues #397 and #407)
    • Possibility to hide window title bar icon (for single window set client
      property JRootPane.titleBarShowIcon to false; for all windows set UI
      value TitlePane.showIcon to false).
    • OptionPane: Hide window title bar icon by default. Can be be made visibly by
      setting UI default OptionPane.showIcon to true. (issue #416)
    • No longer show the Java "duke/cup" icon if no window icon image is set. (issue #416)
  • TextField, FormattedTextField and PasswordField:
    • Support leading and trailing icons (set client property
      JTextField.leadingIcon or JTextField.trailingIcon to a
      javax.swing.Icon). (PR #378; issue #368)
    • Support leading and trailing components (set client property
      JTextField.leadingComponent or JTextField.trailingComponent to a
      java.awt.Component). (PR #386)
    • Support "clear" (or "cancel") button to empty text field. Only shown if text
      field is not empty, editable and enabled. (set client property
      JTextField.showClearButton to true). (PR #442)
  • PasswordField: Support reveal (or "eye") button to show password. (see UI
    value PasswordField.showRevealButton) (PR #442; issue #173)
  • TextComponents: Double/triple-click-and-drag now extends selection by whole words/lines.
  • Theming improvements: Reworks core themes to make it easier to create new
    themes (e.g. reduced explicit colors by using color functions). Note:
    There are minor incompatible changes in FlatLaf properties files. (PR #390)
  • ToolBar:
    • Toolbars are no longer floatable by default (dots on left side of toolbar
      that allows dragging toolbar). Use UIManager.put( "ToolBar.floatable", true )
      if you want the old behavior.
    • Skip components with empty input map (e.g. JLabel) when using arrow keys
      to navigate in focusable buttons (if UI value ToolBar.focusableButtons is true).
    • Support arrow-keys-only navigation within focusable buttons of toolbar (if
      UI value ToolBar.focusableButtons is true):
      • arrow keys move focus within toolbar
      • tab-key moves focus out of toolbar
      • if moving focus into the toolbar, focus recently focused toolbar button
  • ComboBox, Spinner, TextField and subclasses: Support specifying width of
    border (see UI value Component.borderWidth).
  • CheckBox and RadioButton:
    • Made selected icon better recognizable in FlatLaf Light (use blue
      border), Dark and Darcula (use lighter border) themes. IntelliJ
      theme is not changed.
    • Support specifying width of icon border (see UI value
      CheckBox.icon.borderWidth).
    • Reworked icon UI defaults and added missing ones. Note: There are minor
      incompatible changes in FlatLaf properties files.
  • Slider: Support specifying width of thumb border (see UI value Slider.thumbBorderWidth).
  • TabbedPane: Optionally paint selected tab as card. (PR #343)
  • MenuItem:
    • Paint the selected icon when the item is selected. (PR #415)
    • Vertically align text if icons have different widths. (issue #437)
  • Panel: Support painting background with rounded corners. (issue #367)
  • Added more color functions to class ColorFunctions for easy use in
    applications: lighten(), darken(), saturate(), desaturate(), spin(),
    tint(), shade() and luma().
  • Support defining fonts in FlatLaf properties files. (issue #384)
  • Added method FlatLaf.registerCustomDefaultsSource(URL packageUrl) for JPMS. (issue #325)
  • Extras:
    • Added class FlatDesktop for easy integration into macOS screen menu
      (About, Preferences and Quit) when using Java 8.
    • FlatSVGIcon: Support loading SVG from URL (for JPMS), URI, File or
      InputStream. (issues #419 and #325)
    • FlatSVGUtils: Support loading SVG from URL (for JPMS). (issue #325)
  • SwingX:
    • New "column control" icon for JXTable that scales and uses antialiasing. (issue #434)

Fixed bugs

  • Native window decorations: Fixed UnsatisfiedLinkError on Windows 11 for ARM
    processors. (issue #443)
  • MenuBar: Do not fill background if non-opaque and having custom background
    color. (issue #409)
  • InternalFrame: Fill background to avoid that parent may shine through internal
    frame if it contains non-opaque components. (better fix for issue #274)
  • SwingX: Fixed NullPointerException in FlatCaret when using
    org.jdesktop.swingx.prompt.PromptSupport.setPrompt() on a text field and
    then switching theme.

Don't miss a new FlatLaf release

NewReleases is sending notifications on new releases.