Browse Source

Adjust fontsize and fontfamily for textfields fonts

Khubaib 4 months ago
parent
commit
bf8f2d6797

+ 12 - 7
app/src/main/java/com/fastest/pass/forgotpassword/presentation/ui/components/ForgotPasswordConfirmScreen.kt

@@ -50,7 +50,6 @@ import androidx.compose.ui.text.style.TextAlign
 import androidx.compose.ui.unit.dp
 import androidx.compose.ui.unit.sp
 import com.fastest.pass.R
-import com.fastest.pass.login.presentation.components.ClickType
 
 enum class ClickTypeForgotConfirm {
     GO_BACK,
@@ -182,7 +181,7 @@ fun ColumnScope.PasswordTextFieldFPC(
         onValueChange = {
             passwordText = it
         },
-        textStyle = MaterialTheme.typography.displaySmall,
+        textStyle = MaterialTheme.typography.displayMedium,
         modifier = Modifier
             .padding(start = 30.dp, end = 30.dp)
             .align(Alignment.Start)
@@ -196,8 +195,11 @@ fun ColumnScope.PasswordTextFieldFPC(
             .background(color = colorResource(id = R.color.transparent)),
         shape = RoundedCornerShape(16.dp),
         placeholder = {
-            Text(text = stringResource(id = R.string.enter_new_password),
-                color = colorResource(id = R.color.gray_splash))
+            Text(
+                text = stringResource(id = R.string.enter_new_password),
+                color = colorResource(id = R.color.gray_splash),
+                style = MaterialTheme.typography.displayMedium,
+                )
         },
 //        label = {
 //            Text(text = context.getString(R.string.password),
@@ -272,7 +274,7 @@ fun ColumnScope.PasswordConfirmTextFieldFPC(
         onValueChange = {
             passwordText = it
         },
-        textStyle = MaterialTheme.typography.displaySmall,
+        textStyle = MaterialTheme.typography.displayMedium,
         modifier = Modifier
             .padding(start = 30.dp, end = 30.dp)
             .align(Alignment.Start)
@@ -286,8 +288,11 @@ fun ColumnScope.PasswordConfirmTextFieldFPC(
             .background(color = colorResource(id = R.color.transparent)),
         shape = RoundedCornerShape(16.dp),
         placeholder = {
-            Text(text = stringResource(id = R.string.confirm_new_password),
-                color = colorResource(id = R.color.gray_splash))
+            Text(
+                text = stringResource(id = R.string.confirm_new_password),
+                color = colorResource(id = R.color.gray_splash),
+                style = MaterialTheme.typography.displayMedium,
+                )
         },
 //        label = {
 //            Text(text = context.getString(R.string.password),

+ 4 - 2
app/src/main/java/com/fastest/pass/forgotpassword/presentation/ui/components/ForgotPasswordScreen.kt

@@ -161,7 +161,7 @@ fun ColumnScope.LoginTextFieldFP(
         onValueChange = {
             emailText = it
         },
-        textStyle = MaterialTheme.typography.displaySmall,
+        textStyle = MaterialTheme.typography.displayMedium,
         modifier = Modifier
             .padding(start = 30.dp, end = 30.dp, top = 50.dp)
             .align(Alignment.Start)
@@ -177,7 +177,9 @@ fun ColumnScope.LoginTextFieldFP(
         placeholder = {
             Text(
                 text = "Enter email address",
-                color = colorResource(id = R.color.gray_splash))
+                color = colorResource(id = R.color.gray_splash),
+                style = MaterialTheme.typography.displayMedium,
+                )
         },
 //        label = {
 //            Text(text = stringResource(R.string.send_code),

+ 10 - 5
app/src/main/java/com/fastest/pass/login/presentation/ui/components/LoginScreen.kt

@@ -193,7 +193,7 @@ fun ColumnScope.LoginTextField(
         onValueChange = {
             emailText = it
         },
-        textStyle = MaterialTheme.typography.displaySmall,
+        textStyle = MaterialTheme.typography.displayMedium,
         modifier = Modifier
             .padding(start = 30.dp, end = 30.dp, top = 50.dp)
             .align(Alignment.Start)
@@ -209,7 +209,9 @@ fun ColumnScope.LoginTextField(
         placeholder = {
             Text(
                 text = stringResource(id = R.string.enter_email_address),
-                color = colorResource(id = R.color.gray_splash))
+                color = colorResource(id = R.color.gray_splash),
+                style = MaterialTheme.typography.displayMedium
+            )
         },
 //        label = {
 //            Text(text = context.getString(R.string.email),
@@ -260,7 +262,7 @@ fun ColumnScope.PasswordTextField(
         onValueChange = {
             passwordText = it
         },
-        textStyle = MaterialTheme.typography.displaySmall,
+        textStyle = MaterialTheme.typography.displayMedium,
         modifier = Modifier
             .padding(start = 30.dp, end = 30.dp)
             .align(Alignment.Start)
@@ -274,8 +276,11 @@ fun ColumnScope.PasswordTextField(
             .background(color = colorResource(id = R.color.transparent)),
                 shape = RoundedCornerShape(16.dp),
                 placeholder = {
-                    Text(text = stringResource(id = R.string.enter_password),
-                        color = colorResource(id = R.color.gray_splash))
+                    Text(
+                        text = stringResource(id = R.string.enter_password),
+                        color = colorResource(id = R.color.gray_splash),
+                        style = MaterialTheme.typography.displayMedium
+                        )
                 },
 //        label = {
 //            Text(text = context.getString(R.string.password),

+ 6 - 3
app/src/main/java/com/fastest/pass/masterlogin/presentation/ui/components/MasterLoginScreen.kt

@@ -181,7 +181,7 @@ fun ColumnScope.PasswordTextFieldMLS(
         onValueChange = {
             passwordText = it
         },
-        textStyle = MaterialTheme.typography.displaySmall,
+        textStyle = MaterialTheme.typography.displayMedium,
         modifier = Modifier
             .padding(start = 30.dp, end = 30.dp)
             .align(Alignment.CenterHorizontally)
@@ -195,8 +195,11 @@ fun ColumnScope.PasswordTextFieldMLS(
             .background(color = colorResource(id = R.color.transparent)),
         shape = RoundedCornerShape(16.dp),
         placeholder = {
-            Text(text = stringResource(id = R.string.master_password),
-                color = colorResource(id = R.color.gray_splash))
+            Text(
+                text = stringResource(id = R.string.master_password),
+                color = colorResource(id = R.color.gray_splash),
+                style = MaterialTheme.typography.displayMedium,
+                )
         },
 //        label = {
 //            Text(text = context.getString(R.string.password),

+ 6 - 3
app/src/main/java/com/fastest/pass/mastersignup/presentation/ui/components/MasterSignUpScreen.kt

@@ -184,7 +184,7 @@ fun ColumnScope.PasswordTextFieldMSS(
         onValueChange = {
             passwordText = it
         },
-        textStyle = MaterialTheme.typography.displaySmall,
+        textStyle = MaterialTheme.typography.displayMedium,
         modifier = Modifier
             .padding(start = 30.dp, end = 30.dp)
             .align(Alignment.CenterHorizontally)
@@ -198,8 +198,11 @@ fun ColumnScope.PasswordTextFieldMSS(
             .background(color = colorResource(id = R.color.transparent)),
         shape = RoundedCornerShape(16.dp),
         placeholder = {
-            Text(text = stringResource(id = R.string.master_password),
-                color = colorResource(id = R.color.gray_splash))
+            Text(
+                text = stringResource(id = R.string.master_password),
+                color = colorResource(id = R.color.gray_splash),
+                style = MaterialTheme.typography.displayMedium,
+                )
         },
 //        label = {
 //            Text(text = context.getString(R.string.password),

+ 11 - 5
app/src/main/java/com/fastest/pass/signup/presentation/ui/components/SignUpScreen.kt

@@ -43,6 +43,7 @@ import androidx.compose.ui.platform.SoftwareKeyboardController
 import androidx.compose.ui.res.colorResource
 import androidx.compose.ui.res.painterResource
 import androidx.compose.ui.res.stringResource
+import androidx.compose.ui.text.TextStyle
 import androidx.compose.ui.text.input.ImeAction
 import androidx.compose.ui.text.input.KeyboardType
 import androidx.compose.ui.text.input.PasswordVisualTransformation
@@ -184,7 +185,7 @@ fun ColumnScope.SignUpTextField(
         onValueChange = {
             emailText = it
         },
-        textStyle = MaterialTheme.typography.displaySmall,
+        textStyle = MaterialTheme.typography.displayMedium,
         modifier = Modifier
             .padding(start = 30.dp, end = 30.dp, top = 50.dp)
             .align(Alignment.Start)
@@ -200,7 +201,9 @@ fun ColumnScope.SignUpTextField(
         placeholder = {
             Text(
                 text = "Enter email address",
-                color = colorResource(id = R.color.gray_splash))
+                color = colorResource(id = R.color.gray_splash),
+                style = MaterialTheme.typography.displayMedium
+                )
         },
 //        label = {
 //            Text(text = context.getString(R.string.email),
@@ -251,7 +254,7 @@ fun ColumnScope.PasswordTextFieldSU(
         onValueChange = {
             passwordText = it
         },
-        textStyle = MaterialTheme.typography.displaySmall,
+        textStyle = MaterialTheme.typography.displayMedium,
         modifier = Modifier
             .padding(start = 30.dp, end = 30.dp)
             .align(Alignment.Start)
@@ -265,8 +268,11 @@ fun ColumnScope.PasswordTextFieldSU(
             .background(color = colorResource(id = R.color.transparent)),
         shape = RoundedCornerShape(16.dp),
         placeholder = {
-            Text(text = stringResource(id = R.string.enter_password),
-                color = colorResource(id = R.color.gray_splash))
+            Text(
+                text = stringResource(id = R.string.enter_password),
+                color = colorResource(id = R.color.gray_splash),
+                style = MaterialTheme.typography.displayMedium
+            )
         },
 //        label = {
 //            Text(text = context.getString(R.string.password),

+ 1 - 2
app/src/main/java/com/fastest/pass/ui/theme/Type.kt

@@ -36,8 +36,7 @@ val Typography = Typography(
         fontFamily = outfitFontFamily,
         fontWeight = FontWeight.Normal,
         fontSize = 16.sp,
-        textAlign = TextAlign.Right,
-        lineHeight = 30.sp
+        textAlign = TextAlign.Start,
     ),
     displayLarge = TextStyle(
         fontFamily = outfitFontFamily,