Skip to content

Commit

Permalink
Small example view layout tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonRedeye committed Jun 3, 2021
1 parent dee44fd commit 7b28a03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ fun MacExampleView() {
) {
MacSearchField(
onSearchRequested = { println("Searched: $it") },
modifier = Modifier.width(200.dp).align(Alignment.End)
modifier = Modifier.width(200.dp)
)

Spacer(Modifier.height(32.dp))
Spacer(Modifier.height(16.dp))

Column(
verticalArrangement = Arrangement.spacedBy(8.dp),
Expand Down Expand Up @@ -93,7 +93,7 @@ private fun ButtonsView() {
macButtonStyle = MacButtonStyle.Large,
onClick = {}
) {
Text("A large one")
Text("Primary")
}

Row(horizontalArrangement = Arrangement.spacedBy(16.dp)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.chozzle.composenativetheme

import androidx.compose.animation.Crossfade
import androidx.compose.animation.core.FastOutLinearInEasing
import androidx.compose.animation.core.TweenSpec
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
Expand All @@ -26,7 +27,7 @@ fun NativeExampleView() {

LaunchedEffect(currentDisplayingTheme) {
while (true) {
delay(3000)
delay(2000)

currentDisplayingTheme = when (currentDisplayingTheme) {
Mac -> Windows
Expand All @@ -38,7 +39,7 @@ fun NativeExampleView() {

Crossfade(
targetState = currentDisplayingTheme,
animationSpec = TweenSpec(2500)
animationSpec = TweenSpec(1000, easing = FastOutLinearInEasing)
) { screen ->
CompositionLocalProvider(
LocalTheme provides screen,
Expand Down

0 comments on commit 7b28a03

Please sign in to comment.