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).
This commit is contained in:
Thomas Bouve 2020-09-20 01:43:52 +02:00 committed by GitHub
parent 72878454f9
commit 1a0083eb38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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',