Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ class T3WorkspaceNavigationView(
},
) {
val fraction = progress.coerceIn(0f, 1f)
val railShape = RoundedCornerShape(topEnd = 16.dp * fraction, bottomEnd = 16.dp * fraction)
if (fraction > 0f) {
Scrim(
contentDescription = "Close navigation rail",
Expand All @@ -295,8 +296,8 @@ class T3WorkspaceNavigationView(
Modifier
.fillMaxHeight()
.width(lerp(RAIL_WIDTH, EXPANDED_RAIL_WIDTH, progress.coerceAtLeast(0f)))
.shadow(RAIL_SHADOW * fraction, RAIL_EXPANDED_SHAPE, clip = false)
.background(Color(containerColor), RAIL_EXPANDED_SHAPE)
.shadow(RAIL_SHADOW * fraction, railShape, clip = false)
.background(Color(containerColor), railShape)
.padding(top = safeAreaTop.dp, bottom = safeAreaBottom.dp + 12.dp)
.selectableGroup(),
) {
Expand Down Expand Up @@ -437,7 +438,6 @@ class T3WorkspaceNavigationView(
val FAB_SIZE = 48.dp
val ICON_SIZE = 24.dp
val RAIL_SHADOW = 6.dp
val RAIL_EXPANDED_SHAPE = RoundedCornerShape(topEnd = 16.dp, bottomEnd = 16.dp)
const val DISABLED_ALPHA = 0.4f

// Labels fade in over the second half of the widening, once there is room for them, and
Expand Down
Loading