Fix OSC incorrect pressed alpha when low values are used

OSC would "light up" when the alpha value was low because of the value being coerced to an arbitrary range. Divide the alpha value by 3 instead.
This commit is contained in:
lynxnb 2023-03-31 00:22:28 +02:00 committed by Billy Laws
parent d69c9f472f
commit 2556b25ebf

View File

@ -123,7 +123,7 @@ abstract class OnScreenButton(
open fun render(canvas : Canvas) {
val bounds = currentBounds
val alpha = if (isPressed) (config.alpha - 130).coerceIn(30..255) else config.alpha
val alpha = if (isPressed) config.alpha / 3 else config.alpha
renderColors(drawable)
drawable.apply {
this.bounds = bounds