Skip to content

Commit

Permalink
refactor: color adjustment in dark theme
Browse files Browse the repository at this point in the history
  • Loading branch information
JorgeTranin committed Nov 11, 2024
1 parent d963802 commit 2c952b2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.soujunior.petjournal.ui.components

import android.util.Log
import androidx.compose.foundation.border
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
Expand Down Expand Up @@ -163,7 +164,7 @@ fun DateInputText(
} else {
Text(
"*Campo Obrigatório.",
color = MaterialTheme.colorScheme.outline,
color = if (isSystemInDarkTheme()) Color.White else MaterialTheme.colorScheme.outline,
modifier = Modifier.padding(10.sdp),
fontSize = 12.ssp
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.soujunior.petjournal.ui.screens_app.screens_pets.petBirthDateScreen.components

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
Expand Down Expand Up @@ -132,7 +133,7 @@ private fun CastrationButtons(
text = stringResource(id = R.string.required_field),
modifier = Modifier.padding(start = 2.sdp, top = 10.sdp),
fontSize = 12.ssp,
color = MaterialTheme.colorScheme.outline,
color = if (isSystemInDarkTheme()) Color.White else MaterialTheme.colorScheme.outline,
textAlign = TextAlign.Start
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.soujunior.petjournal.ui.screens_app.screens_pets.petBirthDateScreen.components

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
Expand All @@ -8,6 +9,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.font.FontWeight
Expand Down Expand Up @@ -55,7 +57,7 @@ fun Header(
text = text,
style = MaterialTheme.typography.headlineMedium,
textAlign = TextAlign.Start,
color = ColorCustom.gray_200,
color = if(isSystemInDarkTheme()) Color.White else ColorCustom.gray_200,
fontSize = 12.ssp,
fontWeight = FontWeight(400)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ fun Screen(idPetInformation: String?, navController: NavController) {
text = stringResource(R.string.text_continue),
buttonColor = if (isDarkMode) ButtonDefaults.buttonColors(MaterialTheme.colorScheme.onSecondary)
else ButtonDefaults.buttonColors(MaterialTheme.colorScheme.primary),
textColor = if (isDarkMode) MaterialTheme.colorScheme.primary else Color.White,
textColor = if (isDarkMode) MaterialTheme.colorScheme.surface else Color.White,
)
}
}
Expand Down

0 comments on commit 2c952b2

Please sign in to comment.