Merge remote-tracking branch 'origin/main' into claude/design-system-extraction-c49naf
This commit is contained in:
commit
af330d081f
@ -224,24 +224,38 @@ fun ColumnBrowser(
|
||||
}
|
||||
// Reader view: the page has the whole screen, and one button, at the edge the
|
||||
// columns went to, brings them back as they were.
|
||||
AnimatedVisibility(
|
||||
ShowColumnsButton(
|
||||
visible = hidden,
|
||||
enter = scaleIn() + fadeIn(),
|
||||
exit = scaleOut() + fadeOut(),
|
||||
onShow = { settings.update { it.copy(columnsHidden = false) } },
|
||||
modifier = Modifier
|
||||
.align(Alignment.BottomStart)
|
||||
.navigationBarsPadding()
|
||||
.padding(16.dp),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Brings the columns back from reader view.
|
||||
*
|
||||
* In its own composable because the Box it is placed in sits inside the browser's Row: with
|
||||
* RowScope still an implicit receiver there, `AnimatedVisibility` resolves to the row overload,
|
||||
* which takes no alignment and does not compile. A function of its own has only its own scope.
|
||||
*/
|
||||
@Composable
|
||||
private fun ShowColumnsButton(visible: Boolean, onShow: () -> Unit, modifier: Modifier = Modifier) {
|
||||
AnimatedVisibility(
|
||||
visible = visible,
|
||||
enter = scaleIn() + fadeIn(),
|
||||
exit = scaleOut() + fadeOut(),
|
||||
modifier = modifier,
|
||||
) {
|
||||
SmallFloatingActionButton(
|
||||
onClick = { settings.update { it.copy(columnsHidden = false) } },
|
||||
) {
|
||||
SmallFloatingActionButton(onClick = onShow) {
|
||||
Icon(Icons.Default.Menu, stringResource(R.string.show_columns))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Folds the columns away so the page has the whole screen (reader view). */
|
||||
@Composable
|
||||
|
||||
Loading…
Reference in New Issue
Block a user