From 28669ed5f64d5ca113274356ae0cbf3f3ee7553b Mon Sep 17 00:00:00 2001 From: Paul Falstad Date: Sun, 27 Oct 2024 14:38:11 -0700 Subject: [PATCH] make off segments light gray in white background mode (#99) --- src/com/lushprojects/circuitjs1/client/SevenSegElm.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/lushprojects/circuitjs1/client/SevenSegElm.java b/src/com/lushprojects/circuitjs1/client/SevenSegElm.java index 7a0e5e3e..0316de3a 100644 --- a/src/com/lushprojects/circuitjs1/client/SevenSegElm.java +++ b/src/com/lushprojects/circuitjs1/client/SevenSegElm.java @@ -62,12 +62,13 @@ void setDefaults() { String dump() { return super.dump() + " " + baseSegmentCount + " " + extraSegment + " " + diodeDirection; } String getChipName() { return segmentCount + "-segment display"; } - Color darkred; + Color darkred, lightgray; void setupPins() { if (pinCount == 0) return; darkred = new Color(30, 0, 0); + lightgray = new Color(255-10, 255-10, 255-10); int segmentPinsOnLeftSide = (baseSegmentCount+1)/2; sizeY = segmentPinsOnLeftSide; if (baseSegmentCount == 7) { @@ -279,7 +280,7 @@ void stepFinished() { void setColor(Graphics g, int p) { if (diodeDirection == 0) { g.setColor(pins[p].value ? Color.red : - sim.printableCheckItem.getState() ? Color.white : darkred); + sim.printableCheckItem.getState() ? lightgray : darkred); return; } // 10mA current = max brightness