mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-10 06:14:10 +01:00
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:
parent
5636d4354b
commit
8027252572
@ -22,7 +22,7 @@
|
|||||||
package com.nextcloud.talk.ui.theme
|
package com.nextcloud.talk.ui.theme
|
||||||
|
|
||||||
import androidx.annotation.ColorInt
|
import androidx.annotation.ColorInt
|
||||||
import com.material_foundation.material_color_utilities.scheme.Scheme
|
import scheme.Scheme
|
||||||
|
|
||||||
interface ServerTheme {
|
interface ServerTheme {
|
||||||
@get:ColorInt
|
@get:ColorInt
|
||||||
|
@ -26,7 +26,7 @@ package com.nextcloud.talk.ui.theme
|
|||||||
import com.nextcloud.talk.R
|
import com.nextcloud.talk.R
|
||||||
import com.nextcloud.talk.models.json.capabilities.ThemingCapability
|
import com.nextcloud.talk.models.json.capabilities.ThemingCapability
|
||||||
import com.nextcloud.talk.utils.ui.ColorUtil
|
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) :
|
internal class ServerThemeImpl(themingCapability: ThemingCapability?, colorUtil: ColorUtil) :
|
||||||
ServerTheme {
|
ServerTheme {
|
||||||
|
@ -76,7 +76,7 @@ import com.nextcloud.talk.utils.ui.PlatformThemeUtil.isDarkMode
|
|||||||
import com.vanniktech.emoji.EmojiTextView
|
import com.vanniktech.emoji.EmojiTextView
|
||||||
import com.yarolegovich.mp.MaterialPreferenceCategory
|
import com.yarolegovich.mp.MaterialPreferenceCategory
|
||||||
import com.yarolegovich.mp.MaterialSwitchPreference
|
import com.yarolegovich.mp.MaterialSwitchPreference
|
||||||
import com.material_foundation.material_color_utilities.scheme.Scheme
|
import scheme.Scheme
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
|
|
||||||
// This file is automatically generated. Do not modify it.
|
// 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 hct.Cam16;
|
||||||
import com.material_foundation.material_color_utilities.hct.Hct;
|
import hct.Hct;
|
||||||
import com.material_foundation.material_color_utilities.utils.ColorUtils;
|
import utils.ColorUtils;
|
||||||
import com.material_foundation.material_color_utilities.utils.MathUtils;
|
import utils.MathUtils;
|
||||||
|
|
||||||
/** Functions for blending in HCT and CAM16. */
|
/** Functions for blending in HCT and CAM16. */
|
||||||
public class Blend {
|
public class Blend {
|
@ -14,11 +14,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.material_foundation.material_color_utilities.hct;
|
package hct;
|
||||||
|
|
||||||
import static java.lang.Math.max;
|
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
|
* CAM16, a color appearance model. Colors are not just defined by their hex code, but rather, a hex
|
@ -14,9 +14,9 @@
|
|||||||
* limitations under the License.
|
* 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*.
|
* A color system built using CAM16 hue and chroma, and L* from L*a*b*.
|
@ -16,10 +16,10 @@
|
|||||||
|
|
||||||
// This file is automatically generated. Do not modify it.
|
// 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 utils.ColorUtils;
|
||||||
import com.material_foundation.material_color_utilities.utils.MathUtils;
|
import utils.MathUtils;
|
||||||
|
|
||||||
/** A class that solves the HCT equation. */
|
/** A class that solves the HCT equation. */
|
||||||
public class HctSolver {
|
public class HctSolver {
|
@ -14,10 +14,10 @@
|
|||||||
* limitations under the License.
|
* 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;
|
||||||
import com.material_foundation.material_color_utilities.utils.MathUtils;
|
import utils.MathUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In traditional color spaces, a color can be identified solely by the observer's measurement of
|
* In traditional color spaces, a color can be identified solely by the observer's measurement of
|
@ -14,15 +14,15 @@
|
|||||||
* limitations under the License.
|
* 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.max;
|
||||||
import static java.lang.Math.min;
|
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.
|
* tones are generated, all except one use the same hue as the key color, and all vary in chroma.
|
||||||
*/
|
*/
|
||||||
public final class CorePalette {
|
public final class CorePalette {
|
@ -14,9 +14,9 @@
|
|||||||
* limitations under the License.
|
* 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.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* 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. */
|
/** An interface to allow use of different color spaces by quantizers. */
|
||||||
public interface PointProvider {
|
public interface PointProvider {
|
@ -14,9 +14,9 @@
|
|||||||
* limitations under the License.
|
* 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
|
* Provides conversions needed for K-Means quantization. Converting input to points, and converting
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.material_foundation.material_color_utilities.quantize;
|
package quantize;
|
||||||
|
|
||||||
interface Quantizer {
|
interface Quantizer {
|
||||||
public QuantizerResult quantize(int[] pixels, int maxColors);
|
public QuantizerResult quantize(int[] pixels, int maxColors);
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.material_foundation.material_color_utilities.quantize;
|
package quantize;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.material_foundation.material_color_utilities.quantize;
|
package quantize;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.material_foundation.material_color_utilities.quantize;
|
package quantize;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.material_foundation.material_color_utilities.quantize;
|
package quantize;
|
||||||
|
|
||||||
import static java.lang.Math.min;
|
import static java.lang.Math.min;
|
||||||
|
|
@ -14,9 +14,9 @@
|
|||||||
* limitations under the License.
|
* 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.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -16,13 +16,13 @@
|
|||||||
|
|
||||||
// This file is automatically generated. Do not modify it.
|
// 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.CanIgnoreReturnValue;
|
||||||
import com.google.errorprone.annotations.CheckReturnValue;
|
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
|
@CheckReturnValue
|
||||||
public class Scheme {
|
public class Scheme {
|
||||||
private int primary;
|
private int primary;
|
||||||
@ -48,7 +48,9 @@ public class Scheme {
|
|||||||
private int surfaceVariant;
|
private int surfaceVariant;
|
||||||
private int onSurfaceVariant;
|
private int onSurfaceVariant;
|
||||||
private int outline;
|
private int outline;
|
||||||
|
private int outlineVariant;
|
||||||
private int shadow;
|
private int shadow;
|
||||||
|
private int scrim;
|
||||||
private int inverseSurface;
|
private int inverseSurface;
|
||||||
private int inverseOnSurface;
|
private int inverseOnSurface;
|
||||||
private int inversePrimary;
|
private int inversePrimary;
|
||||||
@ -79,7 +81,9 @@ public class Scheme {
|
|||||||
int surfaceVariant,
|
int surfaceVariant,
|
||||||
int onSurfaceVariant,
|
int onSurfaceVariant,
|
||||||
int outline,
|
int outline,
|
||||||
|
int outlineVariant,
|
||||||
int shadow,
|
int shadow,
|
||||||
|
int scrim,
|
||||||
int inverseSurface,
|
int inverseSurface,
|
||||||
int inverseOnSurface,
|
int inverseOnSurface,
|
||||||
int inversePrimary) {
|
int inversePrimary) {
|
||||||
@ -107,7 +111,9 @@ public class Scheme {
|
|||||||
this.surfaceVariant = surfaceVariant;
|
this.surfaceVariant = surfaceVariant;
|
||||||
this.onSurfaceVariant = onSurfaceVariant;
|
this.onSurfaceVariant = onSurfaceVariant;
|
||||||
this.outline = outline;
|
this.outline = outline;
|
||||||
|
this.outlineVariant = outlineVariant;
|
||||||
this.shadow = shadow;
|
this.shadow = shadow;
|
||||||
|
this.scrim = scrim;
|
||||||
this.inverseSurface = inverseSurface;
|
this.inverseSurface = inverseSurface;
|
||||||
this.inverseOnSurface = inverseOnSurface;
|
this.inverseOnSurface = inverseOnSurface;
|
||||||
this.inversePrimary = inversePrimary;
|
this.inversePrimary = inversePrimary;
|
||||||
@ -154,7 +160,9 @@ public class Scheme {
|
|||||||
.withSurfaceVariant(core.n2.tone(90))
|
.withSurfaceVariant(core.n2.tone(90))
|
||||||
.withOnSurfaceVariant(core.n2.tone(30))
|
.withOnSurfaceVariant(core.n2.tone(30))
|
||||||
.withOutline(core.n2.tone(50))
|
.withOutline(core.n2.tone(50))
|
||||||
|
.withOutlineVariant(core.n2.tone(80))
|
||||||
.withShadow(core.n1.tone(0))
|
.withShadow(core.n1.tone(0))
|
||||||
|
.withScrim(core.n1.tone(0))
|
||||||
.withInverseSurface(core.n1.tone(20))
|
.withInverseSurface(core.n1.tone(20))
|
||||||
.withInverseOnSurface(core.n1.tone(95))
|
.withInverseOnSurface(core.n1.tone(95))
|
||||||
.withInversePrimary(core.a1.tone(80));
|
.withInversePrimary(core.a1.tone(80));
|
||||||
@ -185,7 +193,9 @@ public class Scheme {
|
|||||||
.withSurfaceVariant(core.n2.tone(30))
|
.withSurfaceVariant(core.n2.tone(30))
|
||||||
.withOnSurfaceVariant(core.n2.tone(80))
|
.withOnSurfaceVariant(core.n2.tone(80))
|
||||||
.withOutline(core.n2.tone(60))
|
.withOutline(core.n2.tone(60))
|
||||||
|
.withOutlineVariant(core.n2.tone(30))
|
||||||
.withShadow(core.n1.tone(0))
|
.withShadow(core.n1.tone(0))
|
||||||
|
.withScrim(core.n1.tone(0))
|
||||||
.withInverseSurface(core.n1.tone(90))
|
.withInverseSurface(core.n1.tone(90))
|
||||||
.withInverseOnSurface(core.n1.tone(20))
|
.withInverseOnSurface(core.n1.tone(20))
|
||||||
.withInversePrimary(core.a1.tone(40));
|
.withInversePrimary(core.a1.tone(40));
|
||||||
@ -513,6 +523,20 @@ public class Scheme {
|
|||||||
return this;
|
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() {
|
public int getShadow() {
|
||||||
return shadow;
|
return shadow;
|
||||||
}
|
}
|
||||||
@ -527,6 +551,20 @@ public class Scheme {
|
|||||||
return this;
|
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() {
|
public int getInverseSurface() {
|
||||||
return inverseSurface;
|
return inverseSurface;
|
||||||
}
|
}
|
||||||
@ -618,8 +656,12 @@ public class Scheme {
|
|||||||
+ onSurfaceVariant
|
+ onSurfaceVariant
|
||||||
+ ", outline="
|
+ ", outline="
|
||||||
+ outline
|
+ outline
|
||||||
|
+ ", outlineVariant="
|
||||||
|
+ outlineVariant
|
||||||
+ ", shadow="
|
+ ", shadow="
|
||||||
+ shadow
|
+ shadow
|
||||||
|
+ ", scrim="
|
||||||
|
+ scrim
|
||||||
+ ", inverseSurface="
|
+ ", inverseSurface="
|
||||||
+ inverseSurface
|
+ inverseSurface
|
||||||
+ ", inverseOnSurface="
|
+ ", inverseOnSurface="
|
||||||
@ -712,9 +754,15 @@ public class Scheme {
|
|||||||
if (outline != scheme.outline) {
|
if (outline != scheme.outline) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (outlineVariant != scheme.outlineVariant) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (shadow != scheme.shadow) {
|
if (shadow != scheme.shadow) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (scrim != scheme.scrim) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (inverseSurface != scheme.inverseSurface) {
|
if (inverseSurface != scheme.inverseSurface) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -754,7 +802,9 @@ public class Scheme {
|
|||||||
result = 31 * result + surfaceVariant;
|
result = 31 * result + surfaceVariant;
|
||||||
result = 31 * result + onSurfaceVariant;
|
result = 31 * result + onSurfaceVariant;
|
||||||
result = 31 * result + outline;
|
result = 31 * result + outline;
|
||||||
|
result = 31 * result + outlineVariant;
|
||||||
result = 31 * result + shadow;
|
result = 31 * result + shadow;
|
||||||
|
result = 31 * result + scrim;
|
||||||
result = 31 * result + inverseSurface;
|
result = 31 * result + inverseSurface;
|
||||||
result = 31 * result + inverseOnSurface;
|
result = 31 * result + inverseOnSurface;
|
||||||
result = 31 * result + inversePrimary;
|
result = 31 * result + inversePrimary;
|
@ -14,11 +14,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.material_foundation.material_color_utilities.score;
|
package score;
|
||||||
|
|
||||||
import com.material_foundation.material_color_utilities.hct.Cam16;
|
import hct.Cam16;
|
||||||
import com.material_foundation.material_color_utilities.utils.ColorUtils;
|
import utils.ColorUtils;
|
||||||
import com.material_foundation.material_color_utilities.utils.MathUtils;
|
import utils.MathUtils;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
// This file is automatically generated. Do not modify it.
|
// This file is automatically generated. Do not modify it.
|
||||||
|
|
||||||
package com.material_foundation.material_color_utilities.utils;
|
package utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Color science utilities.
|
* Color science utilities.
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
// This file is automatically generated. Do not modify it.
|
// This file is automatically generated. Do not modify it.
|
||||||
|
|
||||||
package com.material_foundation.material_color_utilities.utils;
|
package utils;
|
||||||
|
|
||||||
/** Utility methods for mathematical operations. */
|
/** Utility methods for mathematical operations. */
|
||||||
public class MathUtils {
|
public class MathUtils {
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.material_foundation.material_color_utilities.utils;
|
package utils;
|
||||||
|
|
||||||
/** Utility methods for string representations of colors. */
|
/** Utility methods for string representations of colors. */
|
||||||
final class StringUtils {
|
final class StringUtils {
|
Loading…
Reference in New Issue
Block a user