Skip to content

Commit

Permalink
tweak design
Browse files Browse the repository at this point in the history
  • Loading branch information
Tlaster committed Sep 17, 2024
1 parent 675a245 commit 52cbbb8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
Expand All @@ -70,10 +69,10 @@ import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.dp
import dev.dimension.flare.ui.theme.DisabledAlpha
import dev.dimension.flare.ui.component.status.FlareDividerDefaults
import kotlin.math.roundToInt

private val bottomBarHeight = 60.dp
private val bottomBarHeight = 56.dp

val LocalBottomBarHeight = androidx.compose.runtime.staticCompositionLocalOf<Dp> { bottomBarHeight }

Expand Down Expand Up @@ -255,8 +254,9 @@ fun NavigationSuiteScaffold2(
modifier =
Modifier
.align(Alignment.TopCenter)
.fillMaxWidth()
.alpha(DisabledAlpha),
.fillMaxWidth(),
color = FlareDividerDefaults.color,
thickness = FlareDividerDefaults.thickness,
)
Row(
modifier =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ import dev.dimension.flare.ui.model.onError
import dev.dimension.flare.ui.model.onLoading
import dev.dimension.flare.ui.model.onSuccess
import dev.dimension.flare.ui.screen.status.statusTranslatePresenter
import dev.dimension.flare.ui.theme.DisabledAlpha
import dev.dimension.flare.ui.theme.MediumAlpha
import kotlinx.collections.immutable.ImmutableList

Expand Down Expand Up @@ -340,8 +339,8 @@ private fun StatusQuoteComponent(
modifier =
modifier
.border(
1.dp,
color = DividerDefaults.color.copy(alpha = DisabledAlpha),
FlareDividerDefaults.thickness,
color = FlareDividerDefaults.color,
shape = MaterialTheme.shapes.medium,
).clip(
shape = MaterialTheme.shapes.medium,
Expand Down Expand Up @@ -852,8 +851,8 @@ private fun ExpandedCard(
modifier =
modifier
.border(
1.dp,
color = DividerDefaults.color.copy(alpha = DisabledAlpha),
FlareDividerDefaults.thickness,
color = FlareDividerDefaults.color,
shape = MaterialTheme.shapes.medium,
).clip(
shape = MaterialTheme.shapes.medium,
Expand Down Expand Up @@ -904,8 +903,8 @@ fun CompatCard(
modifier =
modifier
.border(
1.dp,
color = DividerDefaults.color.copy(alpha = DisabledAlpha),
FlareDividerDefaults.thickness,
color = FlareDividerDefaults.color,
shape = MaterialTheme.shapes.medium,
).clip(
shape = MaterialTheme.shapes.medium,
Expand Down Expand Up @@ -944,3 +943,11 @@ fun CompatCard(
}
}
}

internal object FlareDividerDefaults {
val color: Color
@Composable
get() = DividerDefaults.color.copy(alpha = 0.87f)

val thickness = 0.8.dp
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ internal fun LazyStaggeredGridScope.status(
)
if (it != itemCount - 1) {
HorizontalDivider(
modifier = Modifier.alpha(DisabledAlpha),
color = FlareDividerDefaults.color,
thickness = FlareDividerDefaults.thickness,
)
}
}
Expand Down

0 comments on commit 52cbbb8

Please sign in to comment.