mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
pick a more "happens to be aesthetic" setting for the XOR op defacing
XOR op should not be usable to create fake security boxes but it also looks really ugly to have it defaced. This small tweak makes the XOR function look decent for the initial purpose of the function (chat status bar wait indicator). Eventually, this will be a controversial decision, but I'll kick that down the road.
This commit is contained in:
parent
4142549804
commit
8f549b3031
1 changed files with 1 additions and 1 deletions
|
|
@ -275,7 +275,7 @@ pub fn rectangle(fb: &mut LcdFB, rect: Rectangle, clip: Option<Rectangle>, 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 < 18 {
|
||||
if pixel.0.y % 25 != 5 {
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue