comparison 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
comparison
equal deleted inserted replaced
648:ff2b393e290f 649:60162a939c06
3130 } 3130 }
3131 else 3131 else
3132 { 3132 {
3133 ptargetFont = (tFont *)cfg->font; 3133 ptargetFont = (tFont *)cfg->font;
3134 } 3134 }
3135
3136 if((*(char*)pText == '\005') || (*(char*)pText == '\006'))
3137 {
3138 Xsum += 45;
3139 }
3140 else
3135 if((*(char*)pText) & 0x80) /* Identify a UNICODE character other than standard ASCII using the highest bit */ 3141 if((*(char*)pText) & 0x80) /* Identify a UNICODE character other than standard ASCII using the highest bit */
3136 { 3142 {
3137 decodeUTF8 = ((*(char*)pText) & 0x1F) << 6; /* use 5bits of first byte for upper part of unicode */ 3143 decodeUTF8 = ((*(char*)pText) & 0x1F) << 6; /* use 5bits of first byte for upper part of unicode */
3138 pText++; 3144 pText++;
3139 decodeUTF8 |= (*(char*)pText) & 0x3F; /* add lower 6bits as second part of the unicode */ 3145 decodeUTF8 |= (*(char*)pText) & 0x3F; /* add lower 6bits as second part of the unicode */
3230 } 3236 }
3231 3237
3232 if(*(char*)pText == ' ') 3238 if(*(char*)pText == ' ')
3233 { 3239 {
3234 Xsum += font->spacesize; 3240 Xsum += font->spacesize;
3241 }
3242 else
3243 if((*(char*)pText == '\005') || (*(char*)pText == '\006'))
3244 {
3245 Xsum += 45;
3235 } 3246 }
3236 else 3247 else
3237 { 3248 {
3238 if((*(char*)pText) & 0x80) /* Identify a UNICODE character other than standard ASCII using the highest bit */ 3249 if((*(char*)pText) & 0x80) /* Identify a UNICODE character other than standard ASCII using the highest bit */
3239 { 3250 {