diff --git a/src/main/kotlin/org/briarproject/briar/desktop/paul/views/BriarSidebar.kt b/src/main/kotlin/org/briarproject/briar/desktop/paul/views/BriarSidebar.kt index 307421a2662e1aa51247db770da4f8b6c5c672c4..886920f197c3e73321b1e32ecb7bf135ddf71a69 100644 --- a/src/main/kotlin/org/briarproject/briar/desktop/paul/views/BriarSidebar.kt +++ b/src/main/kotlin/org/briarproject/briar/desktop/paul/views/BriarSidebar.kt @@ -33,9 +33,11 @@ import androidx.compose.ui.unit.dp import org.briarproject.briar.desktop.paul.theme.briarBlack import org.briarproject.briar.desktop.paul.theme.briarBlue +val SIDEBAR_WIDTH = 56.dp + @Composable fun BriarSidebar(uiMode: UiModes, setUiMode: (UiModes) -> Unit) { - Surface(modifier = Modifier.width(56.dp).fillMaxHeight(), color = briarBlue) { + Surface(modifier = Modifier.width(SIDEBAR_WIDTH).fillMaxHeight(), color = briarBlue) { Column(verticalArrangement = Arrangement.Top) { IconButton( modifier = Modifier.align(Alignment.CenterHorizontally).padding(top = 5.dp, bottom = 4.dp), diff --git a/src/main/kotlin/org/briarproject/briar/desktop/paul/views/PrivateMessageView.kt b/src/main/kotlin/org/briarproject/briar/desktop/paul/views/PrivateMessageView.kt index 0b33b73357154c1e9790b7f97d0a7536eb032f3e..78918c61fe956b9ad0f6c83abde795a7b49e8b70 100644 --- a/src/main/kotlin/org/briarproject/briar/desktop/paul/views/PrivateMessageView.kt +++ b/src/main/kotlin/org/briarproject/briar/desktop/paul/views/PrivateMessageView.kt @@ -102,6 +102,7 @@ import java.time.temporal.ChronoUnit import java.util.Collections val HEADER_SIZE = 56.dp +val CONTACTLIST_WIDTH = 275.dp // Right drawer state enum class ContactInfoDrawerState { @@ -338,7 +339,7 @@ fun ContactList( resultList } Scaffold( - modifier = Modifier.fillMaxHeight().width(246.dp), + modifier = Modifier.fillMaxHeight().width(CONTACTLIST_WIDTH), backgroundColor = briarBlack, topBar = { Column( @@ -694,9 +695,14 @@ fun DrawMessageRow( if (infoDrawer) { // TODO Find non-hacky way of setting scrim on entire app // We're able to make this work because the ContactList and BriarSidebar have constant widths which add to 302.dp - Box(Modifier.offset(-302.dp).requiredSize(maxWidth + 302.dp, maxHeight).background(Color(0, 0, 0, 100))) + Box( + Modifier.offset(-(CONTACTLIST_WIDTH + SIDEBAR_WIDTH)) + .requiredSize(maxWidth + CONTACTLIST_WIDTH + SIDEBAR_WIDTH, maxHeight) + .background(Color(0, 0, 0, 100)) + ) Column( - modifier = Modifier.fillMaxHeight().width(275.dp).offset(maxWidth + animatedInfoDrawerOffsetX) + modifier = Modifier.fillMaxHeight().width(CONTACTLIST_WIDTH) + .offset(maxWidth + animatedInfoDrawerOffsetX) .background(briarBlack, RoundedCornerShape(topStart = 10.dp, bottomStart = 10.dp)) ) { ContactInfoDrawer(contact, contacts, setInfoDrawer, drawerState)