Skip to content

Commit

Permalink
Split to component composables
Browse files Browse the repository at this point in the history
  • Loading branch information
T8RIN committed Jan 9, 2025
1 parent aafb680 commit 44f6aff
Show file tree
Hide file tree
Showing 11 changed files with 558 additions and 417 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ internal fun ColorModelTripleItem(
previewOnly: Boolean
) {
Box(
modifier = Modifier.Companion.padding(
modifier = Modifier.padding(
start = 16.dp,
top = 16.dp,
end = 16.dp
Expand Down Expand Up @@ -77,7 +77,7 @@ internal fun ColorModelTripleItem(
titleFontWeight = FontWeight.Companion.Normal,
contentHorizontalPadding = 0.dp
)
Spacer(Modifier.Companion.height(8.dp))
Spacer(Modifier.height(8.dp))
ColorRowSelector(
title = stringResource(R.string.second_color),
value = color2,
Expand All @@ -97,7 +97,7 @@ internal fun ColorModelTripleItem(
titleFontWeight = FontWeight.Companion.Normal,
contentHorizontalPadding = 0.dp
)
Spacer(Modifier.Companion.height(8.dp))
Spacer(Modifier.height(8.dp))
ColorRowSelector(
title = stringResource(R.string.third_color),
value = color3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ internal fun FloatPaletteImageModelTripleItem(
var uri1 by remember(value) { mutableStateOf(value.third.data) }

EnhancedSliderItem(
modifier = Modifier.Companion
modifier = Modifier
.padding(
top = 8.dp,
start = 8.dp,
Expand All @@ -85,9 +85,9 @@ internal fun FloatPaletteImageModelTripleItem(
valueRange = filter.paramsInfo[0].valueRange,
behaveAsContainer = false
)
Spacer(Modifier.Companion.height(8.dp))
Spacer(Modifier.height(8.dp))
Column(
modifier = Modifier.Companion
modifier = Modifier
.padding(horizontal = 16.dp)
.container(
shape = ContainerShapeDefaults.topShape,
Expand All @@ -96,7 +96,7 @@ internal fun FloatPaletteImageModelTripleItem(
) {
Text(
text = stringResource(filter.paramsInfo[1].title!!),
modifier = Modifier.Companion.padding(
modifier = Modifier.padding(
top = 8.dp,
start = 12.dp,
end = 12.dp,
Expand All @@ -123,9 +123,9 @@ internal fun FloatPaletteImageModelTripleItem(
}
)
}
Spacer(Modifier.Companion.height(4.dp))
Spacer(Modifier.height(4.dp))
ImageSelector(
modifier = Modifier.Companion.padding(
modifier = Modifier.padding(
horizontal = 16.dp
),
value = uri1,
Expand All @@ -145,5 +145,5 @@ internal fun FloatPaletteImageModelTripleItem(
subtitle = null,
shape = ContainerShapeDefaults.bottomShape
)
Spacer(Modifier.Companion.height(16.dp))
Spacer(Modifier.height(16.dp))
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ internal fun NumberColorModelColorModelTripleItem(
var color2 by remember(value) { mutableStateOf(value.third.toColor()) }

EnhancedSliderItem(
modifier = Modifier.Companion
modifier = Modifier
.padding(
top = 8.dp,
start = 8.dp,
Expand Down Expand Up @@ -81,7 +81,7 @@ internal fun NumberColorModelColorModelTripleItem(
behaveAsContainer = false
)
Box(
modifier = Modifier.Companion.padding(
modifier = Modifier.padding(
start = 16.dp,
top = 16.dp,
end = 16.dp
Expand All @@ -107,7 +107,7 @@ internal fun NumberColorModelColorModelTripleItem(
titleFontWeight = FontWeight.Companion.Normal,
contentHorizontalPadding = 0.dp
)
Spacer(Modifier.Companion.height(8.dp))
Spacer(Modifier.height(8.dp))
ColorRowSelector(
title = stringResource(filter.paramsInfo[2].title!!),
value = color1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ internal fun NumberColorModelPopArtTripleItem(
var blendMode1 by remember(value) { mutableStateOf(value.third) }

EnhancedSliderItem(
modifier = Modifier.Companion
modifier = Modifier
.padding(
top = 8.dp,
start = 8.dp,
Expand Down Expand Up @@ -85,7 +85,7 @@ internal fun NumberColorModelPopArtTripleItem(
behaveAsContainer = false
)
Box(
modifier = Modifier.Companion.padding(
modifier = Modifier.padding(
start = 16.dp,
top = 16.dp,
end = 16.dp
Expand Down Expand Up @@ -113,7 +113,7 @@ internal fun NumberColorModelPopArtTripleItem(
)
Text(
text = stringResource(filter.paramsInfo[2].title!!),
modifier = Modifier.Companion.padding(
modifier = Modifier.padding(
top = 8.dp,
start = 12.dp,
end = 12.dp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ internal fun NumberNumberBlurEdgeModeTripleItem(
}

Column(
modifier = Modifier.Companion.padding(8.dp)
modifier = Modifier.padding(8.dp)
) {
paramsInfo.forEach { (state, info) ->
val (title, valueRange, roundTo) = info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ internal fun NumberNumberColorModelTripleItem(
}

Column(
modifier = Modifier.Companion.padding(
modifier = Modifier.padding(
top = 8.dp,
start = 8.dp,
end = 8.dp
Expand Down Expand Up @@ -112,6 +112,6 @@ internal fun NumberNumberColorModelTripleItem(
defaultColors = ColorSelectionRowDefaults.colorList,
titleFontWeight = FontWeight.Companion.Normal,
contentHorizontalPadding = 16.dp,
modifier = Modifier.Companion.padding(start = 4.dp)
modifier = Modifier.padding(start = 4.dp)
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ internal fun NumberTransferFuncBlurEdgeModeTripleItem(
}

EnhancedSliderItem(
modifier = Modifier.Companion
modifier = Modifier
.padding(
top = 8.dp,
start = 8.dp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ internal fun NumberTripleItem(
}

Column(
modifier = Modifier.Companion.padding(8.dp)
modifier = Modifier.padding(8.dp)
) {
paramsInfo.forEach { (state, info) ->
val (title, valueRange, roundTo) = info
Expand Down
Loading

0 comments on commit 44f6aff

Please sign in to comment.