diff Discovery/Src/gfx_engine.c @ 649:60162a939c06

Bugfix consider checkbox in calculation of right aligned and centered position: In previous version the size of the checkbox was ignored during calculation of the string view size. As result the checkbox was not displayed as it should be. To fix this the size of a chebox is now added to the string size.
author Ideenmodellierer
date Mon, 19 Apr 2021 20:16:24 +0200
parents ba83a8ef9bad
children 7fa5ef6ae419
line wrap: on
line diff
--- a/Discovery/Src/gfx_engine.c	Mon Apr 19 20:14:20 2021 +0200
+++ b/Discovery/Src/gfx_engine.c	Mon Apr 19 20:16:24 2021 +0200
@@ -3132,6 +3132,12 @@
 		{
 			ptargetFont = (tFont *)cfg->font;
 		}
+
+		if((*(char*)pText == '\005') || (*(char*)pText == '\006'))
+		{
+			Xsum += 45;
+		}
+		else
 		if((*(char*)pText) & 0x80) /* Identify a UNICODE character other than standard ASCII using the highest bit */
 		{
 			decodeUTF8 = ((*(char*)pText) & 0x1F) << 6; /* use 5bits of first byte for upper part of unicode */
@@ -3234,6 +3240,11 @@
 			Xsum += font->spacesize;
 		}
 		else
+		if((*(char*)pText == '\005') || (*(char*)pText == '\006'))
+		{
+			Xsum += 45;
+		}
+		else
 		{
 			if((*(char*)pText) & 0x80) /* Identify a UNICODE character other than standard ASCII using the highest bit */
 			{