|
@@ -13,11 +13,17 @@ import androidx.compose.foundation.layout.size
|
|
|
import androidx.compose.foundation.layout.statusBarsPadding
|
|
|
import androidx.compose.foundation.layout.wrapContentHeight
|
|
|
import androidx.compose.foundation.layout.wrapContentWidth
|
|
|
+import androidx.compose.material3.Text
|
|
|
import androidx.compose.runtime.Composable
|
|
|
+import androidx.compose.ui.Alignment
|
|
|
import androidx.compose.ui.Modifier
|
|
|
import androidx.compose.ui.graphics.Color
|
|
|
import androidx.compose.ui.res.painterResource
|
|
|
+import androidx.compose.ui.text.TextStyle
|
|
|
+import androidx.compose.ui.text.font.FontWeight
|
|
|
import androidx.compose.ui.unit.dp
|
|
|
+import androidx.compose.ui.unit.sp
|
|
|
+import com.zaojiao.component.common.Colors
|
|
|
import com.zaojiao.component.common.Spacer
|
|
|
|
|
|
@Composable
|
|
@@ -29,6 +35,7 @@ fun HomePersonalTopBar() {
|
|
|
.fillMaxWidth()
|
|
|
.wrapContentHeight(),
|
|
|
horizontalArrangement = Arrangement.End,
|
|
|
+ verticalAlignment = Alignment.CenterVertically,
|
|
|
) {
|
|
|
HomePersonalTopBarItem(iconRes = R.mipmap.personal_message)
|
|
|
Spacer(width = 21.dp)
|
|
@@ -43,13 +50,31 @@ fun HomePersonalTopBar() {
|
|
|
fun HomePersonalScrollTopBar() {
|
|
|
Row(
|
|
|
modifier = Modifier
|
|
|
- .background(Color.Red)
|
|
|
+ .background(Color.White)
|
|
|
.statusBarsPadding()
|
|
|
.padding(vertical = 9.dp)
|
|
|
.fillMaxWidth()
|
|
|
.wrapContentHeight(),
|
|
|
horizontalArrangement = Arrangement.End,
|
|
|
+ verticalAlignment = Alignment.CenterVertically,
|
|
|
) {
|
|
|
+ Spacer(width = 16.dp)
|
|
|
+ Image(
|
|
|
+ painter = painterResource(id = R.mipmap.ic_default_avatar),
|
|
|
+ contentDescription = "用户头像",
|
|
|
+ modifier = Modifier.size(30.dp, 30.dp)
|
|
|
+ )
|
|
|
+ Spacer(width = 8.dp)
|
|
|
+ Text(
|
|
|
+ text = "逻辑狗",
|
|
|
+ modifier = Modifier.weight(1f),
|
|
|
+ style = TextStyle(
|
|
|
+ fontSize = 14.sp,
|
|
|
+ lineHeight = 14.sp,
|
|
|
+ fontWeight = FontWeight.Medium,
|
|
|
+ color = Colors.FF000000,
|
|
|
+ ),
|
|
|
+ )
|
|
|
HomePersonalTopBarItem(iconRes = R.mipmap.personal_message)
|
|
|
Spacer(width = 21.dp)
|
|
|
HomePersonalTopBarItem(iconRes = R.mipmap.personal_cart)
|