feat(terminal): 去掉提示符/光标/输入文字的颜色

Text 默认的 prompt/cursor 由绿色改为与普通文本一致的 0xCCCCCC,
输入文字也不再硬编码白色;终端整体保持单色。
This commit is contained in:
TermiNexus committed 2026-10-27 14:54:00 +08:00
1 parent c379cadc38
commit 395e5eefab
1 file changed
+3 -3
+3 -3
View File
@@ -1229,8 +1229,8 @@ virtual class Text(Widget):
self.prompt[2] = 0
self.bg_color = uint32(0x0C0C0C)
self.text_color = uint32(0xCCCCCC)
self.prompt_color = uint32(0x00FF00)
self.cursor_color = uint32(0x00FF00)
self.prompt_color = uint32(0xCCCCCC)
self.cursor_color = uint32(0xCCCCCC)
self.border_color = uint32(0x333333)
self.on_command = None
self.history_count = 0
@@ -1263,7 +1263,7 @@ virtual class Text(Widget):
_draw_text(fb, fw, fh, self.x + 4, prompt_y, &self.prompt[0], self.prompt_color)
if self.input_len > 0:
_draw_text(fb, fw, fh, self.x + 4 + plen * CHAR_W, prompt_y,
&self.input_buf[0], uint32(0xFFFFFF))
&self.input_buf[0], self.text_color)
cx_pos: int = self.x + 4 + (plen + self.cursor_pos) * CHAR_W
if cx_pos < self.x + self.w - 4:
_fill_rect(fb, fw, fh, cx_pos, prompt_y, CHAR_W // 2, CHAR_H, self.cursor_color)