Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark Theme #54

Sciss opened this issue Oct 28, 2013 · 8 comments

Dark Theme #54

Sciss opened this issue Oct 28, 2013 · 8 comments


Copy link

@Sciss Sciss commented Oct 28, 2013

I am still having this idea that there could be a dark theme. It doesn't have to be a completely different design like futurico. For example, a first straight forward approximation could be to just invert the brightness of all colors. (I have just inverted RGB and rotated the hue afterwards):


What do you think? Is this easy to accomplish? A better variant would also make sure gradient orientations are maintained (e.g. if going from lighter to darker top to bottom, it should remain that way)

@ghost ghost assigned mgarin Oct 28, 2013
Copy link

@mgarin mgarin commented Oct 28, 2013

Its not as easy to do as it seems to be and it will be a waste of time to make it right now when WebLaF is not yet ready for such modifications. I will be adding dark theme as soon as StyleManager is done and released.

Copy link

@mgarin mgarin commented Oct 29, 2013

With StyleManager i will be able to create custom theme within day or two, so dark theme will be first released as an example of StyleManager usage.

Copy link
Contributor Author

@Sciss Sciss commented Oct 29, 2013

Cool! Just wanted to know if this is somewhere on the radar! Keep up the great work.

@mgarin mgarin removed this from the StyleManager release milestone Sep 30, 2014
@Sciss Sciss removed this from the StyleManager release milestone Sep 30, 2014
Copy link

@stephram stephram commented Jan 27, 2015

Your screenshot above looks quite good in my opinion. How did you do that? I tried the same thing - inverting the colors I found by calling LookAndFeel.getDefaults(), but it didn't work. Presumably because that's not the correct place to set them for WebLaf.

Copy link
Contributor Author

@Sciss Sciss commented Jan 27, 2015

Just Photoshop/Gimp. It's inverting RGB and then rotating hue 180 degrees, so blues stay blue etc. It's not perfect, just an approximation of how I imagine it could work.

@mgarin mgarin added this to the v2.0 milestone Mar 18, 2015
@mgarin mgarin modified the milestones: v1.29, v2.0, v1.30 Jun 9, 2015
@mgarin mgarin added the skin label Oct 21, 2015
@mgarin mgarin modified the milestones: v1.29, v1.3.0 Mar 1, 2016
mgarin added a commit that referenced this issue Dec 11, 2017
All three main tree models undergone a major rework to fix multiple issues with filtering, nodes addition and removal. Also added some general performance improvements related to multiple nodes insertion and removal. Along with these improvements I've added some improvements for `InterfaceTree` which should now properly function at all times and should keep its model in sync with tracked component tree.

- - Enhanced performance for multiple nodes insertion and removal
-, - Adjusted to support new `WebTreeModel` multiple nodes removal method implementations
-,,,, - Simplified sorting/filtering method names
-,,, - Simplified node removal methods

- - Method `isLeaf` removed as redundant, simply return empty children instead
- - Simplified data loading and nodes caching which had redundant complexity due to copy-paste from `AsyncTreeModel`
- - Added extra cache map for storing parent identifiers for child nodes so we can locate them even if model is currently filtered
- - Added performance improvements to avoid calling multiple visual updates when it is not necessary
- - Removed redundant parent check on node removal, parent might be `null` when filtering is applied to the tree so we can't count on it
- - Method `isLea` removed as redundant

- - Added minor fixes for a few internal caching issues

- - Method `isLeaf` removed as redundant, slightly refactored `getChildren` method
- - Removed state save/restore upon nodes addition and removal to avoid performance issues
- - Now stores `InterfaceTree` reference for usage convenience
- - Component is not nullified on node removal anymore but it shouldn't cause memory leaks when used properly

