From 64346522b3a7b5e6f86333e48bc99163fef77e10 Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 18 Oct 2023 15:08:05 +0800 Subject: [PATCH] make the vertical stripe smaller relative to the overall height this ratio should be enough to spoil the XOR effect for any forging application but small enough that it's not as visually distracting. --- services/graphics-server/src/op.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/graphics-server/src/op.rs b/services/graphics-server/src/op.rs index 873620b82..43bdc9e43 100644 --- a/services/graphics-server/src/op.rs +++ b/services/graphics-server/src/op.rs @@ -275,7 +275,7 @@ pub fn rectangle(fb: &mut LcdFB, rect: Rectangle, clip: Option, xor: // This is to make it annoying for someone using an XOR rectangle to synthesize inverted // text on an otherwise untrusted dialog box (I suspect it's not impossible, but introduces // a likelihood of drawing artifacts especially across translations and font size selections). - if pixel.0.y % 20 < 10 { + if pixel.0.y % 20 < 18 { xor_pixel(fb, pixel.0.x, pixel.0.y); } else { // don't allow XOR on some pixels to avoid this being used as a primitive to synthesize secure boxes