repackage to follow original structure for easy c&p replacements in the future

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-08-10 18:33:55 +02:00
parent 5636d4354b
commit 8027252572
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
23 changed files with 93 additions and 43 deletions

View file

@ -22,7 +22,7 @@
package com.nextcloud.talk.ui.theme
import androidx.annotation.ColorInt
import com.material_foundation.material_color_utilities.scheme.Scheme
import scheme.Scheme
interface ServerTheme {
@get:ColorInt

View file

@ -26,7 +26,7 @@ package com.nextcloud.talk.ui.theme
import com.nextcloud.talk.R
import com.nextcloud.talk.models.json.capabilities.ThemingCapability
import com.nextcloud.talk.utils.ui.ColorUtil
import com.material_foundation.material_color_utilities.scheme.Scheme
import scheme.Scheme
internal class ServerThemeImpl(themingCapability: ThemingCapability?, colorUtil: ColorUtil) :
ServerTheme {

View file

@ -76,7 +76,7 @@ import com.nextcloud.talk.utils.ui.PlatformThemeUtil.isDarkMode
import com.vanniktech.emoji.EmojiTextView
import com.yarolegovich.mp.MaterialPreferenceCategory
import com.yarolegovich.mp.MaterialSwitchPreference
import com.material_foundation.material_color_utilities.scheme.Scheme
import scheme.Scheme
import javax.inject.Inject
import kotlin.math.roundToInt

View file

@ -16,12 +16,12 @@
// This file is automatically generated. Do not modify it.
package com.material_foundation.material_color_utilities.blend;
package blend;
import com.material_foundation.material_color_utilities.hct.Cam16;
import com.material_foundation.material_color_utilities.hct.Hct;
import com.material_foundation.material_color_utilities.utils.ColorUtils;
import com.material_foundation.material_color_utilities.utils.MathUtils;
import hct.Cam16;
import hct.Hct;
import utils.ColorUtils;
import utils.MathUtils;
/** Functions for blending in HCT and CAM16. */
public class Blend {

View file

@ -14,11 +14,11 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.hct;
package hct;
import static java.lang.Math.max;
import com.material_foundation.material_color_utilities.utils.ColorUtils;
import utils.ColorUtils;
/**
* CAM16, a color appearance model. Colors are not just defined by their hex code, but rather, a hex

View file

@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.hct;
package hct;
import com.material_foundation.material_color_utilities.utils.ColorUtils;
import utils.ColorUtils;
/**
* A color system built using CAM16 hue and chroma, and L* from L*a*b*.

View file

@ -16,10 +16,10 @@
// This file is automatically generated. Do not modify it.
package com.material_foundation.material_color_utilities.hct;
package hct;
import com.material_foundation.material_color_utilities.utils.ColorUtils;
import com.material_foundation.material_color_utilities.utils.MathUtils;
import utils.ColorUtils;
import utils.MathUtils;
/** A class that solves the HCT equation. */
public class HctSolver {

View file

@ -14,10 +14,10 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.hct;
package hct;
import com.material_foundation.material_color_utilities.utils.ColorUtils;
import com.material_foundation.material_color_utilities.utils.MathUtils;
import utils.ColorUtils;
import utils.MathUtils;
/**
* In traditional color spaces, a color can be identified solely by the observer's measurement of

View file

@ -14,15 +14,15 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.palettes;
package palettes;
import static java.lang.Math.max;
import static java.lang.Math.min;
import com.material_foundation.material_color_utilities.hct.Hct;
import hct.Hct;
/**
* An intermediate concept between the key color for a UI theme, and a full color com.material_foundation.material_color_utilities.scheme. 5 sets of
* An intermediate concept between the key color for a UI theme, and a full color scheme. 5 sets of
* tones are generated, all except one use the same hue as the key color, and all vary in chroma.
*/
public final class CorePalette {

View file

@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.palettes;
package palettes;
import com.material_foundation.material_color_utilities.hct.Hct;
import hct.Hct;
import java.util.HashMap;
import java.util.Map;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.quantize;
package quantize;
/** An interface to allow use of different color spaces by quantizers. */
public interface PointProvider {

View file

@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.quantize;
package quantize;
import com.material_foundation.material_color_utilities.utils.ColorUtils;
import utils.ColorUtils;
/**
* Provides conversions needed for K-Means quantization. Converting input to points, and converting

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.quantize;
package quantize;
interface Quantizer {
public QuantizerResult quantize(int[] pixels, int maxColors);

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.quantize;
package quantize;
import java.util.Map;
import java.util.Set;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.quantize;
package quantize;
import java.util.HashMap;
import java.util.Map;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.quantize;
package quantize;
import java.util.Map;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.quantize;
package quantize;
import static java.lang.Math.min;

View file

@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.quantize;
package quantize;
import com.material_foundation.material_color_utilities.utils.ColorUtils;
import utils.ColorUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

View file

@ -16,13 +16,13 @@
// This file is automatically generated. Do not modify it.
package com.material_foundation.material_color_utilities.scheme;
package scheme;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import com.google.errorprone.annotations.CheckReturnValue;
import com.material_foundation.material_color_utilities.palettes.CorePalette;
import palettes.CorePalette;
/** Represents a Material color com.material_foundation.material_color_utilities.scheme, a mapping of color roles to colors. */
/** Represents a Material color scheme, a mapping of color roles to colors. */
@CheckReturnValue
public class Scheme {
private int primary;
@ -48,7 +48,9 @@ public class Scheme {
private int surfaceVariant;
private int onSurfaceVariant;
private int outline;
private int outlineVariant;
private int shadow;
private int scrim;
private int inverseSurface;
private int inverseOnSurface;
private int inversePrimary;
@ -79,7 +81,9 @@ public class Scheme {
int surfaceVariant,
int onSurfaceVariant,
int outline,
int outlineVariant,
int shadow,
int scrim,
int inverseSurface,
int inverseOnSurface,
int inversePrimary) {
@ -107,7 +111,9 @@ public class Scheme {
this.surfaceVariant = surfaceVariant;
this.onSurfaceVariant = onSurfaceVariant;
this.outline = outline;
this.outlineVariant = outlineVariant;
this.shadow = shadow;
this.scrim = scrim;
this.inverseSurface = inverseSurface;
this.inverseOnSurface = inverseOnSurface;
this.inversePrimary = inversePrimary;
@ -154,7 +160,9 @@ public class Scheme {
.withSurfaceVariant(core.n2.tone(90))
.withOnSurfaceVariant(core.n2.tone(30))
.withOutline(core.n2.tone(50))
.withOutlineVariant(core.n2.tone(80))
.withShadow(core.n1.tone(0))
.withScrim(core.n1.tone(0))
.withInverseSurface(core.n1.tone(20))
.withInverseOnSurface(core.n1.tone(95))
.withInversePrimary(core.a1.tone(80));
@ -185,7 +193,9 @@ public class Scheme {
.withSurfaceVariant(core.n2.tone(30))
.withOnSurfaceVariant(core.n2.tone(80))
.withOutline(core.n2.tone(60))
.withOutlineVariant(core.n2.tone(30))
.withShadow(core.n1.tone(0))
.withScrim(core.n1.tone(0))
.withInverseSurface(core.n1.tone(90))
.withInverseOnSurface(core.n1.tone(20))
.withInversePrimary(core.a1.tone(40));
@ -513,6 +523,20 @@ public class Scheme {
return this;
}
public int getOutlineVariant() {
return outlineVariant;
}
public void setOutlineVariant(int outlineVariant) {
this.outlineVariant = outlineVariant;
}
@CanIgnoreReturnValue
public Scheme withOutlineVariant(int outlineVariant) {
this.outlineVariant = outlineVariant;
return this;
}
public int getShadow() {
return shadow;
}
@ -527,6 +551,20 @@ public class Scheme {
return this;
}
public int getScrim() {
return scrim;
}
public void setScrim(int scrim) {
this.scrim = scrim;
}
@CanIgnoreReturnValue
public Scheme withScrim(int scrim) {
this.scrim = scrim;
return this;
}
public int getInverseSurface() {
return inverseSurface;
}
@ -618,8 +656,12 @@ public class Scheme {
+ onSurfaceVariant
+ ", outline="
+ outline
+ ", outlineVariant="
+ outlineVariant
+ ", shadow="
+ shadow
+ ", scrim="
+ scrim
+ ", inverseSurface="
+ inverseSurface
+ ", inverseOnSurface="
@ -712,9 +754,15 @@ public class Scheme {
if (outline != scheme.outline) {
return false;
}
if (outlineVariant != scheme.outlineVariant) {
return false;
}
if (shadow != scheme.shadow) {
return false;
}
if (scrim != scheme.scrim) {
return false;
}
if (inverseSurface != scheme.inverseSurface) {
return false;
}
@ -754,7 +802,9 @@ public class Scheme {
result = 31 * result + surfaceVariant;
result = 31 * result + onSurfaceVariant;
result = 31 * result + outline;
result = 31 * result + outlineVariant;
result = 31 * result + shadow;
result = 31 * result + scrim;
result = 31 * result + inverseSurface;
result = 31 * result + inverseOnSurface;
result = 31 * result + inversePrimary;

View file

@ -14,11 +14,11 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.score;
package score;
import com.material_foundation.material_color_utilities.hct.Cam16;
import com.material_foundation.material_color_utilities.utils.ColorUtils;
import com.material_foundation.material_color_utilities.utils.MathUtils;
import hct.Cam16;
import utils.ColorUtils;
import utils.MathUtils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;

View file

@ -16,7 +16,7 @@
// This file is automatically generated. Do not modify it.
package com.material_foundation.material_color_utilities.utils;
package utils;
/**
* Color science utilities.

View file

@ -16,7 +16,7 @@
// This file is automatically generated. Do not modify it.
package com.material_foundation.material_color_utilities.utils;
package utils;
/** Utility methods for mathematical operations. */
public class MathUtils {

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.material_foundation.material_color_utilities.utils;
package utils;
/** Utility methods for string representations of colors. */
final class StringUtils {