Skip to content

Commit 7dc9785

Browse files
authored
Forms: fix title padding (#382)
1 parent 2fc10da commit 7dc9785

File tree

1 file changed

+11
-5
lines changed
  • toolkit/featureforms/src/main/java/com/arcgismaps/toolkit/featureforms

1 file changed

+11
-5
lines changed

toolkit/featureforms/src/main/java/com/arcgismaps/toolkit/featureforms/FeatureForm.kt

+11-5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import androidx.compose.foundation.lazy.LazyColumn
2929
import androidx.compose.foundation.lazy.rememberLazyListState
3030
import androidx.compose.material3.Divider
3131
import androidx.compose.material3.LinearProgressIndicator
32+
import androidx.compose.material3.MaterialTheme
3233
import androidx.compose.material3.Surface
3334
import androidx.compose.material3.Text
3435
import androidx.compose.runtime.Composable
@@ -48,8 +49,6 @@ import androidx.compose.ui.graphics.graphicsLayer
4849
import androidx.compose.ui.res.stringResource
4950
import androidx.compose.ui.semantics.contentDescription
5051
import androidx.compose.ui.semantics.semantics
51-
import androidx.compose.ui.text.TextStyle
52-
import androidx.compose.ui.text.font.FontWeight
5352
import androidx.compose.ui.unit.dp
5453
import com.arcgismaps.mapping.featureforms.ComboBoxFormInput
5554
import com.arcgismaps.mapping.featureforms.DateTimePickerFormInput
@@ -169,9 +168,13 @@ internal fun FeatureForm(
169168
}
170169

171170
@Composable
172-
private fun FeatureFormTitle(featureForm: FeatureForm) {
171+
private fun FeatureFormTitle(featureForm: FeatureForm, modifier: Modifier = Modifier) {
173172
val title by featureForm.title.collectAsState()
174-
Text(text = title, style = TextStyle(fontWeight = FontWeight.Bold))
173+
Text(
174+
text = title,
175+
style = MaterialTheme.typography.titleMedium,
176+
modifier = modifier
177+
)
175178
}
176179

177180
@Composable
@@ -187,7 +190,10 @@ private fun FeatureFormBody(
187190
horizontalAlignment = Alignment.CenterHorizontally
188191
) {
189192
// title
190-
FeatureFormTitle(featureForm = form)
193+
FeatureFormTitle(
194+
featureForm = form,
195+
modifier = Modifier.padding(horizontal = 15.dp)
196+
)
191197
Spacer(
192198
modifier = Modifier
193199
.fillMaxWidth()

0 commit comments

Comments
 (0)