Newfont characters are now printable in FLabel, FMenuBar and FMenu

This commit is contained in:
Markus Gans 2015-10-17 21:05:49 +02:00
parent c26b84b10a
commit 5708ac5699
4 changed files with 22 additions and 3 deletions

View File

@ -1,6 +1,7 @@
2015-10-17 Markus Gans <guru.mail@muenster.de> 2015-10-17 Markus Gans <guru.mail@muenster.de>
* More faster header inline code * More faster header inline code
* Improve getXTermFont() and getXTermTitle() * Improve getXTermFont() and getXTermTitle()
* Newfont characters are now printable in FLabel, FMenuBar and FMenu.
2015-10-16 Markus Gans <guru.mail@muenster.de> 2015-10-16 Markus Gans <guru.mail@muenster.de>
* Fixed: calculator behavior for negative values * Fixed: calculator behavior for negative values

View File

@ -181,7 +181,13 @@ void FLabel::printLine ( wchar_t*& line
for (int z=0; z < to_char; z++) for (int z=0; z < to_char; z++)
{ {
if ( ! iswprint(wint_t(line[z])) ) if ( ! iswprint(wint_t(line[z])) )
line[z] = L' '; {
if ( ! isNewFont() && ( int(line[z]) < fc::NF_rev_left_arrow2
|| int(line[z]) > fc::NF_check_mark ) )
{
line[z] = L' ';
}
}
if ( (z == hotkeypos) && isActive ) if ( (z == hotkeypos) && isActive )
{ {
setColor (wc.label_hotkey_fg, wc.label_hotkey_bg); setColor (wc.label_hotkey_fg, wc.label_hotkey_bg);

View File

@ -339,7 +339,13 @@ void FMenu::drawItems()
for (int z=0; z < to_char; z++) for (int z=0; z < to_char; z++)
{ {
if ( ! iswprint(wint_t(item_text[z])) ) if ( ! iswprint(wint_t(item_text[z])) )
item_text[z] = L' '; {
if ( ! isNewFont() && ( int(item_text[z]) < fc::NF_rev_left_arrow2
|| int(item_text[z]) > fc::NF_check_mark ) )
{
item_text[z] = L' ';
}
}
if ( (z == hotkeypos) && is_Active && ! is_Selected ) if ( (z == hotkeypos) && is_Active && ! is_Selected )
{ {
setColor (wc.menu_hotkey_fg, wc.menu_hotkey_bg); setColor (wc.menu_hotkey_fg, wc.menu_hotkey_bg);

View File

@ -201,7 +201,13 @@ void FMenuBar::drawItems()
for (int z=0; z < to_char; z++) for (int z=0; z < to_char; z++)
{ {
if ( ! iswprint(wint_t(item_text[z])) ) if ( ! iswprint(wint_t(item_text[z])) )
item_text[z] = L' '; {
if ( ! isNewFont() && ( int(item_text[z]) < fc::NF_rev_left_arrow2
|| int(item_text[z]) > fc::NF_check_mark ) )
{
item_text[z] = L' ';
}
}
if ( (z == hotkeypos) && is_Active && ! is_Selected ) if ( (z == hotkeypos) && is_Active && ! is_Selected )
{ {
setColor (wc.menu_hotkey_fg, wc.menu_hotkey_bg); setColor (wc.menu_hotkey_fg, wc.menu_hotkey_bg);