-
Notifications
You must be signed in to change notification settings - Fork 62
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
Desktop widget representation #542
Desktop widget representation #542
Conversation
private val created: TargetUiState = TargetUiState( | ||
rotationX = RotationX.Target(0f), | ||
position = Position.Target(DpOffset(0.dp, height)), | ||
scale = Scale.Target(2.5f), | ||
alpha = Alpha.Target(0f), | ||
zIndex = ZIndex.Target(0f), | ||
) | ||
|
||
private val standard: TargetUiState = TargetUiState( | ||
rotationX = RotationX.Target(0f), | ||
position = Position.Target(DpOffset.Zero), | ||
scale = Scale.Target(1f), | ||
alpha = Alpha.Target(1f), | ||
zIndex = ZIndex.Target(0f), | ||
) | ||
|
||
private val destroyed: TargetUiState = TargetUiState( | ||
rotationX = RotationX.Target(0f), | ||
position = Position.Target(DpOffset(0.dp, -height)), | ||
scale = Scale.Target(0.25f), | ||
alpha = Alpha.Target(0f), | ||
zIndex = ZIndex.Target(0f), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose these don't affect the rendering since the widget doesn't trigger Spotlight's element state change operations, only scroll change, and then most of the UI is functional in TargetUiState::toMutableUiState
? In that case we could just remove this as a red herring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I'll just leave a default
one inside private companion object
as we still need it for toUiTargets
method.
Description
Create specific representation for Desktop Widget sample.
Fixes #529
Check list
CHANGELOG.md
if required.