mirror of
https://github.com/SKCraft/Launcher.git
synced 2024-11-27 12:46:22 +01:00
Update Substance to fix fancy launcher on Java 9+
This commit is contained in:
parent
ffdea1f59a
commit
dc2f930751
@ -7,7 +7,7 @@ mainClassName = "com.skcraft.launcher.FancyLauncher"
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':launcher')
|
compile project(':launcher')
|
||||||
compile 'com.github.insubstantial:substance:7.3'
|
compile 'org.pushing-pixels:radiance-substance:3.5.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
|
@ -6,7 +6,13 @@
|
|||||||
|
|
||||||
package com.skcraft.launcher.skin;
|
package com.skcraft.launcher.skin;
|
||||||
|
|
||||||
import org.pushingpixels.substance.api.*;
|
import org.pushingpixels.substance.api.ComponentState;
|
||||||
|
import org.pushingpixels.substance.api.SubstanceColorSchemeBundle;
|
||||||
|
import org.pushingpixels.substance.api.SubstanceSkin;
|
||||||
|
import org.pushingpixels.substance.api.SubstanceSlices;
|
||||||
|
import org.pushingpixels.substance.api.colorscheme.ColorSchemeSingleColorQuery;
|
||||||
|
import org.pushingpixels.substance.api.colorscheme.ColorSchemeTransform;
|
||||||
|
import org.pushingpixels.substance.api.colorscheme.SubstanceColorScheme;
|
||||||
import org.pushingpixels.substance.api.painter.border.ClassicBorderPainter;
|
import org.pushingpixels.substance.api.painter.border.ClassicBorderPainter;
|
||||||
import org.pushingpixels.substance.api.painter.border.CompositeBorderPainter;
|
import org.pushingpixels.substance.api.painter.border.CompositeBorderPainter;
|
||||||
import org.pushingpixels.substance.api.painter.border.DelegateBorderPainter;
|
import org.pushingpixels.substance.api.painter.border.DelegateBorderPainter;
|
||||||
@ -18,7 +24,8 @@ import org.pushingpixels.substance.api.skin.GraphiteSkin;
|
|||||||
public class LauncherSkin extends GraphiteSkin {
|
public class LauncherSkin extends GraphiteSkin {
|
||||||
|
|
||||||
public LauncherSkin() {
|
public LauncherSkin() {
|
||||||
ColorSchemes schemes = SubstanceSkin.getColorSchemes("com/skcraft/launcher/skin/graphite.colorschemes");
|
ColorSchemes schemes = SubstanceSkin.getColorSchemes(
|
||||||
|
this.getClass().getResourceAsStream("graphite.colorschemes"));
|
||||||
|
|
||||||
SubstanceColorScheme activeScheme = schemes.get("Graphite Active");
|
SubstanceColorScheme activeScheme = schemes.get("Graphite Active");
|
||||||
SubstanceColorScheme selectedDisabledScheme = schemes.get("Graphite Selected Disabled");
|
SubstanceColorScheme selectedDisabledScheme = schemes.get("Graphite Selected Disabled");
|
||||||
@ -36,36 +43,43 @@ public class LauncherSkin extends GraphiteSkin {
|
|||||||
SubstanceColorSchemeBundle scheme = new SubstanceColorSchemeBundle(activeScheme, enabledScheme, disabledScheme);
|
SubstanceColorSchemeBundle scheme = new SubstanceColorSchemeBundle(activeScheme, enabledScheme, disabledScheme);
|
||||||
|
|
||||||
// highlight fill scheme + custom alpha for rollover unselected state
|
// highlight fill scheme + custom alpha for rollover unselected state
|
||||||
scheme.registerHighlightColorScheme(highlightScheme, 0.6f, ComponentState.ROLLOVER_UNSELECTED);
|
scheme.registerHighlightColorScheme(highlightScheme,
|
||||||
scheme.registerHighlightColorScheme(highlightScheme, 0.8f, ComponentState.SELECTED);
|
ComponentState.ROLLOVER_UNSELECTED, ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED,
|
||||||
scheme.registerHighlightColorScheme(highlightScheme, 1.0f, ComponentState.ROLLOVER_SELECTED);
|
ComponentState.ARMED, ComponentState.ROLLOVER_ARMED
|
||||||
scheme.registerHighlightColorScheme(highlightScheme, 0.75f, ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
|
);
|
||||||
|
|
||||||
|
scheme.registerHighlightAlpha(0.6f, ComponentState.ROLLOVER_UNSELECTED);
|
||||||
|
scheme.registerHighlightAlpha(0.8f, ComponentState.SELECTED);
|
||||||
|
scheme.registerHighlightAlpha(1.0f, ComponentState.ROLLOVER_SELECTED);
|
||||||
|
scheme.registerHighlightAlpha(0.75f, ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
|
||||||
|
|
||||||
// highlight border scheme
|
// highlight border scheme
|
||||||
scheme.registerColorScheme(highlightScheme, ColorSchemeAssociationKind.HIGHLIGHT_BORDER, ComponentState.getActiveStates());
|
scheme.registerColorScheme(highlightScheme, SubstanceSlices.ColorSchemeAssociationKind.HIGHLIGHT_BORDER, ComponentState.getActiveStates());
|
||||||
scheme.registerColorScheme(borderScheme, ColorSchemeAssociationKind.BORDER);
|
scheme.registerColorScheme(borderScheme, SubstanceSlices.ColorSchemeAssociationKind.BORDER);
|
||||||
scheme.registerColorScheme(separatorScheme, ColorSchemeAssociationKind.SEPARATOR);
|
scheme.registerColorScheme(separatorScheme, SubstanceSlices.ColorSchemeAssociationKind.SEPARATOR);
|
||||||
|
|
||||||
// text highlight scheme
|
// text highlight scheme
|
||||||
scheme.registerColorScheme(textHighlightScheme, ColorSchemeAssociationKind.TEXT_HIGHLIGHT, ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED);
|
scheme.registerColorScheme(textHighlightScheme, SubstanceSlices.ColorSchemeAssociationKind.HIGHLIGHT_TEXT, ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED);
|
||||||
scheme.registerColorScheme(highlightScheme, ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
|
scheme.registerColorScheme(highlightScheme, ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
|
||||||
scheme.registerColorScheme(highlightMarkScheme, ColorSchemeAssociationKind.HIGHLIGHT_MARK, ComponentState.getActiveStates());
|
scheme.registerColorScheme(highlightMarkScheme, SubstanceSlices.ColorSchemeAssociationKind.HIGHLIGHT_MARK, ComponentState.getActiveStates());
|
||||||
scheme.registerColorScheme(highlightMarkScheme, ColorSchemeAssociationKind.MARK, ComponentState.ROLLOVER_SELECTED, ComponentState.ROLLOVER_UNSELECTED);
|
scheme.registerColorScheme(highlightMarkScheme, SubstanceSlices.ColorSchemeAssociationKind.MARK, ComponentState.ROLLOVER_SELECTED, ComponentState.ROLLOVER_UNSELECTED);
|
||||||
scheme.registerColorScheme(borderScheme, ColorSchemeAssociationKind.MARK, ComponentState.SELECTED);
|
scheme.registerColorScheme(borderScheme, SubstanceSlices.ColorSchemeAssociationKind.MARK, ComponentState.SELECTED);
|
||||||
scheme.registerColorScheme(disabledScheme, 0.5f, ComponentState.DISABLED_UNSELECTED);
|
scheme.registerColorScheme(disabledScheme, ComponentState.DISABLED_UNSELECTED);
|
||||||
scheme.registerColorScheme(selectedDisabledScheme, 0.65f, ComponentState.DISABLED_SELECTED);
|
scheme.registerColorScheme(selectedDisabledScheme, ComponentState.DISABLED_SELECTED);
|
||||||
scheme.registerColorScheme(highlightScheme, ComponentState.ROLLOVER_SELECTED);
|
scheme.registerColorScheme(highlightScheme, ComponentState.ROLLOVER_SELECTED);
|
||||||
scheme.registerColorScheme(selectedScheme, ComponentState.SELECTED);
|
scheme.registerColorScheme(selectedScheme, ComponentState.SELECTED);
|
||||||
|
|
||||||
scheme.registerColorScheme(tabHighlightScheme, ColorSchemeAssociationKind.TAB, ComponentState.ROLLOVER_SELECTED);
|
scheme.registerAlpha(0.5f, ComponentState.DISABLED_UNSELECTED);
|
||||||
|
scheme.registerAlpha(0.65f, ComponentState.DISABLED_SELECTED);
|
||||||
|
|
||||||
this.registerDecorationAreaSchemeBundle(scheme, backgroundScheme, DecorationAreaType.NONE);
|
scheme.registerColorScheme(tabHighlightScheme, SubstanceSlices.ColorSchemeAssociationKind.TAB, ComponentState.ROLLOVER_SELECTED);
|
||||||
|
|
||||||
this.setSelectedTabFadeStart(0.1);
|
this.registerDecorationAreaSchemeBundle(scheme, backgroundScheme, SubstanceSlices.DecorationAreaType.NONE);
|
||||||
this.setSelectedTabFadeEnd(0.3);
|
|
||||||
|
this.setTabFadeStart(0.1);
|
||||||
|
this.setTabFadeEnd(0.3);
|
||||||
|
|
||||||
this.buttonShaper = new LauncherButtonShaper();
|
this.buttonShaper = new LauncherButtonShaper();
|
||||||
this.watermark = null;
|
|
||||||
this.fillPainter = new FractionBasedFillPainter("Graphite",
|
this.fillPainter = new FractionBasedFillPainter("Graphite",
|
||||||
new float[] { 0.0f, 0.5f, 1.0f },
|
new float[] { 0.0f, 0.5f, 1.0f },
|
||||||
new ColorSchemeSingleColorQuery[] {
|
new ColorSchemeSingleColorQuery[] {
|
||||||
@ -87,8 +101,6 @@ public class LauncherSkin extends GraphiteSkin {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
this.highlightBorderPainter = new ClassicBorderPainter();
|
this.highlightBorderPainter = new ClassicBorderPainter();
|
||||||
|
|
||||||
this.watermarkScheme = schemes.get("Graphite Watermark");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user