Improve inverted text legibility near the edge

Added logic to prevent inverted text blending with the screen bezel if placed at the very edge.
This commit is contained in:
regicidal.plutophage 2023-02-27 19:16:30 +03:00 committed by GitHub
parent 0b87043de4
commit 6f39c67e0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,10 +93,10 @@ class Oled(Extension):
color=0xFFFFFF if view[9] == False else 0x000000,
background_color=0x000000 if view[9] == False else 0xFFFFFF,
anchor_point=(view[5],view[6]),
anchored_position=(view[1],view[2]),
anchored_position=(view[1] if view[9] == False else view[1]+1,view[2]),
label_direction=view[7],
line_spacing=view[8],
padding_left=1,
padding_left=0 if view[9] == False else 1,
)
)
elif view[4] == OledEntryType.IMG: