Fix clock disappearing when fill screen height is disabled

This commit is contained in:
MM20
2024-01-28 23:05:01 +01:00
parent 33eff8499e
commit 837cd63191
3 changed files with 4 additions and 1 deletions
@@ -495,6 +495,7 @@ fun PagerScaffold(
.then(clockHeight?.let { Modifier.height(it) } ?: Modifier)
.padding(bottom = clockPadding),
editMode = isWidgetEditMode,
fillScreenHeight = fillClockHeight,
)
WidgetColumn(
@@ -472,6 +472,7 @@ fun PullDownScaffold(
.then(clockHeight?.let { Modifier.height(it) } ?: Modifier)
.padding(bottom = clockPadding),
editMode = isWidgetEditMode,
fillScreenHeight = fillClockHeight,
)
WidgetColumn(
@@ -82,6 +82,7 @@ import de.mm20.launcher2.ui.settings.clockwidget.ClockWidgetSettingsScreenVM
@Composable
fun ClockWidget(
modifier: Modifier = Modifier,
fillScreenHeight: Boolean,
editMode: Boolean = false,
) {
val viewModel: ClockWidgetVM = viewModel()
@@ -153,7 +154,7 @@ fun ClockWidget(
Column(modifier = modifier) {
Box(
modifier = Modifier
.weight(1f)
.then(if(fillScreenHeight) Modifier.weight(1f) else Modifier)
.fillMaxWidth(),
contentAlignment = when (alignment) {
ClockWidgetAlignment.Center -> Alignment.Center