Skip to content

Commit

Permalink
fix for dark theme buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
greenart7c3 committed Nov 22, 2023
1 parent a0238da commit f473965
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
22 changes: 7 additions & 15 deletions app/src/main/java/com/greenart7c3/nostrsigner/ui/LoginScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.ClickableText
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.foundation.verticalScroll
Expand All @@ -27,6 +26,7 @@ import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
Expand All @@ -45,18 +45,13 @@ import androidx.compose.ui.platform.LocalAutofillTree
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.text.input.VisualTransformation
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.greenart7c3.nostrsigner.R
import com.greenart7c3.nostrsigner.ui.theme.Font14SP
import com.greenart7c3.nostrsigner.ui.theme.Size35dp

@OptIn(ExperimentalComposeUiApi::class)
Expand Down Expand Up @@ -205,20 +200,17 @@ fun LoginPage(
Text(text = stringResource(R.string.login))
}
}
ClickableText(
text = AnnotatedString(stringResource(R.string.generate_a_new_key)),

TextButton(
modifier = Modifier
.padding(30.dp)
.fillMaxWidth(),
onClick = {
accountViewModel.newKey()
},
style = TextStyle(
fontSize = Font14SP,
fontWeight = FontWeight.Bold,
textAlign = TextAlign.Center
)
)
}
) {
Text(stringResource(R.string.generate_a_new_key))
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.core.view.WindowCompat

val Shapes = Shapes(
Expand All @@ -24,8 +23,6 @@ val Shapes = Shapes(
large = RoundedCornerShape(0.dp)
)

val Font14SP = 14.sp

val Size35dp = 35.dp

val ButtonBorder = RoundedCornerShape(20.dp)
Expand All @@ -37,6 +34,7 @@ val secondaryColor = Color(0xFFFF8E4C)

private val DarkColorPalette = darkColorScheme(
primary = primaryColor,
onPrimary = Color.White,
secondary = primaryVariant,
tertiary = secondaryColor,
primaryContainer = secondaryColor,
Expand Down

0 comments on commit f473965

Please sign in to comment.