-
Notifications
You must be signed in to change notification settings - Fork 61
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
Update web sample with dynamic web scaling #646
base: 2.x
Are you sure you want to change the base?
Update web sample with dynamic web scaling #646
Conversation
# Conflicts: # demos/appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/Main.kt
demos/appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/Main.kt
Outdated
Show resolved
Hide resolved
private fun ScreenSize.calculateDensityFromScreenSize(): Density = | ||
if (widthDp.value < 1500) { | ||
Density(1.2f, 1f) | ||
} else { | ||
Density(1.8f, 1.2f) | ||
} |
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.
This looks weird to me. Why is it specifically 1500
? Why specifically 1.2f
, 1f
, 1.8f
, 1.2f
? The issue title also implies dynamic, but this looks more two static cases rather?
} | ||
|
||
private fun ScreenSize.calculateDensityFromScreenSize(): Density = | ||
if (widthDp.value < 1500) { |
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.
should it be a proportional value coerced in (0.75f, 4f)?
…th_dynamic_web_scaling # Conflicts: # demos/appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/WebTypography.kt
Description
Have the Appyx navigation demo app scale dynamically for web.