Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BrightnessSlider transparent background #47

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

moertel
Copy link
Contributor

@moertel moertel commented Dec 7, 2023

After a thorough refactoring of the BrightnessSlider somewhere after release 1.0.4, the slider background would falsely show a gradient going from full transparency to zero transparency:

This commit removes the alpha logic and replaces it with the previously used shader going from pure black to the (pure) selected colour. The previous logic, for reference:

val shader = LinearGradientShader(
colors = listOf(Color.Black, controller.pureSelectedColor.value),
from = Offset.Zero,
to = Offset(bitmapSize.width.toFloat(), bitmapSize.height.toFloat()),
tileMode = TileMode.Clamp,
)

Fixes #42

After a thorough refactoring of the BrightnessSlider somewhere after
release 1.0.4, the slider background would falsely show a gradient going
from full transparency to zero transparency.

This commit removes the alpha logic and replaces it with the previously
used shader going from pure black to the (pure) selected colour.

Fixes skydoves#42
Copy link
Owner

@skydoves skydoves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@skydoves skydoves merged commit c94da8b into skydoves:main Dec 8, 2023
3 checks passed
@moertel moertel deleted the fix-brightness-slider branch December 9, 2023 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Brightness slider not showing black (v1.0.5)
2 participants