Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ fun NoteMarkPasswordTextField(
) {
var isFocused by remember { mutableStateOf(false) }

val errorSupportColor = if (errorText == null) MaterialTheme.colorScheme.primary
else MaterialTheme.colorScheme.error

val inputBorder = if (isFocused || errorText != null && !isFocused) {
val inputBorder = if (!isFocused && errorText != null) {
Modifier.border(
1.dp, MaterialTheme.colorScheme.error,
RoundedCornerShape(12.dp)
)
} else if (isFocused) {
Modifier.border(
1.dp, errorSupportColor,
1.dp, MaterialTheme.colorScheme.primary,
RoundedCornerShape(12.dp)
)
} else Modifier
Expand Down Expand Up @@ -130,15 +132,15 @@ fun NoteMarkPasswordTextField(
}
)

if (isFocused && supportText != null && errorText == null) {
if (isFocused && supportText != null) {
Text(
text = supportText,
fontSize = 15.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}

if (errorText != null) {
if (!isFocused && errorText != null) {
Text(
text = errorText,
fontSize = 15.sp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@ fun NoteMarkTextField(
errorText: String? = null,
) {
var isFocused by remember { mutableStateOf(false) }
val errorSupportColor = if (errorText == null) MaterialTheme.colorScheme.primary
else MaterialTheme.colorScheme.error

val inputBorder = if (isFocused || errorText != null && !isFocused) {
val inputBorder = if (!isFocused && errorText != null) {
Modifier.border(
1.dp, errorSupportColor,
1.dp, MaterialTheme.colorScheme.error,
RoundedCornerShape(12.dp)
)
} else if (isFocused) {
Modifier.border(
1.dp, MaterialTheme.colorScheme.primary,
RoundedCornerShape(12.dp)
)
} else Modifier
Expand Down Expand Up @@ -78,7 +81,6 @@ fun NoteMarkTextField(
.onFocusChanged { focusState ->
isFocused = focusState.isFocused
},
cursorBrush = SolidColor(errorSupportColor),
singleLine = true,
textStyle = TextStyle(
color = MaterialTheme.colorScheme.onSurface,
Expand All @@ -98,15 +100,15 @@ fun NoteMarkTextField(
}
)

if (isFocused && supportText != null && errorText == null) {
if (isFocused && supportText != null) {
Text(
text = supportText,
fontSize = 15.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}

if (errorText != null) {
if (!isFocused && errorText != null) {
Text(
text = errorText,
fontSize = 15.sp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@ import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.calculateEndPadding
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.safeDrawing
import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
import me.androidbox.core.presentation.designsystem.theming.NoteMarkTheme
import me.androidbox.startup.presentation.components.LandingContent
Expand All @@ -27,10 +35,11 @@ fun LandingLandscapeScreen(
onGettingStartedClick: () -> Unit,
onLoginClick: () -> Unit,
) {

Box(
modifier = modifier
.fillMaxSize()
.background(color = Color(0xffE0EAFF)),
.background(color = Color(0xffE0EAFF))
) {
Row(
modifier = Modifier
Expand All @@ -48,6 +57,7 @@ fun LandingLandscapeScreen(
LandingContent(
modifier = Modifier
.weight(1f)
.padding(WindowInsets.safeDrawing.asPaddingValues())
.background(
color = MaterialTheme.colorScheme.surfaceContainerLowest,
shape = RoundedCornerShape(topStart = 20.dp, bottomStart = 20.dp)
Expand Down