@@ -24,6 +24,7 @@ import androidx.compose.foundation.layout.WindowInsets
2424import androidx.compose.foundation.layout.WindowInsetsSides
2525import androidx.compose.foundation.layout.aspectRatio
2626import androidx.compose.foundation.layout.consumeWindowInsets
27+ import androidx.compose.foundation.layout.displayCutout
2728import androidx.compose.foundation.layout.fillMaxHeight
2829import androidx.compose.foundation.layout.fillMaxSize
2930import androidx.compose.foundation.layout.fillMaxWidth
@@ -35,6 +36,8 @@ import androidx.compose.foundation.layout.padding
3536import androidx.compose.foundation.layout.requiredSize
3637import androidx.compose.foundation.layout.safeDrawing
3738import androidx.compose.foundation.layout.size
39+ import androidx.compose.foundation.layout.statusBars
40+ import androidx.compose.foundation.layout.union
3841import androidx.compose.foundation.layout.width
3942import androidx.compose.foundation.layout.windowInsetsPadding
4043import androidx.compose.foundation.lazy.LazyColumn
@@ -217,7 +220,7 @@ fun Dashboard(
217220 .padding(horizontal = 16 .dp, vertical = 16 .dp),
218221 text = stringResource(id = R .string.title_projects),
219222 color = MaterialTheme .colorScheme.onSurface,
220- style = MaterialTheme .typography.titleLarge
223+ style = MaterialTheme .typography.labelLarge
221224 )
222225 }
223226 items(
@@ -276,7 +279,7 @@ fun Dashboard(
276279 type = key.type,
277280 onCreateKey = {
278281 missingKey = null
279-
282+
280283 viewModel.createKey(
281284 project = key.project,
282285 type = key.type,
@@ -296,49 +299,52 @@ fun Dashboard(
296299 ShowDownloadingDevelopmentKeysDialog ()
297300 }
298301 }
302+ val innerPadding = WindowInsets .displayCutout.union(WindowInsets .statusBars)
299303 Surface (
300- modifier = with ( Modifier ) {
301- offset(y = ( 56 .dp) )
302- .padding(
303- start = 16 .dp,
304- top = when {
305- isLargeScreen -> 32 .dp
306- else -> 56 .dp
307- }
308- )
309- .border(
310- border = BorderStroke ( 3 .dp, color = MaterialTheme .colorScheme.onPrimary),
311- shape = CircleShape
312- )
313- .height( UserAppBarImageSize )
314- .aspectRatio( 1.0f )
315- .shadow(
316- elevation = 4 .dp,
317- shape = CircleShape
318- )
319- } ,
304+ modifier = Modifier
305+ .windowInsetsPadding(innerPadding )
306+ .offset(y = 16 .dp)
307+ .padding(
308+ start = 16 .dp,
309+ top = when {
310+ isLargeScreen -> 32 .dp
311+ else -> 56 .dp
312+ }
313+ )
314+ . border(
315+ border = BorderStroke ( 3 .dp, color = MaterialTheme .colorScheme.onPrimary),
316+ shape = CircleShape
317+ )
318+ .height( UserAppBarImageSize )
319+ .aspectRatio( 1.0f )
320+ .shadow(
321+ elevation = 4 .dp,
322+ shape = CircleShape
323+ ) ,
320324 shape = CircleShape ,
321325 ) {
322326 Image (
323327 painter = rememberAsyncImagePainter(
324328 ImageRequest .Builder (LocalContext .current).data(data = user.photo?.let { photo ->
325329 when {
326330 photo.isNotBlank() -> photo
327- else -> Image (
328- modifier = Modifier .border(
329- border = BorderStroke (
330- 10 .dp,
331- color = MaterialTheme .colorScheme.surface.copy(0.6f )
332- )
333- ),
334- imageVector = Icons .Filled .AccountCircle ,
335- contentDescription = null ,
336- colorFilter = ColorFilter .tint(
337- MaterialTheme .colorScheme.onSurface.copy(
338- 0.6f
331+ else -> {
332+ Image (
333+ modifier = Modifier .border(
334+ border = BorderStroke (
335+ 10 .dp,
336+ color = MaterialTheme .colorScheme.surface.copy(0.6f )
337+ )
338+ ),
339+ imageVector = Icons .Filled .AccountCircle ,
340+ contentDescription = null ,
341+ colorFilter = ColorFilter .tint(
342+ MaterialTheme .colorScheme.onSurface.copy(
343+ 0.6f
344+ )
339345 )
340346 )
341- )
347+ }
342348 }
343349 } ? : Image (
344350 modifier = Modifier .border(
0 commit comments