fix(launcher): Now Playing 死循环修复(空态不再每帧整页重画,修100%CPU/卡死) + NP页接管电源键(单击息屏/亮屏) + NP页自动息屏 + 状态栏充电闪电图标(sb_icons 新增 bolt, charging 时电量图标左邻显示)。宿主 test_sb_statusbar PASS; launcher 6de97628 待入 M2.92

This commit is contained in:
MeowOS committed 2026-09-01 04:40:34 +08:00
1 parent 4bafdb5d69
commit 614694ad4a
6 files changed
+47 -5

No files matched your search

+1
View File
@@ -62,6 +62,7 @@ void meow_ui_sys_statusbar_render_off(int yoff);
#define MEOW_SB_ICON_BT_CONN 11
#define MEOW_SB_ICON_BT_DIS 12
#define MEOW_SB_ICON_BT_SEARCH 13
#define MEOW_SB_ICON_BATT_CHG 14
/* 状态栏右下布局常量(与 launcher SB_* 对齐):图标右缘↔文字间隙 / 相邻项间隙 / 图标目标 ink 高 /
* 右簇左缘相对时钟右缘安全间距 / 图标 ink 垂直中心(=状态栏文字中心,28px 栏约 14)。 */
+2
View File
@@ -371,6 +371,8 @@ void meow_ui_sys_statusbar_render_off(int yoff)
if (g_sys.batt >= 0) { /* 电量:图标+%(未知不画)——最右项 */
snprintf(val, sizeof val, "%d%%", g_sys.batt);
sb_r_place(&xr, MEOW_SB_ICON_BATT, val, col, MEOW_SB_ICON_INK, ty, ycy);
if (g_sys.charging) /* 充电中:电量图标左邻加闪电(M2.92) */
sb_r_place(&xr, MEOW_SB_ICON_BATT_CHG, NULL, col, MEOW_SB_ICON_INK, ty, ycy);
}
snprintf(val, sizeof val, "%d%%", g_sys.vol);
sb_r_place(&xr, MEOW_SB_ICON_VOL, val, col, MEOW_SB_ICON_INK, ty, ycy); /* 音量:图标+% */
+7 -1
View File
@@ -191,6 +191,11 @@ static const unsigned char SB_ICON_BT_SEARCH[1024]={
0,0,0,0,0,2,3,2,0,0,2,0,190,252,251,252,81,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,190,255,251,83,0,4,0,0,0,0,0,0,0,0,0,0,0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255,255,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,255,255,255,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,159,255,255,255,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,255,255,255,255,207,63,63,63,63,63,63,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,191,255,255,255,255,255,255,255,255,255,255,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,95,255,255,255,255,255,255,255,255,255,255,239,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,223,255,255,255,255,255,255,255,255,255,255,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,255,255,255,255,255,255,255,255,255,255,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,239,255,255,255,255,255,255,255,255,255,239,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,111,255,255,255,255,79,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,255,255,255,175,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,239,255,255,239,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,255,255,255,79,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,95,255,255,175,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,159,255,239,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,223,255,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,255,143,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,79,223,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
static const sb_icon_t sb_icons[] = {
{ SB_ICON_WIFI },
{ SB_ICON_BT },
@@ -206,11 +211,12 @@ static const sb_icon_t sb_icons[] = {
{ SB_ICON_BT_CONN },
{ SB_ICON_BT_DIS },
{ SB_ICON_BT_SEARCH },
{ SB_ICON_BATT_CHG },
};
/* 枚举索引(与 sb_icons[] 对应) */
enum { SB_I_WIFI=0, SB_I_BT=1, SB_I_BATT=2, SB_I_VOL=3, SB_I_BRIGHT=4,
SB_I_WIFI_STRONG=5, SB_I_WIFI_MEDIUM=6, SB_I_WIFI_WEAK=7,
SB_I_WIFI_NO=8, SB_I_WIFI_OFF=9, SB_I_BT_NO=10, SB_I_BT_CONN=11,
SB_I_BT_DIS=12, SB_I_BT_SEARCH=13 };
SB_I_BT_DIS=12, SB_I_BT_SEARCH=13, SB_I_BATT_CHG=14 };
#endif /* SB_ICONS_H */