Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
style: improve home screen search bar appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed Jan 19, 2024
1 parent 0df127e commit e21a261
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
10 changes: 10 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ fun HomeScreen(
}
) {
MiniPlayerScaffold(topBar = {
CenterAlignedTopAppBar(navigationIcon = {
Row(
verticalAlignment = Alignment.CenterVertically
) {
IconButton(onClick = {
view.playSoundEffect(SoundEffectConstants.CLICK)
scope.launch {
Expand All @@ -101,10 +103,11 @@ fun HomeScreen(
contentDescription = "Open Navigation Drawer"
)
}
}, title = {
Card(
modifier = Modifier
.fillMaxWidth(0.9f)
.fillMaxWidth()
.padding(vertical = 12.dp)
.padding(end = 8.dp)
.clickable {
view.playSoundEffect(SoundEffectConstants.CLICK)
if (currentDestination == Destination.PipedMusic) {
Expand All @@ -113,22 +116,21 @@ fun HomeScreen(
onNavigate(Destination.LocalSearch)
}
},
shape = RoundedCornerShape(50)
shape = RoundedCornerShape(40)
) {
Row(
modifier = Modifier
.fillMaxWidth(),
.fillMaxWidth()
.padding(vertical = 2.dp)
.padding(end = 8.dp),
verticalAlignment = Alignment.CenterVertically
) {
Icon(
modifier = Modifier.size(48.dp),
painter = painterResource(id = R.drawable.ic_launcher_foreground),
contentDescription = null
)
Text(
stringResource(id = R.string.app_name),
color = MaterialTheme.colorScheme.primary
)
Text(stringResource(R.string.search_songs))
Spacer(Modifier.weight(1f))
Icon(
modifier = Modifier.padding(8.dp),
Expand All @@ -137,7 +139,7 @@ fun HomeScreen(
)
}
}
})
}
}) {
val viewModelStoreOwner = LocalViewModelStoreOwner.current!!
NavHost(
Expand Down

0 comments on commit e21a261

Please sign in to comment.