Skip to content

Commit

Permalink
app: Change the ShadowColor of the SuperPopup
Browse files Browse the repository at this point in the history
  • Loading branch information
YuKongA committed Jan 11, 2025
1 parent 9008f6a commit 0422d0b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions composeApp/src/commonMain/kotlin/ui/components/SuperPopup.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.runtime.setValue
import androidx.compose.ui.AbsoluteAlignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.TransformOrigin
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.input.pointer.pointerInput
Expand Down Expand Up @@ -123,9 +122,7 @@ fun SuperPopup(
}

if (show.value) {
val dropdownElevation by rememberUpdatedState(with(density) {
11.dp.toPx()
})
val dropdownElevation by rememberUpdatedState(with(density) { 22.dp.toPx() })
showOwnPopup(
transformOrigin = { transformOrigin }
) {
Expand Down Expand Up @@ -164,8 +161,8 @@ fun SuperPopup(
clip = true,
shape = SmoothRoundedCornerShape(16.dp),
shadowElevation = dropdownElevation,
ambientShadowColor = Color.Black.copy(alpha = 0.3f),
spotShadowColor = Color.Black.copy(alpha = 0.3f)
ambientShadowColor = MiuixTheme.colorScheme.windowDimming,
spotShadowColor = MiuixTheme.colorScheme.windowDimming
)
.background(MiuixTheme.colorScheme.surface)
) {
Expand Down

0 comments on commit 0422d0b

Please sign in to comment.