- - Added default parameter definitions
- collapsiblepane.xml - Removed default settings from style to avoid resetting them on skin change
- skin.xml, collapsiblepane.xml - Added dark style for `WebCollapsiblePane` [ #54 ]

- - Fixed menu items text for cases when raw text instead of translation is used

- - Simplified example code, added translation, fixed title pane orientation loss on skin change
-, - Method `isLeaf` removed as redundant

- - Added method to convert `Collection` into `Object[]` and updated JavaDoc

- Multiple small JavaDoc additions
mgarin added a commit that referenced this issue Dec 19, 2017
Split pane internal code have gone through a complete rework, so split pane now fully supports styling for all of its parts. Due to multiple limitations of `BasicSplitPaneUI` WebLaF now features its own basic UI in form of `WSplitPaneUI`. Also Swing divider component implementation was based on AWT `Component` which did not allow attaching WebLaF styling to it, so `BasicSplitPaneDivider` was also replaced with new `WebSplitPaneDivider` component (based on `JComponent`) which is fully supported by new styling system.

SplitPane [ #476 ]
- - Now fully replaces `BasicSplitPaneUI` and has a few optimizations and adjustments
- - Added non-continuous divider placement adjustment according to decoration border insets
- - Now features a separate listener that updates divider visibility depending on the split pane sides availability
- - New class containing basic listeners from `BasicSplitPaneUI` for `WSplitPaneUI`
- - New basic layout for `WSplitPaneUI`
- - Optimized for new basic `WSplitPaneUI` usage, removed some redundant code parts
- - New divider component that replaces `BasicSplitPaneDivider` and utilizes styling system
- ComponentType.xsd - Added new divider component type constant
-, - Added `JSplitPane` orientation -based states for styling convenience
- splitpanedivider.xml, - New styling for `JSplitPane` divider component
- splitpane.xml - Added `non-opaque`, `transparent`, `decorated` and `focusable` styles

- - Reworked to separate instances of `Action` class for each of supported actions
- - Replaced `LazyActionMap` with `UIActionMap` usage, it will slightly affect memory but improve code a lot
- - Simplified `WButtonListener` usage

- scrollpane.xml - Added `undecorated-buttonless` style to cover some additional use cases
- scrollbar.xml - Adjusted margin setting for `buttonless` style

-, colorchooser.xml - Now uses a separate style identifier for `WebColorChooserPanel`
- - Added constructors to allow providing custom style identifiers
- colorchooserpanel.xml - Separate style file for `WebColorChooserPanel`
- colorchooser.xml - Added separate dark style [ #54 ]

- - States list now always exists for override convenience
- - Returns a copy of states for method override convenience
- - Added methods to add/remove `Collection` of states
- - Updated JavaDoc

- - Enhanced full-line nodes selection on mouse events
- - Now shows root handles by default

- - Added install and uninstall methods to allow appropriate listeners handling
- - Added some missing EDT checks
-, - Added separate `StyleData` install and uninstall calls for skin installation and uninstallation

- - Separated `install` and `uninstall` methods into smaller pieces for override convenience
- - Fixed issue with border not being initialized properly when based on specific decoration state
- Updated all painters related to `AbstractPainter` to use newly added methods instead of overriding `install` and `uninstall`

- - Added `one-touch` state and missing JavaDocs
-,, - Updated identifiers to be unique and replaceable
- - New `IContentLayout` implementation that copies `AlignLayout` behavior for contents
- AlignLayout.xsd, IContent.xsd - New XSD for `AlignLayout` class
-,,, - Minor JavaDoc updates
- - Added default values for settings for convenience

- - Added better `toString` implementation

- - Fixed non-strict lists equality check for cases with duplicate entries in first list
- - Added method to remove `Collection` of elements from another `Collection`
- - Added method to sort `List` of elements using any `Comparator`
- - Renamed multiple methods for usage convenience
- - Simplified method names for convenient, refactored code, updated JavaDoc
- - Added color caching for methods with predictable outcome to optimize memory usage
- - Slightly refactored code, removed unnecessary variables
-, - Added `Locale.ROOT` usage to `toLowerCase` methods
-, - Removed `ValuesTable` as deprecated and redundant feature
-, - Removed `DoubleMap` as deprecated and redundant feature
-, - Replaced `IndexedSupplier` with simple `Function` usage
- - Separated from `LafUtils`, will be revamped later on
- - Made serializable for convenience
- - Cleared from deprecated methods

- - New custom `Action` for usage within `ActionMap`s in UI classes, unlike `sun.swing.UIAction` it is not designed to be used globally
- - New custom `ActionMap` for usage in UI classes instead of `LazyActionMap`
- - Slightly updated code, marked as deprecated, added information on why usage will be halted in later updates
- - Added small default divider size value to ensure it can size properly based on its style size

-, - Replaced alpha background painting with `AlphaLayerBackground` usage
- ninepatcheditor.xml - Added dark style, removed unnecessary default settings [ #54 ]

-, demo-language.xml, jsplitpane.png - Added `JSplitPane` examples
- - Added extra style example
- - Adjusted example scroll pane to look better
- - Minor code refactoring
Copy link

@mgarin mgarin commented Jul 23, 2018

There are only a few more things missing from dark skin at this point which yet to be supported by the new styling system. As soon as those things are added - I will be closing this issue and dark skin will officially be a fully supported default skin.

Copy link

@Endogen Endogen commented Jul 23, 2018

Nice one!

Copy link

@mgarin mgarin commented Aug 5, 2019

Light and Dark themes (WebSkin and DarkSkin) have been released in v1.2.9 update:
More default skins will become available with future updates.

@mgarin mgarin closed this Aug 5, 2019
@mgarin mgarin moved this from In progress to Completed in v1.2.9 Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.