-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvement
: Add elevation to top bar (#383)
Co-authored-by: Martin Felber <[email protected]>
- Loading branch information
1 parent
9103a87
commit 36c87d9
Showing
22 changed files
with
146 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...main/kotlin/de/tum/informatics/www1/artemis/native_app/core/ui/common/ArtemisTopAppBar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package de.tum.informatics.www1.artemis.native_app.core.ui.common | ||
|
||
import androidx.compose.foundation.layout.RowScope | ||
import androidx.compose.foundation.layout.WindowInsets | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.material3.TopAppBar | ||
import androidx.compose.material3.TopAppBarColors | ||
import androidx.compose.material3.TopAppBarDefaults | ||
import androidx.compose.material3.TopAppBarScrollBehavior | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import de.tum.informatics.www1.artemis.native_app.core.ui.Spacings | ||
|
||
@Composable | ||
fun ArtemisTopAppBar( | ||
modifier: Modifier = Modifier, | ||
title: @Composable () -> Unit, | ||
navigationIcon: @Composable () -> Unit = {}, | ||
actions: @Composable RowScope.() -> Unit = {}, | ||
windowInsets: WindowInsets = TopAppBarDefaults.windowInsets, | ||
scrollBehavior: TopAppBarScrollBehavior? = null, | ||
colors: TopAppBarColors = TopAppBarDefaults.topAppBarColors( | ||
containerColor = MaterialTheme.colorScheme.surfaceContainer, | ||
) | ||
) { | ||
Surface( | ||
shadowElevation = Spacings.AppBarElevation, | ||
) { | ||
TopAppBar( | ||
title = title, | ||
modifier = modifier, | ||
navigationIcon = navigationIcon, | ||
actions = actions, | ||
windowInsets = windowInsets, | ||
colors = colors, | ||
scrollBehavior = scrollBehavior | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.