mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-18 13:13:01 +00:00
Add scrollbar color scheme
This commit is contained in:
parent
db485c3d77
commit
4c4fe3f511
@ -24,6 +24,7 @@ import androidx.compose.ui.unit.dp
|
|||||||
import my.nanihadesuka.compose.ColumnScrollbar
|
import my.nanihadesuka.compose.ColumnScrollbar
|
||||||
import org.schabi.newpipe.BuildConfig
|
import org.schabi.newpipe.BuildConfig
|
||||||
import org.schabi.newpipe.R
|
import org.schabi.newpipe.R
|
||||||
|
import org.schabi.newpipe.ui.theme.NewPipeScrollbarSettings
|
||||||
import org.schabi.newpipe.util.external_communication.ShareUtils
|
import org.schabi.newpipe.util.external_communication.ShareUtils
|
||||||
|
|
||||||
private val ABOUT_ITEMS = listOf(
|
private val ABOUT_ITEMS = listOf(
|
||||||
@ -58,7 +59,7 @@ private class AboutData(
|
|||||||
fun AboutTab() {
|
fun AboutTab() {
|
||||||
val scrollState = rememberScrollState()
|
val scrollState = rememberScrollState()
|
||||||
|
|
||||||
ColumnScrollbar(state = scrollState) {
|
ColumnScrollbar(state = scrollState, settings = NewPipeScrollbarSettings) {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
@ -15,13 +15,14 @@ import androidx.compose.ui.unit.dp
|
|||||||
import com.mikepenz.aboutlibraries.ui.compose.m3.LibrariesContainer
|
import com.mikepenz.aboutlibraries.ui.compose.m3.LibrariesContainer
|
||||||
import my.nanihadesuka.compose.LazyColumnScrollbar
|
import my.nanihadesuka.compose.LazyColumnScrollbar
|
||||||
import org.schabi.newpipe.R
|
import org.schabi.newpipe.R
|
||||||
|
import org.schabi.newpipe.ui.theme.NewPipeScrollbarSettings
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@NonRestartableComposable
|
@NonRestartableComposable
|
||||||
fun LicenseTab() {
|
fun LicenseTab() {
|
||||||
val lazyListState = rememberLazyListState()
|
val lazyListState = rememberLazyListState()
|
||||||
|
|
||||||
LazyColumnScrollbar(state = lazyListState) {
|
LazyColumnScrollbar(state = lazyListState, settings = NewPipeScrollbarSettings) {
|
||||||
LibrariesContainer(
|
LibrariesContainer(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
@ -5,6 +5,8 @@ import androidx.compose.material3.MaterialTheme
|
|||||||
import androidx.compose.material3.darkColorScheme
|
import androidx.compose.material3.darkColorScheme
|
||||||
import androidx.compose.material3.lightColorScheme
|
import androidx.compose.material3.lightColorScheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import my.nanihadesuka.compose.ScrollbarSettings
|
||||||
|
|
||||||
private val LightColors = lightColorScheme(
|
private val LightColors = lightColorScheme(
|
||||||
primary = md_theme_light_primary,
|
primary = md_theme_light_primary,
|
||||||
@ -70,6 +72,11 @@ private val DarkColors = darkColorScheme(
|
|||||||
scrim = md_theme_dark_scrim,
|
scrim = md_theme_dark_scrim,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val NewPipeScrollbarSettings = ScrollbarSettings(
|
||||||
|
thumbSelectedColor = md_theme_dark_primary,
|
||||||
|
thumbUnselectedColor = Color.Red
|
||||||
|
)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun AppTheme(useDarkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) {
|
fun AppTheme(useDarkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) {
|
||||||
MaterialTheme(
|
MaterialTheme(
|
||||||
|
Loading…
Reference in New Issue
Block a user