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 {
|
Column {
|
||||||
// Persistent top bar: logo/title left, account button right.
|
// Persistent top bar: logo/title left, account indicator right.
|
||||||
TopBar(
|
TopBar(
|
||||||
onAccountClick = { drawerOpen = !drawerOpen },
|
|
||||||
profile = userProfile,
|
profile = userProfile,
|
||||||
)
|
)
|
||||||
androidx.compose.runtime.key(epoch) {
|
androidx.compose.runtime.key(epoch) {
|
||||||
|
|
@ -279,13 +278,11 @@ private fun Destination.icon(): ImageVector =
|
||||||
*/
|
*/
|
||||||
@Composable
|
@Composable
|
||||||
private fun TopBar(
|
private fun TopBar(
|
||||||
onAccountClick: () -> Unit,
|
|
||||||
profile: PeerTubeRepository.UserProfile?,
|
profile: PeerTubeRepository.UserProfile?,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = modifier
|
modifier = Modifier.fillMaxWidth()
|
||||||
.fillMaxWidth()
|
|
||||||
.padding(start = 24.dp, end = 24.dp, top = 16.dp, bottom = 8.dp),
|
.padding(start = 24.dp, end = 24.dp, top = 16.dp, bottom = 8.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
|
|
@ -297,7 +294,7 @@ private fun TopBar(
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(Alignment.Bottom)
|
.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
|
.size(32.dp) // match the avatar row so both headers align
|
||||||
.clip(RoundedCornerShape(8.dp))
|
.clip(RoundedCornerShape(8.dp))
|
||||||
.background(Color(0xFF101010)),
|
.background(Color(0xFF101010)),
|
||||||
|
|
@ -320,11 +317,10 @@ private fun TopBar(
|
||||||
style = androidx.compose.material3.MaterialTheme.typography.titleLarge,
|
style = androidx.compose.material3.MaterialTheme.typography.titleLarge,
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
// Account indicator: avatar + display name. Purely visual on TV (D-pad
|
// Account indicator: avatar + display name. Purely visual — TV focus and
|
||||||
// focus and activation stay in the content/drawer); a click (mouse/touch)
|
// activation stay in the content/drawer (issue #7's "all the way up"
|
||||||
// still opens the menu drawer.
|
// surprise must not return); the drawer is reached via the LEFT edge.
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.clickable(onClick = onAccountClick),
|
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = androidx.compose.foundation.layout.Arrangement.spacedBy(8.dp),
|
horizontalArrangement = androidx.compose.foundation.layout.Arrangement.spacedBy(8.dp),
|
||||||
) {
|
) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue