fix: 多选时顶部应用栏颜色与折叠颜色不统一
This commit is contained in:
parent
d0acd1448e
commit
6e5312658f
2 changed files with 8 additions and 4 deletions
|
|
@ -34,7 +34,7 @@ android {
|
|||
applicationId = "cn.super12138.todo"
|
||||
minSdk = 24
|
||||
targetSdk = 36
|
||||
versionCode = 658
|
||||
versionCode = 659
|
||||
versionName = "2.1.2"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ import androidx.compose.material.icons.outlined.Settings
|
|||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TopAppBar
|
||||
import androidx.compose.material3.TopAppBarDefaults
|
||||
|
|
@ -50,7 +49,11 @@ fun TodoTopAppBar(
|
|||
) {
|
||||
val view = LocalView.current
|
||||
val animatedTopAppBarColors by animateColorAsState(
|
||||
targetValue = if (selectedMode) MaterialTheme.colorScheme.surfaceContainerHighest else MaterialTheme.colorScheme.surface
|
||||
targetValue = if (selectedMode) {
|
||||
TopAppBarDefaults.topAppBarColors().scrolledContainerColor
|
||||
} else {
|
||||
TopAppBarDefaults.topAppBarColors().containerColor
|
||||
}
|
||||
)
|
||||
|
||||
TopAppBar(
|
||||
|
|
@ -157,7 +160,8 @@ fun TodoTopAppBar(
|
|||
},
|
||||
colors = TopAppBarDefaults.topAppBarColors().copy(
|
||||
containerColor = animatedTopAppBarColors
|
||||
)
|
||||
),
|
||||
modifier = modifier
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue