mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-26 18:45:24 +00:00
* Fix small-screen header clipping: reserve status-bar space and center-constrain titles (fixes #519) * Remove redundant Gradle configuration lines
This commit is contained in:
@@ -26,6 +26,8 @@ import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import com.bitchat.android.core.ui.utils.singleOrTripleClickable
|
||||
import androidx.compose.foundation.Canvas
|
||||
import androidx.compose.ui.geometry.Offset
|
||||
@@ -406,7 +408,9 @@ private fun PrivateChatHeader(
|
||||
Text(
|
||||
text = titleText,
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
color = Color(0xFFFF9500) // Orange
|
||||
color = Color(0xFFFF9500), // Orange
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
@@ -493,8 +497,12 @@ private fun ChannelHeader(
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
color = Color(0xFFFF9500), // Orange to match input field
|
||||
modifier = Modifier
|
||||
.align(Alignment.Center)
|
||||
.clickable { onSidebarClick() }
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 56.dp)
|
||||
.clickable { onSidebarClick() },
|
||||
textAlign = TextAlign.Center,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
|
||||
// Leave button - positioned on the right
|
||||
@@ -552,7 +560,9 @@ private fun MainHeader(
|
||||
modifier = Modifier.singleOrTripleClickable(
|
||||
onSingleClick = onTitleClick,
|
||||
onTripleClick = onTripleTitleClick
|
||||
)
|
||||
),
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.width(2.dp))
|
||||
|
||||
Reference in New Issue
Block a user