fix: 电池内部数字改为黑色,避免和填充条颜色混淆
白字压绿底几乎看不见,改为黑色在任何填充色上都清晰 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -116,10 +116,11 @@ class StatusBarView @JvmOverloads constructor(
|
||||
canvas.drawRoundRect(fillRect, 2f, 2f, paint)
|
||||
|
||||
// 电池内部文字:充电时显示 ⚡,否则显示百分比
|
||||
// 深色文字确保在任何填充色上都清晰可读
|
||||
if (batteryLevel >= 0) {
|
||||
val text = if (isCharging) "⚡" else "${batteryLevel}"
|
||||
paint.style = Paint.Style.FILL
|
||||
paint.color = 0xFFFFFFFF.toInt()
|
||||
paint.color = 0xFF000000.toInt()
|
||||
paint.textSize = 11f
|
||||
paint.textAlign = Paint.Align.CENTER
|
||||
paint.typeface = android.graphics.Typeface.DEFAULT_BOLD
|
||||
|
||||
Reference in New Issue
Block a user