From cbedb0e82c5b6c29de1bcbbd734c4a0471ad1b57 Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Thu, 23 Jun 2022 22:30:11 +0200 Subject: [PATCH] Unified components from settings and changed subtitle to secondary color --- .../kotlin/app/ui/dialogs/SettingsDialog.kt | 50 ++----------------- 1 file changed, 5 insertions(+), 45 deletions(-) diff --git a/src/main/kotlin/app/ui/dialogs/SettingsDialog.kt b/src/main/kotlin/app/ui/dialogs/SettingsDialog.kt index 8da6b48..25b5ec5 100644 --- a/src/main/kotlin/app/ui/dialogs/SettingsDialog.kt +++ b/src/main/kotlin/app/ui/dialogs/SettingsDialog.kt @@ -131,22 +131,10 @@ fun SettingDropDown( modifier = Modifier.padding(vertical = 8.dp, horizontal = 8.dp), verticalAlignment = Alignment.CenterVertically ) { - Column(verticalArrangement = Arrangement.Center) { - Text( - text = title, - color = MaterialTheme.colors.primaryTextColor, - fontSize = 16.sp, - ) - - Text( - text = subtitle, - color = MaterialTheme.colors.primaryTextColor, - modifier = Modifier.padding(top = 4.dp), - fontSize = 12.sp, - ) - } + FieldTitles(title, subtitle) Spacer(modifier = Modifier.weight(1f)) + Box { OutlinedButton(onClick = { showThemeDropdown = true }) { Text( @@ -187,20 +175,7 @@ fun SettingButton( modifier = Modifier.padding(vertical = 8.dp, horizontal = 8.dp), verticalAlignment = Alignment.CenterVertically ) { - Column(verticalArrangement = Arrangement.Center) { - Text( - text = title, - color = MaterialTheme.colors.primaryTextColor, - fontSize = 14.sp, - ) - - Text( - text = subtitle, - color = MaterialTheme.colors.primaryTextColor, - modifier = Modifier.padding(top = 4.dp), - fontSize = 12.sp, - ) - } + FieldTitles(title, subtitle) Spacer(modifier = Modifier.weight(1f)) @@ -225,22 +200,7 @@ fun SettingToogle( modifier = Modifier.padding(vertical = 8.dp, horizontal = 8.dp), verticalAlignment = Alignment.CenterVertically ) { - Column( - verticalArrangement = Arrangement.Center - ) { - Text( - text = title, - color = MaterialTheme.colors.primaryTextColor, - fontSize = 14.sp, - ) - - Text( - text = subtitle, - color = MaterialTheme.colors.primaryTextColor, - modifier = Modifier.padding(top = 4.dp), - fontSize = 12.sp, - ) - } + FieldTitles(title, subtitle) Spacer(modifier = Modifier.weight(1f)) @@ -316,7 +276,7 @@ private fun FieldTitles( Text( text = subtitle, - color = MaterialTheme.colors.primaryTextColor, + color = MaterialTheme.colors.secondaryTextColor, modifier = Modifier.padding(top = 4.dp), fontSize = 12.sp, )