home: Nudge the logo below the text baseline
On one baseline the glyph looked like it was sinking into the title; 1dp lower matches how the launcher icon sits next to text. Closes #11
This commit is contained in:
parent
9ca65c121b
commit
4af904bf2a
1 changed files with 6 additions and 10 deletions
|
|
@ -152,9 +152,8 @@ fun HomeScreen(viewModel: AppViewModel = androidx.lifecycle.viewmodel.compose.vi
|
|||
},
|
||||
) {
|
||||
Column {
|
||||
// Persistent top bar: logo/title left, account button right.
|
||||
// Persistent top bar: logo/title left, account indicator right.
|
||||
TopBar(
|
||||
onAccountClick = { drawerOpen = !drawerOpen },
|
||||
profile = userProfile,
|
||||
)
|
||||
androidx.compose.runtime.key(epoch) {
|
||||
|
|
@ -279,13 +278,11 @@ private fun Destination.icon(): ImageVector =
|
|||
*/
|
||||
@Composable
|
||||
private fun TopBar(
|
||||
onAccountClick: () -> Unit,
|
||||
profile: PeerTubeRepository.UserProfile?,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
Row(
|
||||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
.padding(start = 24.dp, end = 24.dp, top = 16.dp, bottom = 8.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
|
|
@ -297,7 +294,7 @@ private fun TopBar(
|
|||
Box(
|
||||
modifier = Modifier
|
||||
.align(Alignment.Bottom)
|
||||
.padding(bottom = 17.dp) // slightly below the text baseline
|
||||
.padding(bottom = 16.dp) // sit the logo a touch below the text baseline
|
||||
.size(32.dp) // match the avatar row so both headers align
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(Color(0xFF101010)),
|
||||
|
|
@ -320,11 +317,10 @@ private fun TopBar(
|
|||
style = androidx.compose.material3.MaterialTheme.typography.titleLarge,
|
||||
)
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
// Account indicator: avatar + display name. Purely visual on TV (D-pad
|
||||
// focus and activation stay in the content/drawer); a click (mouse/touch)
|
||||
// still opens the menu drawer.
|
||||
// Account indicator: avatar + display name. Purely visual — TV focus and
|
||||
// activation stay in the content/drawer (issue #7's "all the way up"
|
||||
// surprise must not return); the drawer is reached via the LEFT edge.
|
||||
Row(
|
||||
modifier = Modifier.clickable(onClick = onAccountClick),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = androidx.compose.foundation.layout.Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue