Mercurial > public > ostc4
diff Discovery/Src/gfx_engine.c @ 509:56824129dd56
Show page number in small letters if more than 8 tabs are active
If the OSTC is operated in CCR mode 9 tabs are shown (8 in the previous version) causing the page number to be overwritten. To avoid this the page number is displayed using a smaller font (only in case of 9 tabs active)
author | Ideenmodellierer |
---|---|
date | Sun, 30 Aug 2020 17:26:00 +0200 |
parents | 2ffee0811ad9 |
children | 0ad0b26ec56b |
line wrap: on
line diff
--- a/Discovery/Src/gfx_engine.c Sun Aug 30 17:23:44 2020 +0200 +++ b/Discovery/Src/gfx_engine.c Sun Aug 30 17:26:00 2020 +0200 @@ -3624,6 +3624,11 @@ SSettings* pSettings; pSettings = settingsGetPointer(); + if(total > 8) + { + Font = &FontT24; + } + hgfx.Image = tMscreen; hgfx.WindowNumberOfTextLines = 1; hgfx.WindowLineSpacing = 0; @@ -3632,7 +3637,14 @@ if(!pSettings->FlipDisplay) { hgfx.WindowX1 = 779; - hgfx.WindowX0 = hgfx.WindowX1 - (25*5); + if(Font == &FontT24) + { + hgfx.WindowX0 = hgfx.WindowX1 - (Font->spacesize*3); + } + else + { + hgfx.WindowX0 = hgfx.WindowX1 - (Font->spacesize2Monospaced*3); + } hgfx.WindowY1 = 479; hgfx.WindowY0 = hgfx.WindowY1 - Font->height; }