Changed current branch design in left branches panel

This commit is contained in:
Abdelilah El Aissaoui 2021-11-28 06:44:50 +01:00
parent 849aeb17cc
commit d8f1bcb8bf
3 changed files with 12 additions and 2 deletions

View file

@ -62,10 +62,16 @@ private fun BranchRow(
) {
SideMenuSubentry(
text = branch.simpleName,
iconResourcePath = "branch.svg"
iconResourcePath = "branch.svg",
bold = isCurrentBranch,
) {
if (isCurrentBranch) {
Text("***")
Icon(
painter = painterResource("location.svg"),
contentDescription = null,
modifier = Modifier.padding(horizontal = 4.dp),
tint = MaterialTheme.colors.primary,
)
}
}
}

View file

@ -12,6 +12,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
@ -21,6 +22,7 @@ import app.theme.primaryTextColor
fun SideMenuSubentry(
text: String,
iconResourcePath: String,
bold: Boolean = false,
additionalInfo: @Composable () -> Unit = {}
) {
Row(
@ -44,6 +46,7 @@ fun SideMenuSubentry(
modifier = Modifier.weight(1f, fill = true),
maxLines = 1,
fontSize = 14.sp,
fontWeight = if(bold) FontWeight.SemiBold else FontWeight.Normal,
color = MaterialTheme.colors.primaryTextColor,
overflow = TextOverflow.Ellipsis,
)

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="12px" viewBox="0 0 24 24" width="12px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"/></svg>

After

Width:  |  Height:  |  Size: 223 B