[Android] Fix widget artist color wrongfully using the widget opacity
Nicolas Pomepuy
git at videolan.org
Thu May 19 14:05:38 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu May 19 15:00:45 2022 +0200| [1b1e6f31b9d868b4a3e3d1eb8930a4d51965be72] | committer: Nicolas Pomepuy
Fix widget artist color wrongfully using the widget opacity
> https://code.videolan.org/videolan/vlc-android/commit/1b1e6f31b9d868b4a3e3d1eb8930a4d51965be72
---
.../vlc-android/src/org/videolan/vlc/widget/utils/WidgetUtils.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/widget/utils/WidgetUtils.kt b/application/vlc-android/src/org/videolan/vlc/widget/utils/WidgetUtils.kt
index 52df6e317..a5aab56a3 100644
--- a/application/vlc-android/src/org/videolan/vlc/widget/utils/WidgetUtils.kt
+++ b/application/vlc-android/src/org/videolan/vlc/widget/utils/WidgetUtils.kt
@@ -103,7 +103,7 @@ fun Widget.getArtistColor(context: Context, palette: Palette?): Int {
theme == 2 -> foregroundColor.lightenOrDarkenColor(0.1F)
else -> getForegroundColor(context, palette).lightenOrDarkenColor(0.1F)
}
- return if (opacity.coerceAtLeast(0).coerceAtMost(100) != 100) ColorUtils.setAlphaComponent(untreatedColor, (opacity * 2.55F).toInt()) else untreatedColor
+ return untreatedColor
}
@RequiresApi(Build.VERSION_CODES.S)
More information about the Android
mailing list