Improved light theme and removed unused property

This commit is contained in:
Abdelilah El Aissaoui 2022-09-29 10:14:51 +02:00
parent 8c3e11ef38
commit bfeaf717b7
5 changed files with 11 additions and 12 deletions

View File

@ -13,11 +13,10 @@ val lightTheme = ColorsScheme(
onError = Color(0xFFFFFFFF),
background = Color(0xFFFFFFFF),
backgroundSelected = Color(0xC0cee1f2),
surface = Color(0xFFe9ecf7),
surface = Color(0xFFf1f3fa),
secondarySurface = Color(0xFFedeef2),
headerBackground = Color(0xFFF4F6FA),
headerBackground = Color(0xFFe9eaed),
borderColor = Color(0xFF989898),
graphHeaderBackground = Color(0xFFF4F6FA),
addFile = Color(0xFF32A852),
deletedFile = Color(0xFFc93838),
modifiedFile = Color(0xFF0070D8),
@ -46,7 +45,6 @@ val darkBlueTheme = ColorsScheme(
secondarySurface = Color(0xFF1a2c40),
headerBackground = Color(0xFF0a335c),
borderColor = Color(0xFF989898),
graphHeaderBackground = Color(0xFF303132),
addFile = Color(0xFF32A852),
deletedFile = Color(0xFFc93838),
modifiedFile = Color(0xFF0070D8),
@ -74,7 +72,6 @@ val darkGrayTheme = ColorsScheme(
secondarySurface = Color(0xFF282d36),
headerBackground = Color(0xFF21303d),
borderColor = Color(0xFF989898),
graphHeaderBackground = Color(0xFF303132),
addFile = Color(0xFF32A852),
deletedFile = Color(0xFFc93838),
modifiedFile = Color(0xFF0070D8),

View File

@ -31,7 +31,6 @@ data class ColorsScheme(
val headerBackground: Color,
val onHeader: Color = primaryText,
val borderColor: Color,
val graphHeaderBackground: Color,
val addFile: Color,
val deletedFile: Color,
val modifiedFile: Color,

View File

@ -53,10 +53,6 @@ val Colors.borderColor: Color
val Colors.headerBackground: Color
get() = appTheme.headerBackground
@get:Composable
val Colors.graphHeaderBackground: Color
get() = appTheme.graphHeaderBackground
@get:Composable
val Colors.addFile: Color
get() = appTheme.addFile

View File

@ -1,5 +1,6 @@
package com.jetpackduba.gitnuro.ui.components
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Box
@ -16,6 +17,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.takeOrElse
@ -37,6 +39,7 @@ fun AdjustableOutlinedTextField(
textStyle: TextStyle = LocalTextStyle.current.copy(fontSize = MaterialTheme.typography.body1.fontSize),
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
shape: Shape = RoundedCornerShape(4.dp),
backgroundColor: Color = MaterialTheme.colors.background
) {
val textColor = textStyle.color.takeOrElse {
colors.textColor(enabled).value
@ -47,7 +50,8 @@ fun AdjustableOutlinedTextField(
BasicTextField(
modifier = modifier
.heightIn(min = 48.dp),
.heightIn(min = 48.dp)
.background(backgroundColor),
value = value,
onValueChange = onValueChange,
enabled = enabled,

View File

@ -32,7 +32,10 @@ fun AuthorDialog(
var name by remember(authorInfo) { mutableStateOf(authorInfo.name.orEmpty()) }
var email by remember(authorInfo) { mutableStateOf(authorInfo.email.orEmpty()) }
MaterialDialog(onCloseRequested = onClose) {
MaterialDialog(
onCloseRequested = onClose,
background = MaterialTheme.colors.surface,
) {
Column(
modifier = Modifier
.padding(horizontal = 8.dp),