Support for Modules, Windows 11 and more
Version 3.0.0
enables proper module support by providing a module-info.java
for each module.
Note that this release brings some breaking changes as packages have been moved to resolve issues with split packages:
- In
darklaf-property-loader
the top level package is nowcom.github.weisj.darklaf.properties
. In particular this affectsPropertyLoader
,IconLoader
and the various (svg)icon classes. com.github.weisj.darklaf.color.DarkColorModel*
indarklaf-utils
has been moved tocom.github.weisj.darklaf.color
indarklaf-property-loader
- Most functions which return/receive an
IconLoader
now returnIconResolver
instead. com.github.weisj.darklaf.color.ColorUtil
indarklaf-utils
has been moved tocom.github.weisj.darklaf.util
com.github.weisj.darklaf.util
indarklaf-core
has been moved tocom.github.weisj.darklaf.ui.util
com.github.weisj.darklaf.platform
indarklaf-native-util
has been renamed tocom.github.weisj.darklaf.nativeutil
- All icons have moved into the
darklaf-iconset
project. If you need to use them you can depend ondarklaf-iconset
and use theIconSet.ICON_LOADER
to retrieve them.
New modules
darklaf-iconset
Provides a set of icons optimized for darklaf. They can also be used with other LaFs without any further setup. If you wish to customize the colors used for the icons you have to provide the colors defined in https://github.com/weisJ/darklaf/blob/master/theme/src/main/resources/com/github/weisj/darklaf/theme/icon_presets/light_icons.properties through the UIDefaults
in UIManager
.
Icons can be conveniently accessed through the AllIcons
class.
darklaf-platform-preferences
A module which exposed the native theme detection mechanism as a standalone dependency. It can be used without having to use darklaf itself. Simply create a new SystemPreferencesManager
and start listening for changes to the OS theme.
darklaf-platform-decorations
A module which exposed the native decorations feature of darklaf as a standalone dependency. It should be compatible with almost all other laf implementations (mileage may vary). The responsible class is ExternalLafDecorator
. By default the implementation tries to derive sensible colors based on other LaF properties. If you want to customize the appearance of the titlebar you can do so by providing a DecorationsColorProvider
.
See the discussion in #316 for more informations and use cases.
Contributions
- Corrected spanish translations #270 by @Z3R0x24
- Updated gradle wrapper script. #296 by @ThexXTURBOXx
- Corrected and extended Chinese/Japanese translations #299 by @Xujiayao
- Fixed incorrect background during resizing #307 by @anticleiades
- Corrected italian translations #308 by @anticleiades
Visual changes
- An
JInternalPane
outside of aJDesktopPane
no longer has a shadow. 4537a68 - Improved rendering of
JSpinner
andJComboBox
inside a popup menu. 84fceaf - The "smaller" and "larger" text in the
ThemeSettings
are now represented by apropriate icons. #269 c6a3637 - On Windows 11 rounded scrollbars will be used by default. 4c28099
- Updated window button icons on Windows 11 to match the native look. 7197d08
- The border radius of tooltips has been increased on macOS and Windows 11. 212b006
- #306 On macOS and Windows 11 root panes no longer have borders by default, because they look out of place. 3180dfb
Behavioural changes
- A
JPopupMenu
which has no menu items will no longer be displayed. b72f069 - Improved resizing behaviour on Windwos which custom decorations enabled. c190762 8539c5e
- Support for snap layouts on Windows 11 (Still has some caveats #311).
API Changes
- Colors now need to be declared using a
#
in a.properties
file when loaded throughPropertyLoader
. (Not using#
was deprecated before). 1f6eb6e - Fallback value declarations in svg icons nowuse a
%
prefix instead of#
. c43cbbc FileTree
and corresponding classes have been removed (were deprecated before). 425289e- Boolean client properties defined by the theme can now be overwritten. 48b5630
- The
Animator
class API has been overhauled to be friendlier to use. 56dcca7 - Added
PanelPopup#addButton
to easily add a button the the title bar of aJTrabFrame
tab. - Added
ScrollBarConstants.KEY_BACKGROUND_PAINTER
property to provide the means to paint behind a scrollbar e.g. for search highlighting. The value has to be of typeSizedPainter<JScrollBar>
. See https://github.com/weisJ/darklaf/blob/d7d08139ab6d56a11d0c9a3c61ed73e0d1564510/core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayRSyntaxScrollPane.java for an example. e9a3502 - Added
FontPrototpye
toTheme
to specify a prototype font which all default fonts will be based off of. See #303 for more information. This can also be changed through theThemeSettings
class.
Other changes
- Prevent recursive laf installation. 8f8194e
- The
IconLoader
will now release resources if the loaded icon is no longer used anywhere. 126670c - The backing implementation for svg icons has been moved to JSVG. Previously svgSalamander has been used. This improves the performance for icons which frequently change color values during runtime.
- Improved code-singing experience on macOS.
- Improved compatibility on macOS arm.
Addressed issues
- Possible
ConcurrentModificationException
while theme events are dispatched. a9ae43f 85e556f - Incorrect selection foreground color in OneDark theme. e3a855c
- #259 Arrow of disabled menu doesn't look disabled. e68f78e
- #260 Disabled menu doesn't get painted with disabled text. 45abd4a
- Adding the menu bar to a different component when the unified menu bar is enabled (Windows only) it becomes invisible. 7369248
JInternalFrame
outside ofJDesktopPane
always appears selected. e48f23d- #314 NPE when using
ScrollPopupMenu
. d99c8a2 - Table may use incorrect cell editor. 42d9476
- Tooltip shadow is sometimes painted more than once resulting in a darker shadow. 7d6a354
- With custom decorations enabled popups can be resized on Windows when they shouldn't. 812bf63
- #275 NPE when uninstalling and a tree is currently being collapsed/expanded. c7ddc1d
- #274 Black tooltip shadow on Linux and Java 8. 4904d3c
- #268 System settings are overwritten by settings of
ThemeSettings
dialog. 32158fe - #289 Missing translations when using Java >= 9. e9625ce
- Window bounds might change when installing/uninstalling decorations on macOS. 378b6f1 af82ec0
- #298 Tooltips may show an incorrect background color. ff44d37 2ef0cb7
- The
ThemeSettings
dialog doesn't reliably respond to changes in locale. 34f3815 - Custom title bar on Windows uses incorrect font. 3639369
- Combo box uses incorrect background color in some focus/selection combinations. f9e35e6
A big thank you to everyone who contributed, reported bug or requested features!