From 1a0083eb382db12a2fd6d58f02fd44ca493bee82 Mon Sep 17 00:00:00 2001 From: Thomas Bouve Date: Sun, 20 Sep 2020 01:43:52 +0200 Subject: [PATCH] Fix correct x positioning Align fields right when less than 3 fields are shown in horizontal mode, using a 5-pixel character width with a 5-character width for each field (i.e. 25 pixels per field). --- pwnagotchi/plugins/default/memtemp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/memtemp.py b/pwnagotchi/plugins/default/memtemp.py index 59bac6d..898df2f 100644 --- a/pwnagotchi/plugins/default/memtemp.py +++ b/pwnagotchi/plugins/default/memtemp.py @@ -143,7 +143,7 @@ class MemTemp(plugins.Plugin): ) else: # default to horizontal - h_pos_x = h_pos[0] + h_pos_x = h_pos[0] + ((len(self.fields) - 3) * -1 * 25) h_pos_y = h_pos[1] ui.add_element( 'memtemp_header',