Menu supports newfont

This commit is contained in:
Markus Gans 2015-11-08 02:01:35 +01:00
parent b05a20943a
commit fb8d3df421
5 changed files with 30 additions and 19 deletions

View File

@ -1,5 +1,6 @@
2015-11-05 Markus Gans <guru.mail@muenster.de>
2015-11-07 Markus Gans <guru.mail@muenster.de>
* Improved menu focus handling
* Menu supports newfont
2015-11-05 Markus Gans <guru.mail@muenster.de>
* Menu bar navigation without menu drop down

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -433,8 +433,6 @@ void FMenu::drawBorder()
// border right⎹
print (fc::NF_rev_border_line_right);
}
if ( (flags & SHADOW) == 0 )
{
gotoxy (x1, y2);
// lower left corner border ⎣
print (fc::NF_border_corner_lower_left);
@ -444,7 +442,6 @@ void FMenu::drawBorder()
// lower right corner border ⎦
print (fc::NF_rev_border_corner_lower_right);
}
}
else
{
gotoxy (x1, y1);
@ -602,10 +599,20 @@ inline void FMenu::drawSeparator(int y)
setColor (wc.menu_active_fg, wc.menu_active_bg);
if ( isMonochron() )
setReverse(true);
if ( isNewFont() )
{
print(fc::NF_border_line_vertical_right);
FString line(width-2, wchar_t(fc::BoxDrawingsHorizontal));
print (line);
print(fc::NF_rev_border_line_vertical_left);
}
else
{
print(fc::BoxDrawingsVerticalAndRight);
FString line(width-2, wchar_t(fc::BoxDrawingsHorizontal));
print (line);
print(fc::BoxDrawingsVerticalAndLeft);
}
if ( isMonochron() )
setReverse(false);
}

View File

@ -445,9 +445,12 @@ bool FMenuItem::setFocus (bool on)
if ( ! selected )
{
FMenuList* menu_list = dynamic_cast<FMenuList*>(getSuperMenu());
menu_list->unselectItem();
setSelected();
if ( menu_list )
{
menu_list->unselectItem();
menu_list->setSelectedItem(this);
}
if ( statusBar() )
statusBar()->drawMessage();

View File

@ -706,7 +706,7 @@ void MyDialog::adjustSize()
if ( X < 1 )
X = 1;
setX (X, false);
myList->setHeight (getHeight() - 4, false);
myList->setHeight (getHeight() - 3, false);
FDialog::adjustSize();
}