mirror of
https://github.com/amir1376/ab-download-manager.git
synced 2025-02-20 11:43:24 +08:00
add scrollbar to settings
This commit is contained in:
parent
a901ff9d21
commit
0a13a72287
@ -23,6 +23,7 @@ import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import kotlinx.coroutines.channels.ticker
|
||||
|
||||
@Composable
|
||||
private fun SideBar(
|
||||
@ -114,9 +115,12 @@ fun SettingsPage(
|
||||
sideBarWidth = (sideBarWidth + it).coerceIn(150.dp..300.dp)
|
||||
}
|
||||
AnimatedContent(currentConfigurables) { configurables ->
|
||||
val scrollState = rememberScrollState()
|
||||
val scrollbarAdapter = rememberScrollbarAdapter(scrollState)
|
||||
Box {
|
||||
Column(
|
||||
Modifier
|
||||
.verticalScroll(rememberScrollState())
|
||||
.verticalScroll(scrollState)
|
||||
.padding(16.dp)
|
||||
) {
|
||||
for (cfg in configurables) {
|
||||
@ -131,6 +135,14 @@ fun SettingsPage(
|
||||
// Divider()
|
||||
}
|
||||
}
|
||||
VerticalScrollbar(
|
||||
adapter = scrollbarAdapter,
|
||||
modifier = Modifier
|
||||
.align(Alignment.CenterEnd)
|
||||
.padding(vertical = 16.dp)
|
||||
.padding(end = 2.dp),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user