-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude top bar insets for home screen (#1401)
* Exclude top bar insets for home screen * Update screenshot specifications * Correct preview test name * Rename screenshots --------- Co-authored-by: Ashley Davies <[email protected]>
- Loading branch information
Showing
18 changed files
with
128 additions
and
113 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
7 changes: 3 additions & 4 deletions
7
conferences-app/src/commonMain/composeResources/values/strings.xml
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
35 changes: 35 additions & 0 deletions
35
conferences-app/src/commonMain/kotlin/io/ashdavies/party/events/EventsTopBar.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,35 @@ | ||
package io.ashdavies.party.events | ||
|
||
import androidx.compose.foundation.layout.RowScope | ||
import androidx.compose.material3.CenterAlignedTopAppBar | ||
import androidx.compose.material3.ExperimentalMaterial3Api | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Text | ||
import androidx.compose.material3.TopAppBarDefaults | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import org.jetbrains.compose.resources.StringResource | ||
import org.jetbrains.compose.resources.stringResource | ||
|
||
@Composable | ||
@OptIn(ExperimentalMaterial3Api::class) | ||
internal fun EventsTopBar( | ||
title: StringResource, | ||
actions: @Composable RowScope.() -> Unit, | ||
modifier: Modifier = Modifier, | ||
) { | ||
CenterAlignedTopAppBar( | ||
title = { | ||
Text( | ||
text = stringResource(title), | ||
color = MaterialTheme.colorScheme.onBackground, | ||
style = MaterialTheme.typography.titleLarge, | ||
) | ||
}, | ||
modifier = modifier, | ||
colors = TopAppBarDefaults.centerAlignedTopAppBarColors( | ||
containerColor = MaterialTheme.colorScheme.background, | ||
), | ||
actions = actions, | ||
) | ||
} |
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
Binary file modified
BIN
-34.6 KB
(0.19%)
.../io/ashdavies/party/events/EventsListTests/EventsListPreview_Day_839dc042_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-38.9 KB
(0.17%)
...o/ashdavies/party/events/EventsListTests/EventsListPreview_Night_a6299619_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+68 Bytes
...ashdavies/party/events/EventsTopBarTests/EventsTopBarPreview_Day_839dc042_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+68 Bytes
...hdavies/party/events/EventsTopBarTests/EventsTopBarPreview_Night_a6299619_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file removed
BIN
-9.43 KB
...io/ashdavies/party/home/HomeScreenTests/HomeTopAppBarPreview_Day_839dc042_0.png
Binary file not shown.
Binary file removed
BIN
-9.43 KB
.../ashdavies/party/home/HomeScreenTests/HomeTopAppBarPreview_Night_a6299619_0.png
Binary file not shown.
Oops, something went wrong.