Merge pull request #503 from dmnyc/fix/drawer-item-spacing
fix: reduce drawer menu item spacing
This commit is contained in:
@@ -400,28 +400,28 @@ fun WispDrawerContent(
|
|||||||
label = { Text(stringResource(R.string.drawer_my_profile)) },
|
label = { Text(stringResource(R.string.drawer_my_profile)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onProfile,
|
onClick = onProfile,
|
||||||
modifier = Modifier.padding(horizontal = 12.dp)
|
modifier = Modifier.height(48.dp).padding(horizontal = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.Home, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.Home, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.drawer_feeds)) },
|
label = { Text(stringResource(R.string.drawer_feeds)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onFeed,
|
onClick = onFeed,
|
||||||
modifier = Modifier.padding(horizontal = 12.dp)
|
modifier = Modifier.height(48.dp).padding(horizontal = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.Search, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.Search, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.title_search)) },
|
label = { Text(stringResource(R.string.title_search)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onSearch,
|
onClick = onSearch,
|
||||||
modifier = Modifier.padding(horizontal = 12.dp)
|
modifier = Modifier.height(48.dp).padding(horizontal = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.Email, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.Email, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.nav_messages)) },
|
label = { Text(stringResource(R.string.nav_messages)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onMessages,
|
onClick = onMessages,
|
||||||
modifier = Modifier.padding(horizontal = 12.dp)
|
modifier = Modifier.height(48.dp).padding(horizontal = 12.dp)
|
||||||
)
|
)
|
||||||
val useZapBolt = com.wisp.app.ui.util.useBoltIcon()
|
val useZapBolt = com.wisp.app.ui.util.useBoltIcon()
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
@@ -439,21 +439,21 @@ fun WispDrawerContent(
|
|||||||
label = { Text(stringResource(R.string.nav_wallet)) },
|
label = { Text(stringResource(R.string.nav_wallet)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onWallet,
|
onClick = onWallet,
|
||||||
modifier = Modifier.padding(horizontal = 12.dp)
|
modifier = Modifier.height(48.dp).padding(horizontal = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.FormatListBulleted, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.FormatListBulleted, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.drawer_lists)) },
|
label = { Text(stringResource(R.string.drawer_lists)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onLists,
|
onClick = onLists,
|
||||||
modifier = Modifier.padding(horizontal = 12.dp)
|
modifier = Modifier.height(48.dp).padding(horizontal = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.Edit, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.Edit, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.drawer_drafts)) },
|
label = { Text(stringResource(R.string.drawer_drafts)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onDrafts,
|
onClick = onDrafts,
|
||||||
modifier = Modifier.padding(horizontal = 12.dp)
|
modifier = Modifier.height(48.dp).padding(horizontal = 12.dp)
|
||||||
)
|
)
|
||||||
var settingsExpanded by remember { mutableStateOf(false) }
|
var settingsExpanded by remember { mutableStateOf(false) }
|
||||||
LaunchedEffect(settingsExpanded) {
|
LaunchedEffect(settingsExpanded) {
|
||||||
@@ -474,7 +474,7 @@ fun WispDrawerContent(
|
|||||||
},
|
},
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = { settingsExpanded = !settingsExpanded },
|
onClick = { settingsExpanded = !settingsExpanded },
|
||||||
modifier = Modifier.padding(horizontal = 12.dp)
|
modifier = Modifier.height(48.dp).padding(horizontal = 12.dp)
|
||||||
)
|
)
|
||||||
AnimatedVisibility(visible = settingsExpanded) {
|
AnimatedVisibility(visible = settingsExpanded) {
|
||||||
Column {
|
Column {
|
||||||
@@ -483,70 +483,70 @@ fun WispDrawerContent(
|
|||||||
label = { Text(stringResource(R.string.drawer_interface)) },
|
label = { Text(stringResource(R.string.drawer_interface)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onInterfaceSettings,
|
onClick = onInterfaceSettings,
|
||||||
modifier = Modifier.padding(start = 36.dp, end = 12.dp)
|
modifier = Modifier.height(48.dp).padding(start = 36.dp, end = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.Settings, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.Settings, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.drawer_relays)) },
|
label = { Text(stringResource(R.string.drawer_relays)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onRelaySettings,
|
onClick = onRelaySettings,
|
||||||
modifier = Modifier.padding(start = 36.dp, end = 12.dp)
|
modifier = Modifier.height(48.dp).padding(start = 36.dp, end = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.Cloud, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.Cloud, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.drawer_media_servers)) },
|
label = { Text(stringResource(R.string.drawer_media_servers)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onMediaServers,
|
onClick = onMediaServers,
|
||||||
modifier = Modifier.padding(start = 36.dp, end = 12.dp)
|
modifier = Modifier.height(48.dp).padding(start = 36.dp, end = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.Key, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.Key, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.drawer_keys)) },
|
label = { Text(stringResource(R.string.drawer_keys)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onKeys,
|
onClick = onKeys,
|
||||||
modifier = Modifier.padding(start = 36.dp, end = 12.dp)
|
modifier = Modifier.height(48.dp).padding(start = 36.dp, end = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.Block, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.Block, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.drawer_safety)) },
|
label = { Text(stringResource(R.string.drawer_safety)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onSafety,
|
onClick = onSafety,
|
||||||
modifier = Modifier.padding(start = 36.dp, end = 12.dp)
|
modifier = Modifier.height(48.dp).padding(start = 36.dp, end = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.Shield, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.Shield, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.drawer_proof_of_work)) },
|
label = { Text(stringResource(R.string.drawer_proof_of_work)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onPowSettings,
|
onClick = onPowSettings,
|
||||||
modifier = Modifier.padding(start = 36.dp, end = 12.dp)
|
modifier = Modifier.height(48.dp).padding(start = 36.dp, end = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.Hub, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.Hub, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.drawer_social_graph)) },
|
label = { Text(stringResource(R.string.drawer_social_graph)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onSocialGraph,
|
onClick = onSocialGraph,
|
||||||
modifier = Modifier.padding(start = 36.dp, end = 12.dp)
|
modifier = Modifier.height(48.dp).padding(start = 36.dp, end = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.EmojiEmotions, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.EmojiEmotions, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.drawer_custom_emojis)) },
|
label = { Text(stringResource(R.string.drawer_custom_emojis)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onCustomEmojis,
|
onClick = onCustomEmojis,
|
||||||
modifier = Modifier.padding(start = 36.dp, end = 12.dp)
|
modifier = Modifier.height(48.dp).padding(start = 36.dp, end = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.FavoriteBorder, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.FavoriteBorder, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.drawer_relay_health)) },
|
label = { Text(stringResource(R.string.drawer_relay_health)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onRelayHealth,
|
onClick = onRelayHealth,
|
||||||
modifier = Modifier.padding(start = 36.dp, end = 12.dp)
|
modifier = Modifier.height(48.dp).padding(start = 36.dp, end = 12.dp)
|
||||||
)
|
)
|
||||||
NavigationDrawerItem(
|
NavigationDrawerItem(
|
||||||
icon = { Icon(Icons.Outlined.BugReport, contentDescription = null) },
|
icon = { Icon(Icons.Outlined.BugReport, contentDescription = null) },
|
||||||
label = { Text(stringResource(R.string.drawer_console)) },
|
label = { Text(stringResource(R.string.drawer_console)) },
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = onConsole,
|
onClick = onConsole,
|
||||||
modifier = Modifier.padding(start = 36.dp, end = 12.dp)
|
modifier = Modifier.height(48.dp).padding(start = 36.dp, end = 12.dp)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -568,7 +568,7 @@ fun WispDrawerContent(
|
|||||||
},
|
},
|
||||||
selected = false,
|
selected = false,
|
||||||
onClick = { showLogoutDialog = true },
|
onClick = { showLogoutDialog = true },
|
||||||
modifier = Modifier.padding(horizontal = 12.dp)
|
modifier = Modifier.height(48.dp).padding(horizontal = 12.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
if (showLogoutDialog) {
|
if (showLogoutDialog) {
|
||||||
|
|||||||
Reference in New Issue
Block a user