mirror of
https://github.com/Boof2015/astra-mobile.git
synced 2026-08-17 19:24:22 +02:00
remove ripple
This commit is contained in:
+14
-6
@@ -9,7 +9,8 @@ import android.graphics.Path
|
||||
import android.graphics.Typeface
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.graphics.drawable.RippleDrawable
|
||||
import android.graphics.drawable.LayerDrawable
|
||||
import android.graphics.drawable.StateListDrawable
|
||||
import android.view.Gravity
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
@@ -1026,11 +1027,18 @@ class QueueContentView(
|
||||
|
||||
fun setSurfaceColor(color: Int) {
|
||||
dividerColor = palette.divider
|
||||
background = RippleDrawable(
|
||||
ColorStateList.valueOf(palette.ripple),
|
||||
ColorDrawable(color),
|
||||
null,
|
||||
)
|
||||
background = StateListDrawable().apply {
|
||||
addState(
|
||||
intArrayOf(android.R.attr.state_pressed),
|
||||
LayerDrawable(
|
||||
arrayOf(
|
||||
ColorDrawable(color),
|
||||
ColorDrawable(palette.pressOverlay),
|
||||
),
|
||||
),
|
||||
)
|
||||
addState(intArrayOf(), ColorDrawable(color))
|
||||
}
|
||||
}
|
||||
|
||||
override fun dispatchDraw(canvas: Canvas) {
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@ data class QueuePalette(
|
||||
val selectedSurface: Int = Color.rgb(57, 62, 75),
|
||||
val nowPlayingSurface: Int = Color.rgb(31, 34, 43),
|
||||
val divider: Int = Color.rgb(72, 72, 82),
|
||||
val ripple: Int = Color.argb(38, 140, 162, 208),
|
||||
val pressOverlay: Int = Color.argb(20, 140, 162, 208),
|
||||
val text: Int = Color.WHITE,
|
||||
val textSecondary: Int = Color.rgb(190, 190, 200),
|
||||
val textTertiary: Int = Color.rgb(135, 135, 148),
|
||||
@@ -30,7 +30,7 @@ data class QueuePalette(
|
||||
selectedSurface = color("selectedSurface", defaults.selectedSurface),
|
||||
nowPlayingSurface = color("nowPlayingSurface", defaults.nowPlayingSurface),
|
||||
divider = color("divider", defaults.divider),
|
||||
ripple = color("ripple", defaults.ripple),
|
||||
pressOverlay = color("pressOverlay", defaults.pressOverlay),
|
||||
text = color("text", defaults.text),
|
||||
textSecondary = color("textSecondary", defaults.textSecondary),
|
||||
textTertiary = color("textTertiary", defaults.textTertiary),
|
||||
|
||||
@@ -13,7 +13,7 @@ export interface NativeQueuePalette {
|
||||
selectedSurface: number;
|
||||
nowPlayingSurface: number;
|
||||
divider: number;
|
||||
ripple: number;
|
||||
pressOverlay: number;
|
||||
text: number;
|
||||
textSecondary: number;
|
||||
textTertiary: number;
|
||||
@@ -93,7 +93,7 @@ export function toNativeQueuePalette(colors: Palette): NativeQueuePalette {
|
||||
selectedSurface: nativeColor(colors.glassHighlight),
|
||||
nowPlayingSurface: nativeColor(colors.glassBg),
|
||||
divider: nativeColor(colors.glassBorder),
|
||||
ripple: nativeColor(colors.ripple),
|
||||
pressOverlay: nativeColor(colors.glassHighlight),
|
||||
text: nativeColor(colors.textPrimary),
|
||||
textSecondary: nativeColor(colors.textSecondary),
|
||||
textTertiary: nativeColor(colors.textTertiary),
|
||||
|
||||
Reference in New Issue
Block a user