Fix tablet manga screen column ratios

Matches previous stable design. Related to #7401
This commit is contained in:
arkon 2022-07-16 20:41:13 -04:00
parent f6f5b6aeab
commit 3192d47837

View File

@ -20,6 +20,7 @@ import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.only import androidx.compose.foundation.layout.only
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBars import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.lazy.LazyListScope import androidx.compose.foundation.lazy.LazyListScope
import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.lazy.rememberLazyListState
@ -47,6 +48,7 @@ import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalHapticFeedback import androidx.compose.ui.platform.LocalHapticFeedback
import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.platform.LocalLayoutDirection
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.google.accompanist.swiperefresh.SwipeRefresh import com.google.accompanist.swiperefresh.SwipeRefresh
import com.google.accompanist.swiperefresh.rememberSwipeRefreshState import com.google.accompanist.swiperefresh.rememberSwipeRefreshState
import eu.kanade.domain.chapter.model.Chapter import eu.kanade.domain.chapter.model.Chapter
@ -518,7 +520,7 @@ fun MangaScreenLargeImpl(
WindowInsets.navigationBars.only(WindowInsetsSides.Bottom).asPaddingValues() WindowInsets.navigationBars.only(WindowInsetsSides.Bottom).asPaddingValues()
Column( Column(
modifier = Modifier modifier = Modifier
.weight(1f) .widthIn(max = 450.dp)
.verticalScroll(rememberScrollState()) .verticalScroll(rememberScrollState())
.padding(bottom = withNavBarContentPadding.calculateBottomPadding()), .padding(bottom = withNavBarContentPadding.calculateBottomPadding()),
) { ) {
@ -551,10 +553,9 @@ fun MangaScreenLargeImpl(
) )
} }
val chaptersWeight = if (windowWidthSizeClass == WindowWidthSizeClass.Medium) 1f else 2f
VerticalFastScroller( VerticalFastScroller(
listState = chapterListState, listState = chapterListState,
modifier = Modifier.weight(chaptersWeight), modifier = Modifier.weight(1f),
topContentPadding = withNavBarContentPadding.calculateTopPadding(), topContentPadding = withNavBarContentPadding.calculateTopPadding(),
endContentPadding = withNavBarContentPadding.calculateEndPadding(layoutDirection), endContentPadding = withNavBarContentPadding.calculateEndPadding(layoutDirection),
) { ) {