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

Open
Sciss opened this Issue Oct 28, 2013 · 7 comments

Comments

4 participants
@Sciss
Contributor

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):

weblafdark

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

@mgarin

This comment has been minimized.

Show comment
Hide comment
@mgarin

mgarin Oct 28, 2013

Owner

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.

Owner

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.

@mgarin

This comment has been minimized.

Show comment
Hide comment
@mgarin

mgarin Oct 29, 2013

Owner

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.

Owner

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.

@Sciss

This comment has been minimized.

Show comment
Hide comment
@Sciss

Sciss Oct 29, 2013

Contributor

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

Contributor

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

@stephram

This comment has been minimized.

Show comment
Hide comment
@stephram

stephram 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.

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.

@Sciss

This comment has been minimized.

Show comment
Hide comment
@Sciss

Sciss Jan 27, 2015

Contributor

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.

Contributor

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

Major tree models update
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.

Trees
- WebTreeModel.java - Enhanced performance for multiple nodes insertion and removal
- AsyncTreeModel.java, ExTreeModel.java - Adjusted to support new `WebTreeModel` multiple nodes removal method implementations
- ExTreeModel.java, WebExTree.java, WebExCheckBoxTree.java, AsyncTreeModel.java, WebAsyncTree.java - Simplified sorting/filtering method names
- WebExTree.java, WebExCheckBoxTree.java, WebAsyncTree.java, WebFileTree.java - Simplified node removal methods

ExTree
- ExTreeDataProvider.java - Method `isLeaf` removed as redundant, simply return empty children instead
- ExTreeModel.java - Simplified data loading and nodes caching which had redundant complexity due to copy-paste from `AsyncTreeModel`
- ExTreeModel.java - Added extra cache map for storing parent identifiers for child nodes so we can locate them even if model is currently filtered
- ExTreeModel.java - Added performance improvements to avoid calling multiple visual updates when it is not necessary
- WebExTree.java - 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
- SampleExDataProvider.java - Method `isLea` removed as redundant

AsyncTree
- AsyncTreeModel.java - Added minor fixes for a few internal caching issues

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

CollapsiblePane
- WebCollapsiblePane.java - 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 ]

MenuGenerator
- AbstractMenuGenerator.java - Fixed menu items text for cases when raw text instead of translation is used

DemoApplication
- WebCollapsiblePaneExample.java - Simplified example code, added translation, fixed title pane orientation loss on skin change
- ExamplesTreeDataProvider.java, WebExTreeExample.java - Method `isLeaf` removed as redundant

Utilities
- CollectionUtils.java - Added method to convert `Collection` into `Object[]` and updated JavaDoc

General
- Multiple small JavaDoc additions

mgarin added a commit that referenced this issue Dec 19, 2017

Major `JSplitPane` update
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 ]
- WSplitPaneUI.java - Now fully replaces `BasicSplitPaneUI` and has a few optimizations and adjustments
- WSplitPaneUI.java - Added non-continuous divider placement adjustment according to decoration border insets
- WSplitPaneUI.java - Now features a separate listener that updates divider visibility depending on the split pane sides availability
- WSplitPaneListener.java - New class containing basic listeners from `BasicSplitPaneUI` for `WSplitPaneUI`
- SplitPaneLayout.java - New basic layout for `WSplitPaneUI`
- WebSplitPaneUI.java - Optimized for new basic `WSplitPaneUI` usage, removed some redundant code parts
- WebSplitPaneDivider.java - New divider component that replaces `BasicSplitPaneDivider` and utilizes styling system
- ComponentType.xsd - Added new divider component type constant
- SplitPanePainter.java, SplitPaneDividerPainter.java - Added `JSplitPane` orientation -based states for styling convenience
- splitpanedivider.xml, StyleId.java - New styling for `JSplitPane` divider component
- splitpane.xml - Added `non-opaque`, `transparent`, `decorated` and `focusable` styles

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

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

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

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

Trees
- TreePainter.java - Enhanced full-line nodes selection on mouse events
- WebFileTree.java - Now shows root handles by default

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

Painter
- AbstractPainter.java - Separated `install` and `uninstall` methods into smaller pieces for override convenience
- AbstractDecorationPainter.java - 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`

Decoration
- DecorationState.java - Added `one-touch` state and missing JavaDocs
- CheckIcon.java, MixedIcon.java, RadioIcon.java - Updated identifiers to be unique and replaceable
- AlignLayout.java - New `IContentLayout` implementation that copies `AlignLayout` behavior for contents
- AlignLayout.xsd, IContent.xsd - New XSD for `AlignLayout` class
- AlignLayout.java, BorderLayout.java, WebCanvas.java, AdaptiveCanvasPainter.java - Minor JavaDoc updates
- AlphaLayerBackground.java - Added default values for settings for convenience

IconManager
- LazyIcon.java - Added better `toString` implementation

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

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

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

DemoApplication
- JSplitPaneExample.java, demo-language.xml, jsplitpane.png - Added `JSplitPane` examples
- JScrollPaneExample.java - Added extra style example
- AbstractExample.java - Adjusted example scroll pane to look better
- JPanelExample.java - Minor code refactoring
@mgarin

This comment has been minimized.

Show comment
Hide comment
@mgarin

mgarin Jul 23, 2018

Owner

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.

Owner

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.

@Endogen

This comment has been minimized.

Show comment
Hide comment
@Endogen

Endogen Jul 23, 2018

Nice one!

Endogen commented Jul 23, 2018

Nice one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment