diff --git a/app/src/main/kotlin/at/bitfire/davdroid/ui/account/CollectionsList.kt b/app/src/main/kotlin/at/bitfire/davdroid/ui/account/CollectionsList.kt index 07eecba77..e9b439dac 100644 --- a/app/src/main/kotlin/at/bitfire/davdroid/ui/account/CollectionsList.kt +++ b/app/src/main/kotlin/at/bitfire/davdroid/ui/account/CollectionsList.kt @@ -29,6 +29,7 @@ import androidx.compose.material.icons.filled.Contacts import androidx.compose.material.icons.filled.RemoveCircle import androidx.compose.material.icons.filled.Task import androidx.compose.material.icons.filled.Today +import androidx.compose.material3.CardDefaults import androidx.compose.material3.ElevatedCard import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -112,7 +113,9 @@ fun CollectionList_Item( modifier = modifier.clickable(onClick = onShowDetails) ElevatedCard( - modifier = modifier + colors = CardDefaults.elevatedCardColors( + containerColor = MaterialTheme.colorScheme.surfaceContainer + ) ) { Row(Modifier.height(IntrinsicSize.Max)) { Box( diff --git a/app/src/main/kotlin/at/bitfire/davdroid/ui/webdav/WebdavMountsScreen.kt b/app/src/main/kotlin/at/bitfire/davdroid/ui/webdav/WebdavMountsScreen.kt index e847298f9..391aa0e56 100644 --- a/app/src/main/kotlin/at/bitfire/davdroid/ui/webdav/WebdavMountsScreen.kt +++ b/app/src/main/kotlin/at/bitfire/davdroid/ui/webdav/WebdavMountsScreen.kt @@ -29,7 +29,8 @@ import androidx.compose.material.icons.filled.Add import androidx.compose.material.icons.filled.Delete import androidx.compose.material3.AlertDialog import androidx.compose.material3.Button -import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.ElevatedCard import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon @@ -174,7 +175,7 @@ fun WebdavMountsScreen( Spacer(Modifier.height(4.dp)) LazyColumn( - verticalArrangement = Arrangement.spacedBy(8.dp), + verticalArrangement = Arrangement.spacedBy(12.dp), modifier = Modifier .fillMaxSize() .padding(8.dp) @@ -253,8 +254,10 @@ fun WebdavMountsItem( ) } - Card( - modifier = Modifier.fillMaxWidth() + ElevatedCard( + colors = CardDefaults.elevatedCardColors( + containerColor = MaterialTheme.colorScheme.surfaceContainer + ) ) { Column( modifier = Modifier @@ -349,33 +352,59 @@ fun WebdavMountsItem( @Composable @Preview fun WebdavMountsScreen_Preview_Empty() { - WebdavMountsScreen( - mountInfos = emptyList(), - refreshingQuota = false - ) + AppTheme { + WebdavMountsScreen( + mountInfos = emptyList(), + refreshingQuota = false + ) + } } @Composable @Preview fun WebdavMountsScreen_Preview_TwoMounts() { - WebdavMountsScreen( - mountInfos = listOf( - WebDavMountWithQuota( - mount = WebDavMount( - id = 0, - name = "Preview Webdav Mount 1", - url = HttpUrl.Builder() - .scheme("https") - .host("example.com") - .build() + AppTheme { + WebdavMountsScreen( + mountInfos = listOf( + WebDavMountWithQuota( + mount = WebDavMount( + id = 0, + name = "Preview Webdav Mount 1", + url = HttpUrl.Builder() + .scheme("https") + .host("example.com") + .build() + ), + quotaAvailable = 1024 * 1024 * 1024, + quotaUsed = 512 * 1024 * 1024 ), - quotaAvailable = 1024 * 1024 * 1024, - quotaUsed = 512 * 1024 * 1024 + WebDavMountWithQuota( + mount = WebDavMount( + id = 1, + name = "Preview Webdav Mount 2", + url = HttpUrl.Builder() + .scheme("https") + .host("example.com") + .build() + ), + quotaAvailable = 1024 * 1024 * 1024, + quotaUsed = 512 * 1024 * 1024 + ) ), - WebDavMountWithQuota( + refreshingQuota = true + ) + } +} + +@Composable +@Preview +fun WebdavMountsItem_Preview() { + AppTheme { + WebdavMountsItem( + info = WebDavMountWithQuota( mount = WebDavMount( - id = 1, - name = "Preview Webdav Mount 2", + id = 0, + name = "Preview Webdav Mount", url = HttpUrl.Builder() .scheme("https") .host("example.com") @@ -384,28 +413,8 @@ fun WebdavMountsScreen_Preview_TwoMounts() { quotaAvailable = 1024 * 1024 * 1024, quotaUsed = 512 * 1024 * 1024 ) - ), - refreshingQuota = true - ) -} - -@Composable -@Preview -fun WebdavMountsItem_Preview() { - WebdavMountsItem( - info = WebDavMountWithQuota( - mount = WebDavMount( - id = 0, - name = "Preview Webdav Mount", - url = HttpUrl.Builder() - .scheme("https") - .host("example.com") - .build() - ), - quotaAvailable = 1024 * 1024 * 1024, - quotaUsed = 512 * 1024 * 1024 ) - ) + } } diff --git a/app/src/ose/kotlin/at/bitfire/davdroid/ui/ThemeColors.kt b/app/src/ose/kotlin/at/bitfire/davdroid/ui/ThemeColors.kt index f4f9cb4d6..9e6d25051 100644 --- a/app/src/ose/kotlin/at/bitfire/davdroid/ui/ThemeColors.kt +++ b/app/src/ose/kotlin/at/bitfire/davdroid/ui/ThemeColors.kt @@ -81,7 +81,7 @@ object M3ColorScheme { val surfaceBrightDark = Color(0xFF4d4d4d) val surfaceContainerLowestDark = Color(0xFF141414) val surfaceContainerLowDark = Color(0xFF1f1f1f) - val surfaceContainerDark = Color(0xFFf5f5f5) + val surfaceContainerDark = Color(0xff3a3a3a) val surfaceContainerHighDark = Color(0xFF383838) val surfaceContainerHighestDark = Color(0xFF434343)