Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
508:21bf40bb8151 | 509:56824129dd56 |
---|---|
3622 uint8_t i, secondDigitPage, secondDigitTotal; | 3622 uint8_t i, secondDigitPage, secondDigitTotal; |
3623 | 3623 |
3624 SSettings* pSettings; | 3624 SSettings* pSettings; |
3625 pSettings = settingsGetPointer(); | 3625 pSettings = settingsGetPointer(); |
3626 | 3626 |
3627 if(total > 8) | |
3628 { | |
3629 Font = &FontT24; | |
3630 } | |
3631 | |
3627 hgfx.Image = tMscreen; | 3632 hgfx.Image = tMscreen; |
3628 hgfx.WindowNumberOfTextLines = 1; | 3633 hgfx.WindowNumberOfTextLines = 1; |
3629 hgfx.WindowLineSpacing = 0; | 3634 hgfx.WindowLineSpacing = 0; |
3630 hgfx.WindowTab = 0; | 3635 hgfx.WindowTab = 0; |
3631 | 3636 |
3632 if(!pSettings->FlipDisplay) | 3637 if(!pSettings->FlipDisplay) |
3633 { | 3638 { |
3634 hgfx.WindowX1 = 779; | 3639 hgfx.WindowX1 = 779; |
3635 hgfx.WindowX0 = hgfx.WindowX1 - (25*5); | 3640 if(Font == &FontT24) |
3641 { | |
3642 hgfx.WindowX0 = hgfx.WindowX1 - (Font->spacesize*3); | |
3643 } | |
3644 else | |
3645 { | |
3646 hgfx.WindowX0 = hgfx.WindowX1 - (Font->spacesize2Monospaced*3); | |
3647 } | |
3636 hgfx.WindowY1 = 479; | 3648 hgfx.WindowY1 = 479; |
3637 hgfx.WindowY0 = hgfx.WindowY1 - Font->height; | 3649 hgfx.WindowY0 = hgfx.WindowY1 - Font->height; |
3638 } | 3650 } |
3639 else | 3651 else |
3640 { | 3652 { |