Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
Increase padding values
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkitSuda committed Nov 12, 2022
1 parent 8ce764a commit 567743d
Show file tree
Hide file tree
Showing 17 changed files with 46 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fun <A> PopupItemsSettingsItem(
isMenuExpanded = true
})) {
Row(
modifier = Modifier.padding(horizontal = 16.dp, vertical = 20.dp),
modifier = Modifier.padding(horizontal = 24.dp, vertical = 20.dp),
verticalAlignment = Alignment.CenterVertically
) {
if (icon != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ fun RadioGroupCardItem(
Box(modifier = modifier) {
Column() {
Row(
modifier = Modifier.padding(16.dp),
modifier = Modifier.padding(horizontal = 24.dp, vertical = 12.dp),
verticalAlignment = Alignment.CenterVertically
) {
if (icon != null) {
Icon(
imageVector = icon,
contentDescription = text,
modifier = Modifier.padding(end = 16.dp)
modifier = Modifier.padding(end = 24.dp)
)
}
Column(modifier = Modifier.weight(1f)) {
Expand All @@ -73,7 +73,7 @@ fun RadioGroupCardItem(
FlowRow(
crossAxisSpacing = 8.dp,
mainAxisSpacing = 8.dp,
modifier = Modifier.padding(bottom = 16.dp, start = 16.dp, end = 16.dp)
modifier = Modifier.padding(bottom = 12.dp, start = 16.dp, end = 16.dp)
) {
for (item in items) {
Row(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ fun ColorPickerCardItem(
}
}) {
Row(
modifier = Modifier.padding(horizontal = 16.dp, vertical = 20.dp),
modifier = Modifier.padding(horizontal = 24.dp, vertical = 20.dp),
verticalAlignment = Alignment.CenterVertically
) {
if (icon != null) {
Icon(
imageVector = icon,
contentDescription = text,
modifier = Modifier.padding(start = 2.dp, end = 18.dp)
modifier = Modifier.padding(end = 24.dp)
)
}
Column(modifier = Modifier.weight(1f)) {
Expand Down Expand Up @@ -138,12 +138,12 @@ fun SwitchCardItem(
Box(modifier = modifier.clickable {
handleOnChange(!checked)
}) {
Row(modifier = Modifier.padding(horizontal = 16.dp, vertical = 20.dp), verticalAlignment = Alignment.CenterVertically) {
Row(modifier = Modifier.padding(horizontal = 24.dp, vertical = 20.dp), verticalAlignment = Alignment.CenterVertically) {
if (icon != null) {
Icon(
imageVector = icon,
contentDescription = text,
modifier = Modifier.padding(start = 2.dp, end = 18.dp)
modifier = Modifier.padding(end = 24.dp)
)
}
Column(modifier = Modifier.weight(1f)) {
Expand Down Expand Up @@ -215,14 +215,14 @@ fun SliderCardItem(
Box(modifier = modifier) {

Row(
modifier = Modifier.padding(top = 16.dp, start = 16.dp, end = 16.dp, bottom = 8.dp),
modifier = Modifier.padding(top = 20.dp, start = 24.dp, end = 24.dp, bottom = 10.dp),
verticalAlignment = Alignment.CenterVertically
) {
if (icon != null) {
Icon(
imageVector = icon,
contentDescription = text,
modifier = Modifier.padding(start = 2.dp, end = 18.dp)
modifier = Modifier.padding(end = 24.dp)
)
}
Column(modifier = Modifier.weight(1f)) {
Expand Down Expand Up @@ -294,14 +294,14 @@ fun ShapesEditorCardItem(
Row(
modifier = Modifier
.fillMaxWidth()
.padding(top = 16.dp, start = 16.dp, end = 16.dp, bottom = 8.dp),
.padding(top = 20.dp, start = 24.dp, end = 24.dp, bottom = 10.dp),
verticalAlignment = Alignment.CenterVertically
) {
if (icon != null) {
Icon(
imageVector = icon,
contentDescription = text,
modifier = Modifier.padding(start = 2.dp, end = 18.dp)
modifier = Modifier.padding(end = 24.dp)
)
}
Column(modifier = Modifier.fillMaxWidth()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fun ExerciseItem(
modifier = Modifier
.fillMaxWidth()
.clickable(onClick = onClick)
.padding(start = 16.dp, end = 16.dp, top = 12.dp, bottom = 12.dp),
.padding(horizontal = 24.dp, vertical = 12.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import androidx.compose.ui.unit.dp
import com.ankitsuda.rebound.ui.theme.LocalThemeState
import com.ankitsuda.rebound.ui.theme.ReboundTheme

@OptIn(ExperimentalMaterialApi::class)
@Composable
fun MoreItemCard(
modifier: Modifier = Modifier,
Expand All @@ -37,21 +36,22 @@ fun MoreItemCard(
) {
Box(modifier = modifier.clickable(onClick = onClick)) {
Row(
modifier = Modifier.padding(horizontal = 16.dp, vertical = 20.dp),
modifier = Modifier.padding(horizontal = 24.dp, vertical = 20.dp),
verticalAlignment = Alignment.CenterVertically
) {
if (icon != null) {
Icon(
modifier = Modifier.padding(end = 24.dp),
imageVector = icon,
contentDescription = text,
tint = LocalThemeState.current.onBackgroundColor,
modifier = Modifier.padding(start = 2.dp, end = 18.dp)
)
}
Column() {
Text(
text = text,
color = LocalThemeState.current.onBackgroundColor
style = ReboundTheme.typography.body1,
color = ReboundTheme.colors.onBackground
)
if (description.isNotEmpty()) {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import com.ankitsuda.rebound.ui.theme.LocalThemeState
@Composable
fun MoreSectionHeader(text: String) {
Text(
modifier = Modifier.padding(vertical = 8.dp, horizontal = 16.dp),
modifier = Modifier.padding(vertical = 8.dp, horizontal = 24.dp),
text = text,
style = MaterialTheme.typography.caption,
color = LocalThemeState.current.onBackgroundColor.copy(alpha = 0.75f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fun CollapsingToolbarScope.TopBar2(
with(LocalDensity.current) { if (statusBarEnabled) LocalWindowInsets.current.statusBars.top.toDp() else 0.dp }

val maxTitleOffset = 80
val minTitleOffset = 16
val minTitleOffset = 24
val titleOffset = if (navigationIcon != null && toolbarState != null) {
(maxTitleOffset + (minTitleOffset - maxTitleOffset) * toolbarState.progress).dp
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ internal fun PlateListItemComponent(
) {
Row(
modifier = Modifier
.padding(start = 16.dp),
.padding(start = 24.dp, end = 8.dp),
verticalAlignment = Alignment.CenterVertically
) {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private fun ExercisesScreenContent(
modifier = Modifier
.fillMaxWidth()
.background(LocalThemeState.current.backgroundColor)
.padding(horizontal = 16.dp, vertical = 8.dp),
.padding(horizontal = 24.dp, vertical = 8.dp),
text = group.key,
style = ReboundTheme.typography.caption,
color = LocalThemeState.current.onBackgroundColor.copy(alpha = 0.75f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ fun HistoryScreen(
.fillMaxSize()
.background(MaterialTheme.colors.background),
state = scrollState,
verticalArrangement = Arrangement.spacedBy(16.dp),
contentPadding = PaddingValues(16.dp)
verticalArrangement = Arrangement.spacedBy(20.dp),
contentPadding = PaddingValues(24.dp)
) {
for (map in workoutsMap) {
if (map.key != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ fun HomeScreen(viewModel: HomeScreenViewModel = hiltViewModel()) {
LazyColumn(
modifier = Modifier
.fillMaxSize(),
contentPadding = PaddingValues(16.dp),
verticalArrangement = Arrangement.spacedBy(16.dp)
contentPadding = PaddingValues(24.dp),
verticalArrangement = Arrangement.spacedBy(20.dp)
) {

item {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ fun PartMeasurementsScreen(
if (showChart) {
item {

AppCard(modifier = Modifier.padding(start = 16.dp, end = 16.dp)) {
AppCard(modifier = Modifier.padding(horizontal = 24.dp)) {
ReboundChart(
points = points,
modifier = Modifier
Expand All @@ -117,7 +117,7 @@ fun PartMeasurementsScreen(
text = stringResource(id = R.string.history),
style = ReboundTheme.typography.h6,
color = ReboundTheme.colors.onBackground.copy(alpha = 0.5f),
modifier = Modifier.padding(start = 16.dp, top = 16.dp, bottom = 8.dp)
modifier = Modifier.padding(start = 24.dp, top = 20.dp, bottom = 10.dp)
)
}

Expand All @@ -133,7 +133,7 @@ fun PartMeasurementsScreen(
)
)
}
.padding(start = 16.dp, end = 16.dp, top = 16.dp, bottom = 16.dp),
.padding(horizontal = 24.dp, vertical = 20.dp),
horizontalArrangement = Arrangement.SpaceBetween
) {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ private fun ThemePresetsPersonalizationScreen(
modifier = Modifier
.fillMaxSize()
.background(ReboundTheme.colors.background),
contentPadding = PaddingValues(16.dp),
verticalArrangement = Arrangement.spacedBy(16.dp)
contentPadding = PaddingValues(24.dp),
verticalArrangement = Arrangement.spacedBy(20.dp)
) {

item {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,12 @@ import com.ankitsuda.navigation.Screen
import com.ankitsuda.rebound.ui.components.*
import com.ankitsuda.rebound.ui.components.dialogs.DiscardActiveWorkoutDialog
import com.ankitsuda.rebound.ui.theme.LocalThemeState
import me.onebone.toolbar.CollapsingToolbarScaffold
import me.onebone.toolbar.rememberCollapsingToolbarScaffoldState
import com.ankitsuda.rebound.ui.theme.ReboundTheme
import com.ankitsuda.rebound.ui.workout_details.components.SessionMenuComponent
import me.onebone.toolbar.*
import me.onebone.toolbar.FabPosition
import me.onebone.toolbar.ScrollStrategy
import me.onebone.toolbar.ToolbarWithFabScaffold

@OptIn(ExperimentalComposeUiApi::class)
@OptIn(ExperimentalComposeUiApi::class, ExperimentalToolbarApi::class)
@Composable
fun SessionScreen(
navigator: Navigator = LocalNavigator.current,
Expand Down Expand Up @@ -87,8 +84,6 @@ fun SessionScreen(
)
}



ToolbarWithFabScaffold(
scrollStrategy = ScrollStrategy.EnterAlwaysCollapsed,
state = collapsingState,
Expand Down Expand Up @@ -142,13 +137,13 @@ fun SessionScreen(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colors.background),
contentPadding = PaddingValues(16.dp)
contentPadding = PaddingValues(24.dp)
) {
if (!workout?.personalRecords.isNullOrEmpty()) {
item {
PersonalRecordsRowComponent(
modifier = Modifier
.padding(bottom = 8.dp),
.padding(bottom = 10.dp),
prs = workout?.personalRecords!!
)
}
Expand All @@ -160,7 +155,7 @@ fun SessionScreen(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.fillMaxWidth()
.padding(bottom = 16.dp)
.padding(bottom = 20.dp)
) {
Column() {
Text(
Expand Down Expand Up @@ -202,7 +197,7 @@ fun SessionScreen(
SessionExerciseCardItem(
modifier = Modifier
.fillMaxWidth()
.padding(bottom = 16.dp),
.padding(bottom = 20.dp),
supersetId = log.junction.supersetId,
title = log.exercise.name ?: "",
entries = log.logEntries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ fun WorkoutTemplatePreviewScreen(
lastPerformedStr?.let {
item {
Column(
modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp),
modifier = Modifier.padding(horizontal = 24.dp, vertical = 10.dp),
verticalArrangement = Arrangement.spacedBy(2.dp)
) {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fun TemplateExerciseComponent(
Row(
modifier = Modifier
.fillMaxWidth()
.padding(start = 16.dp, end = 16.dp, top = 12.dp, bottom = 12.dp),
.padding(horizontal = 24.dp, vertical = 12.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ fun WorkoutScreen(
modifier = Modifier
.fillMaxWidth()
.invisible(allItemsInvisibleExceptFolders)
.padding(start = 16.dp, end = 16.dp, bottom = 16.dp, top = 8.dp)
.padding(start = 24.dp, end = 24.dp, bottom = 20.dp, top = 10.dp)
.animateItemPlacement(),
backgroundColor = ReboundTheme.colors.primary,
onClick = {
Expand Down Expand Up @@ -328,7 +328,7 @@ fun WorkoutScreen(
Row(
modifier = Modifier
.fillMaxWidth()
.padding(start = 16.dp, end = 16.dp, top = 16.dp, bottom = 0.dp),
.padding(start = 24.dp, end = 24.dp, top = 20.dp, bottom = 0.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Expand All @@ -341,13 +341,13 @@ fun WorkoutScreen(
modifier = Modifier
.fillMaxWidth()
.padding(
start = 16.dp,
end = 16.dp,
top = 16.dp,
bottom = 8.dp
start = 24.dp,
end = 24.dp,
top = 20.dp,
bottom = 10.dp
// bottom = if (groupedTemplates.size > 1) 4.dp else 8.dp
),
horizontalArrangement = Arrangement.spacedBy(16.dp)
horizontalArrangement = Arrangement.spacedBy(20.dp)
) {
RButtonStyle2(
modifier = Modifier.weight(1f),
Expand Down Expand Up @@ -408,7 +408,7 @@ fun WorkoutScreen(
modifier = Modifier
.fillMaxWidth()
.invisible(allItemsInvisibleExceptFolders)
.padding(horizontal = 16.dp, vertical = 8.dp)
.padding(horizontal = 24.dp, vertical = 10.dp)
.animateItemPlacement(),
text = stringResource(R.string.add_template),
icon = Icons.Outlined.Add,
Expand Down

0 comments on commit 567743d

Please sign in to comment.