Viewing entries tagged with 'HiDPI'

FlatLaf 2.4

Highlights

This release brings some usability improvements to the window title bar used in FlatLaf window decorations. This affects only Windows 10/11.

Window resizing

There are now additional areas at top of embedded menu bar to resize the window. This makes it easier to resize small frames with lot of menus.

Minimum window title width for moving window

The window title now has a minimum width, which avoids that it is completely hidden in small frames with menus. The window title is important because it is needed to move the window. Without any window title, you can move the window only via the small area around the window icon.

Buttons shrink if space is rare

The width of iconify/maximize/close buttons is reduced if space is rare, to give more space to embedded menu bar and title.

Show app icon beside title

There is a new option to show window icon beside window title, if menu bar is embedded or title is centered.

Change log

See https://github.com/JFormDesigner/FlatLaf/releases/tag/2.4

FlatLaf 2.3

Highlights

macOS improvements in FlatLaf Demo

The FlatLaf Demo now demonstrates how to use the "full window content" feature on macOS to extend the content into the window title bar:

This is the old FlatLaf Demo without "full window content":

And here is a guide to use this in own applications.

File chooser shortcuts panel

This release adds a shortcuts panel to the left side of all file choosers (class JFileChooser):

On Windows, the content of the shortcuts panel is the same as in the Java Windows L&F. On macOS and Linux the shortcuts panel is empty and hidden. However you can customize the content. See PR #522

Change log

See https://github.com/JFormDesigner/FlatLaf/releases/tag/2.3

FlatLaf 2.1

Highlights

Submenu usability

This release significantly improves the usability of submenus. It makes it much easier to move the mouse into a submenu without the risk that the submenu is hidden.

Previously, you have to move the mouse on the red path, otherwise the submenu will be hidden. Now, you can move the mouse on the green path, over other menu items.

Menu Scrolling

Large menus are now scrollable using mouse wheel or scroll arrows:

Change log

See https://github.com/JFormDesigner/FlatLaf/releases/tag/2.1

FlatLaf 2

Highlights

  • Styling individual components using string in CSS syntax (see PR #341 and #388)
  • Typography
  • 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)

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

See https://github.com/JFormDesigner/FlatLaf/releases/tag/2.0

FlatLaf 1.1

This release comes with fantastic news for Windows 10 users/developers.

Native window decorations on Windows 10

This enables dark frame/dialog title bar and embedded menu bar with all JREs while still having:

  • native Window 10 border drop shadows
  • native Window 10 resize functionality
  • Windows 10 snapping functionality
  • native Windows 10 system window menu when right-clicking on title bar or left-clicking on application icon

This feature is enabled by default on Windows 10.

If you don't like/want it, you can disable it with:

UIManager.put( "TitlePane.useWindowDecorations", false );

It is also possible to disable only the embedded menu bar (and keep the dark title pane) with:

UIManager.put( "TitlePane.menuBarEmbedded", false );

It is also possible to disable this on command line with following VM options:

-Dflatlaf.useWindowDecorations=false
-Dflatlaf.menuBarEmbedded=false

If you have following code in your app, you can remove it (no longer necessary):

// enable window decorations
JFrame.setDefaultLookAndFeelDecorated( true );
JDialog.setDefaultLookAndFeelDecorated( true );

Right aligned components in title pane with embedded menu bar on Windows 10

A usual way to add a component to the right side of the menu bar is to first add a horizontal glue component (Box.createHorizontalGlue()) and then the own component. In a non-embedded menu bar it looks like this:

This now also works for embedded menu bars:

Example for adding own component to right side of menu bar:

JButton myButton = new JButton();
myButton.setIcon( new FlatSVGIcon( "myicon.svg" ) );
myButton.putClientProperty( "JButton.buttonType", "toolBarButton" );
myButton.setFocusable( false );
myMenuBar.add( Box.createHorizontalGlue() );
myMenuBar.add( myButton );

Unified backgrounds on Windows 10

To give your app an even more modern look, you can now use unified backgrounds for window title bar, menu bar and main content. This is similar to what IntelliJ IDEA does.

Enable with:

UIManager.put( "TitlePane.unifiedBackground", true );

You can try this in the FlatLafDemo app with "Options > Unified Title Bar".

Change log

See https://github.com/JFormDesigner/FlatLaf/releases/tag/1.1