mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-06-26 15:13:00 +00:00
Add colors for Compose scrollbars
This commit is contained in:
parent
43bbddcc26
commit
c0388d948b
@ -25,6 +25,7 @@ import org.schabi.newpipe.extractor.stream.StreamInfoItem
|
|||||||
import org.schabi.newpipe.info_list.ItemViewMode
|
import org.schabi.newpipe.info_list.ItemViewMode
|
||||||
import org.schabi.newpipe.ui.components.items.playlist.PlaylistListItem
|
import org.schabi.newpipe.ui.components.items.playlist.PlaylistListItem
|
||||||
import org.schabi.newpipe.ui.components.items.stream.StreamListItem
|
import org.schabi.newpipe.ui.components.items.stream.StreamListItem
|
||||||
|
import org.schabi.newpipe.ui.theme.NewPipeScrollbarSettings
|
||||||
import org.schabi.newpipe.util.DependentPreferenceHelper
|
import org.schabi.newpipe.util.DependentPreferenceHelper
|
||||||
import org.schabi.newpipe.util.NavigationHelper
|
import org.schabi.newpipe.util.NavigationHelper
|
||||||
|
|
||||||
@ -72,7 +73,7 @@ fun ItemList(
|
|||||||
} else {
|
} else {
|
||||||
val state = rememberLazyListState()
|
val state = rememberLazyListState()
|
||||||
|
|
||||||
LazyColumnScrollbar(state = state) {
|
LazyColumnScrollbar(state = state, settings = NewPipeScrollbarSettings) {
|
||||||
LazyColumn(modifier = nestedScrollModifier, state = state) {
|
LazyColumn(modifier = nestedScrollModifier, state = state) {
|
||||||
listHeader()
|
listHeader()
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import androidx.compose.runtime.Composable
|
|||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
|
import my.nanihadesuka.compose.ScrollbarSettings
|
||||||
|
|
||||||
private val lightScheme = lightColorScheme(
|
private val lightScheme = lightColorScheme(
|
||||||
primary = primaryLight,
|
primary = primaryLight,
|
||||||
@ -87,6 +88,11 @@ private val darkScheme = darkColorScheme(
|
|||||||
|
|
||||||
private val blackScheme = darkScheme.copy(surface = Color.Black)
|
private val blackScheme = darkScheme.copy(surface = Color.Black)
|
||||||
|
|
||||||
|
val NewPipeScrollbarSettings = ScrollbarSettings(
|
||||||
|
thumbSelectedColor = primaryDark,
|
||||||
|
thumbUnselectedColor = primaryLight
|
||||||
|
)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun AppTheme(useDarkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) {
|
fun AppTheme(useDarkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) {
|
||||||
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(LocalContext.current)
|
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(LocalContext.current)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user