diff --git a/app/src/main/java/de/jeanlucmakiola/agendula/ui/common/ActionShapes.kt b/app/src/main/java/de/jeanlucmakiola/agendula/ui/common/ActionShapes.kt index 8ace109..5707498 100644 --- a/app/src/main/java/de/jeanlucmakiola/agendula/ui/common/ActionShapes.kt +++ b/app/src/main/java/de/jeanlucmakiola/agendula/ui/common/ActionShapes.kt @@ -21,7 +21,10 @@ object ActionShapes { /** New list — a sunny burst beside the Lists header. */ val AddList: RoundedPolygon get() = MaterialShapes.Sunny - /** What [AddList] and [AddFilter] morph into on press. */ + /** New view — the same burst as [AddList], beside the views it adds to. */ + val AddView: RoundedPolygon get() = MaterialShapes.Sunny + + /** What [AddList], [AddFilter] and [AddView] morph into on press. */ val AddListPressed: RoundedPolygon get() = MaterialShapes.Circle /** New filter — the same burst as [AddList], so both "add" actions read alike. */ diff --git a/app/src/main/java/de/jeanlucmakiola/agendula/ui/tasklist/TaskListScreen.kt b/app/src/main/java/de/jeanlucmakiola/agendula/ui/tasklist/TaskListScreen.kt index bf1d61c..76ecb3d 100644 --- a/app/src/main/java/de/jeanlucmakiola/agendula/ui/tasklist/TaskListScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/agendula/ui/tasklist/TaskListScreen.kt @@ -301,9 +301,12 @@ fun TaskListScreen( // A list or a saved filter can become a view of its own (#59). if (list != null || savedFilter != null) { Box { - IconButton(onClick = { menuOpen = true }) { - Icon(Icons.Rounded.MoreVert, contentDescription = stringResource(R.string.more_options)) - } + ActionButton( + shape = ActionShapes.More, + icon = Icons.Rounded.MoreVert, + contentDescription = stringResource(R.string.more_options), + onClick = { menuOpen = true }, + ) DropdownMenu(expanded = menuOpen, onDismissRequest = { menuOpen = false }) { DropdownMenuItem( text = { Text(stringResource(R.string.view_pin)) }, diff --git a/app/src/main/java/de/jeanlucmakiola/agendula/ui/views/ManageViewsScreen.kt b/app/src/main/java/de/jeanlucmakiola/agendula/ui/views/ManageViewsScreen.kt index 2adf49f..28621bc 100644 --- a/app/src/main/java/de/jeanlucmakiola/agendula/ui/views/ManageViewsScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/agendula/ui/views/ManageViewsScreen.kt @@ -11,7 +11,6 @@ import androidx.compose.material.icons.rounded.Add import androidx.compose.material.icons.rounded.ChevronRight import androidx.compose.material.icons.rounded.DragHandle import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.foundation.layout.padding @@ -27,8 +26,10 @@ import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle import de.jeanlucmakiola.agendula.R import de.jeanlucmakiola.agendula.domain.View +import de.jeanlucmakiola.agendula.ui.common.ActionShapes import de.jeanlucmakiola.agendula.ui.settings.ChipAccent import de.jeanlucmakiola.agendula.ui.settings.CategoryIcon +import de.jeanlucmakiola.floret.components.ActionButton import de.jeanlucmakiola.floret.components.CollapsingScaffold import de.jeanlucmakiola.floret.components.GroupedRow import de.jeanlucmakiola.floret.components.Position @@ -58,9 +59,13 @@ fun ManageViewsScreen( onBack = onBack, largeTopBar = false, actions = { - IconButton(onClick = { onEditView(0) }) { - Icon(Icons.Rounded.Add, contentDescription = stringResource(R.string.view_add)) - } + ActionButton( + shape = ActionShapes.AddView, + morphTo = ActionShapes.AddListPressed, + icon = Icons.Rounded.Add, + contentDescription = stringResource(R.string.view_add), + onClick = { onEditView(0) }, + ) }, ) { if (home == null) return@CollapsingScaffold