App 2.27.2: Terminal in the accent colour; Original as a colour choice

Retro and Terminal are one entry each; the accent colour drop-down
offers "Original" first for them, remembered per style. The old
"Retro (accent colour)" entry is folded in and its stored value
migrated. Emulator only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
2026-10-24 21:38:01 +02:00
co-authored by Claude Opus 5.5
parent ef2ba89fba
commit 1c85fd2d9f
10 changed files with 137 additions and 51 deletions
@@ -14,6 +14,10 @@ import java.util.Locale;
* a prompt with a blinking cursor (it blinks because readings redraw the view; it does not
* animate on its own). A low battery turns its row amber. Unread values show "—" and an empty
* bar.
*
* Two palettes: green phosphor, or the chosen accent colour ({@link #setAccentPalette}) — the
* text in its light shade, the command line in the accent itself, on plain black. The low
* battery stays amber in both.
*/
final class TerminalView extends ClusterCanvasView {
@@ -21,23 +25,33 @@ final class TerminalView extends ClusterCanvasView {
private final Paint text = new Paint(Paint.ANTI_ALIAS_FLAG);
private final Paint scan = new Paint();
private final int green, dim, amber;
private final int accentText, accentDim;
private final int amber = 0xFFFFB000;
private int green, dim, background;
TerminalView(Context context) {
super(context);
green = 0xFF33FF66;
dim = 0xFF1C8A3A;
amber = 0xFFFFB000;
accentText = AccentColor.resolve(context, R.attr.evAccentLight);
accentDim = AccentColor.resolve(context, R.attr.evAccent);
setAccentPalette(false);
text.setTypeface(Typeface.MONOSPACE);
scan.setColor(0x0CFFFFFF);
}
/** The chosen accent colour instead of green phosphor. */
void setAccentPalette(boolean accent) {
green = accent ? accentText : 0xFF33FF66;
dim = accent ? accentDim : 0xFF1C8A3A;
background = accent ? 0xFF050505 : 0xFF020A04;
invalidate();
}
@Override
protected void onDraw(Canvas c) {
super.onDraw(c);
float w = getWidth(), h = getHeight();
if (w <= 0 || h <= 0) return;
c.drawColor(0xFF020A04);
c.drawColor(background);
// About 14 rows at 1.32 em each plus margins; monospace is about 0.6 em wide and the
// longest row about 58 characters.