Replaced header divider by a background color
Updated background color
This commit is contained in:
parent
4d24b2d5bf
commit
90d83fa83e
@ -1,3 +1,4 @@
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.*
|
||||
@ -26,6 +27,7 @@ import extensions.icon
|
||||
import extensions.toByteArray
|
||||
import org.eclipse.jgit.lib.Ref
|
||||
import org.jetbrains.skija.Image
|
||||
import theme.headerBackground
|
||||
|
||||
@Composable
|
||||
fun Branches(gitManager: GitManager) {
|
||||
@ -43,16 +45,16 @@ fun Branches(gitManager: GitManager) {
|
||||
Column {
|
||||
Text(
|
||||
modifier = Modifier
|
||||
.background(MaterialTheme.colors.headerBackground)
|
||||
.padding(vertical = 16.dp)
|
||||
.fillMaxWidth(),
|
||||
text = "Branches",
|
||||
text = "Local branches",
|
||||
fontWeight = FontWeight.Bold,
|
||||
textAlign = TextAlign.Center,
|
||||
color = MaterialTheme.colors.primary,
|
||||
maxLines = 1,
|
||||
)
|
||||
|
||||
Divider(modifier = Modifier.fillMaxWidth())
|
||||
|
||||
LazyColumn(modifier = Modifier.weight(5f)) {
|
||||
itemsIndexed(branches) { _, branch ->
|
||||
BranchRow(
|
||||
|
@ -24,6 +24,7 @@ import kotlinx.coroutines.*
|
||||
import org.eclipse.jgit.diff.DiffEntry
|
||||
import org.eclipse.jgit.revwalk.RevCommit
|
||||
import org.jetbrains.skija.Image.makeFromEncoded
|
||||
import theme.headerBackground
|
||||
import theme.primaryTextColor
|
||||
import theme.secondaryTextColor
|
||||
import java.net.HttpURLConnection
|
||||
@ -129,15 +130,16 @@ fun CommitChanges(commitDiff: Pair<RevCommit, List<DiffEntry>>, onDiffSelected:
|
||||
Column {
|
||||
Text(
|
||||
modifier = Modifier
|
||||
.background(MaterialTheme.colors.headerBackground)
|
||||
.padding(vertical = 16.dp)
|
||||
.fillMaxWidth(),
|
||||
text = "Files changed",
|
||||
fontWeight = FontWeight.Bold,
|
||||
textAlign = TextAlign.Center,
|
||||
color = MaterialTheme.colors.primary,
|
||||
maxLines = 1,
|
||||
)
|
||||
|
||||
Divider(modifier = Modifier.fillMaxWidth())
|
||||
|
||||
CommitLogChanges(diff, onDiffSelected = onDiffSelected)
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ import androidx.compose.material.icons.filled.Close
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.RectangleShape
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
@ -26,6 +27,7 @@ import extensions.filePath
|
||||
import extensions.icon
|
||||
import git.StageStatus
|
||||
import org.eclipse.jgit.diff.DiffEntry
|
||||
import theme.headerBackground
|
||||
|
||||
@OptIn(ExperimentalAnimationApi::class)
|
||||
@Composable
|
||||
@ -133,16 +135,16 @@ private fun EntriesList(
|
||||
Column {
|
||||
Text(
|
||||
modifier = Modifier
|
||||
.background(color = MaterialTheme.colors.headerBackground)
|
||||
.padding(vertical = 16.dp)
|
||||
.fillMaxWidth(),
|
||||
text = title,
|
||||
fontWeight = FontWeight.Bold,
|
||||
textAlign = TextAlign.Center,
|
||||
color = MaterialTheme.colors.primary,
|
||||
maxLines = 1,
|
||||
)
|
||||
|
||||
Divider(modifier = Modifier.fillMaxWidth())
|
||||
|
||||
LazyColumn(modifier = Modifier.weight(5f)) {
|
||||
itemsIndexed(diffEntries) { index, diffEntry ->
|
||||
FileEntry(
|
||||
|
@ -14,5 +14,6 @@ val errorColor = Color(0xFFFA4B4B)
|
||||
val primaryGrayLight = Color(0xFF464646)
|
||||
val accentGrayLight = Color(0xFFCCCCCC)
|
||||
|
||||
val backgroundColorLight = Color(0xFFF5F7FA)
|
||||
val surfaceColorLight = Color(0xFFFFFFFF)
|
||||
val backgroundColorLight = Color(0xFFEBEFF7)
|
||||
val surfaceColorLight = Color(0xFFFFFFFF)
|
||||
val headerBackgroundLight = Color(0xFFF4F6FA)
|
@ -55,3 +55,7 @@ val Colors.primaryGray: Color
|
||||
@get:Composable
|
||||
val Colors.accentGray: Color
|
||||
get() = accentGrayLight
|
||||
|
||||
@get:Composable
|
||||
val Colors.headerBackground: Color
|
||||
get() = headerBackgroundLight
|
||||
|
Loading…
Reference in New Issue
Block a user