diff --git a/feature/agenda/src/main/java/com/costular/atomtasks/agenda/AgendaScreen.kt b/feature/agenda/src/main/java/com/costular/atomtasks/agenda/AgendaScreen.kt index ec74ce65..7396142b 100644 --- a/feature/agenda/src/main/java/com/costular/atomtasks/agenda/AgendaScreen.kt +++ b/feature/agenda/src/main/java/com/costular/atomtasks/agenda/AgendaScreen.kt @@ -245,8 +245,10 @@ private fun TasksContent( shouldShowTaskOrderTutorial = state.shouldShowCardOrderTutorial, onDismissTaskOrderTutorial = onDismissTaskOrderTutorial, padding = PaddingValues( - horizontal = AppTheme.dimens.contentMargin, - vertical = AppTheme.dimens.spacingLarge, + start = AppTheme.dimens.contentMargin, + end = AppTheme.dimens.contentMargin, + top = AppTheme.dimens.spacingLarge, + bottom = ContentPaddingForFAB.dp, ), modifier = modifier .fillMaxSize() @@ -454,3 +456,5 @@ fun AgendaPreview() { ) } } + +private const val ContentPaddingForFAB = 90 diff --git a/feature/settings/src/main/java/com/costular/atomtasks/settings/TasksSettingsSection.kt b/feature/settings/src/main/java/com/costular/atomtasks/settings/TasksSettingsSection.kt index f217973b..80604923 100644 --- a/feature/settings/src/main/java/com/costular/atomtasks/settings/TasksSettingsSection.kt +++ b/feature/settings/src/main/java/com/costular/atomtasks/settings/TasksSettingsSection.kt @@ -10,6 +10,7 @@ import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview @@ -29,7 +30,11 @@ fun TasksSettingsSection( ) { SettingSwitch( start = { - Icon(imageVector = Icons.Outlined.FastForward, contentDescription = null) + Icon( + imageVector = Icons.Outlined.FastForward, + contentDescription = null, + modifier = Modifier.align(Alignment.Top) + ) }, title = { Column { diff --git a/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingItem.kt b/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingItem.kt index a72010f6..b24d4faa 100644 --- a/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingItem.kt +++ b/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingItem.kt @@ -6,6 +6,7 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.RowScope import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height @@ -33,8 +34,8 @@ fun SettingItem( title: @Composable () -> Unit, onClick: () -> Unit, modifier: Modifier = Modifier, - start: @Composable (() -> Unit)? = null, - end: @Composable (() -> Unit)? = null, + start: @Composable (RowScope.() -> Unit)? = null, + end: @Composable (RowScope.() -> Unit)? = null, ) { Row( horizontalArrangement = Arrangement.SpaceBetween, diff --git a/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingLink.kt b/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingLink.kt index 66ee7d46..1eaacbfb 100644 --- a/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingLink.kt +++ b/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingLink.kt @@ -1,6 +1,5 @@ package com.costular.atomtasks.settings -import androidx.compose.foundation.Image import androidx.compose.foundation.layout.size import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.OpenInNew @@ -9,8 +8,8 @@ import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.ColorFilter import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.graphics.vector.rememberVectorPainter import androidx.compose.ui.text.style.TextOverflow @@ -27,11 +26,12 @@ fun SettingLink( ) { SettingItem( start = { - Image( + Icon( painter = rememberVectorPainter(icon), contentDescription = null, - modifier = Modifier.size(24.dp), - colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.primary), + modifier = Modifier + .size(24.dp) + .align(Alignment.Top), ) }, title = title, diff --git a/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingOption.kt b/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingOption.kt index 236aed4f..39ba609d 100644 --- a/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingOption.kt +++ b/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingOption.kt @@ -4,13 +4,14 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.size -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Text import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.ChevronRight import androidx.compose.material.icons.outlined.Palette import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.graphics.vector.rememberVectorPainter @@ -31,7 +32,9 @@ fun SettingOption( Icon( painter = rememberVectorPainter(icon), contentDescription = null, - modifier = Modifier.size(24.dp), + modifier = Modifier + .size(24.dp) + .align(Alignment.Top), ) }, title = { diff --git a/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingSwitch.kt b/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingSwitch.kt index 814a075a..a0c05a8d 100644 --- a/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingSwitch.kt +++ b/feature/settings/src/main/java/com/costular/atomtasks/settings/components/SettingSwitch.kt @@ -1,5 +1,6 @@ package com.costular.atomtasks.settings +import androidx.compose.foundation.layout.RowScope import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.FlashOn import androidx.compose.material3.Icon @@ -21,7 +22,7 @@ fun SettingSwitch( isSelected: Boolean, onSelect: (isSelected: Boolean) -> Unit, modifier: Modifier = Modifier, - start: @Composable (() -> Unit)? = null, + start: @Composable (RowScope.() -> Unit)? = null, ) { SettingItem( title = title,