Browse Source

Enable custom selection color fur solarized themes.

pull/188/head
weisj 5 years ago
parent
commit
fdb22593fd
  1. 1
      core/src/main/java/com/github/weisj/darklaf/ui/combobox/DarkComboBoxUI.java
  2. 5
      theme/src/main/java/com/github/weisj/darklaf/theme/SolarizedDarkTheme.java
  3. 5
      theme/src/main/java/com/github/weisj/darklaf/theme/SolarizedLightTheme.java
  4. 29
      theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_accents.properties
  5. 29
      theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_accents.properties

1
core/src/main/java/com/github/weisj/darklaf/ui/combobox/DarkComboBoxUI.java

@ -41,7 +41,6 @@ import com.github.weisj.darklaf.components.ArrowButton;
import com.github.weisj.darklaf.delegate.LayoutManagerDelegate; import com.github.weisj.darklaf.delegate.LayoutManagerDelegate;
import com.github.weisj.darklaf.graphics.PaintUtil; import com.github.weisj.darklaf.graphics.PaintUtil;
import com.github.weisj.darklaf.ui.list.DarkDefaultListCellRenderer; import com.github.weisj.darklaf.ui.list.DarkDefaultListCellRenderer;
import com.github.weisj.darklaf.ui.list.DarkListCellRendererDelegate;
import com.github.weisj.darklaf.util.DarkUIUtil; import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.PropertyKey; import com.github.weisj.darklaf.util.PropertyKey;

5
theme/src/main/java/com/github/weisj/darklaf/theme/SolarizedDarkTheme.java

@ -58,6 +58,11 @@ public class SolarizedDarkTheme extends Theme {
return ColorToneRule.DARK; return ColorToneRule.DARK;
} }
@Override
public boolean supportsCustomSelectionColor() {
return true;
}
@Override @Override
public void customizeUIProperties(final Properties properties, final UIDefaults currentDefaults) { public void customizeUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.customizeUIProperties(properties, currentDefaults); super.customizeUIProperties(properties, currentDefaults);

5
theme/src/main/java/com/github/weisj/darklaf/theme/SolarizedLightTheme.java

@ -58,6 +58,11 @@ public class SolarizedLightTheme extends Theme {
return ColorToneRule.LIGHT; return ColorToneRule.LIGHT;
} }
@Override
public boolean supportsCustomSelectionColor() {
return true;
}
@Override @Override
public void customizeUIProperties(final Properties properties, final UIDefaults currentDefaults) { public void customizeUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.customizeUIProperties(properties, currentDefaults); super.customizeUIProperties(properties, currentDefaults);

29
theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_accents.properties

@ -0,0 +1,29 @@
#
# MIT License
#
# Copyright (c) 2020 Jannis Weis
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
#
# suppress inspection "UnusedProperty" for whole file
#
selection.propertyList = {textCompSelectionBackground}
selectionForeground.propertyList = {textCompSelectionBackground:textCompSelectionForeground}

29
theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_accents.properties

@ -0,0 +1,29 @@
#
# MIT License
#
# Copyright (c) 2020 Jannis Weis
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
#
# suppress inspection "UnusedProperty" for whole file
#
selection.propertyList = {textCompSelectionBackground}
selectionForeground.propertyList = {textCompSelectionBackground:textCompSelectionForeground}
Loading…
Cancel
Save