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