Menu supports newfont
This commit is contained in:
parent
b05a20943a
commit
fb8d3df421
|
@ -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
|
* Improved menu focus handling
|
||||||
|
* Menu supports newfont
|
||||||
|
|
||||||
2015-11-05 Markus Gans <guru.mail@muenster.de>
|
2015-11-05 Markus Gans <guru.mail@muenster.de>
|
||||||
* Menu bar navigation without menu drop down
|
* Menu bar navigation without menu drop down
|
||||||
|
|
BIN
doc/newfont1.png
BIN
doc/newfont1.png
Binary file not shown.
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.6 KiB |
|
@ -433,8 +433,6 @@ void FMenu::drawBorder()
|
||||||
// border right⎹
|
// border right⎹
|
||||||
print (fc::NF_rev_border_line_right);
|
print (fc::NF_rev_border_line_right);
|
||||||
}
|
}
|
||||||
if ( (flags & SHADOW) == 0 )
|
|
||||||
{
|
|
||||||
gotoxy (x1, y2);
|
gotoxy (x1, y2);
|
||||||
// lower left corner border ⎣
|
// lower left corner border ⎣
|
||||||
print (fc::NF_border_corner_lower_left);
|
print (fc::NF_border_corner_lower_left);
|
||||||
|
@ -444,7 +442,6 @@ void FMenu::drawBorder()
|
||||||
// lower right corner border ⎦
|
// lower right corner border ⎦
|
||||||
print (fc::NF_rev_border_corner_lower_right);
|
print (fc::NF_rev_border_corner_lower_right);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gotoxy (x1, y1);
|
gotoxy (x1, y1);
|
||||||
|
@ -602,10 +599,20 @@ inline void FMenu::drawSeparator(int y)
|
||||||
setColor (wc.menu_active_fg, wc.menu_active_bg);
|
setColor (wc.menu_active_fg, wc.menu_active_bg);
|
||||||
if ( isMonochron() )
|
if ( isMonochron() )
|
||||||
setReverse(true);
|
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);
|
print(fc::BoxDrawingsVerticalAndRight);
|
||||||
FString line(width-2, wchar_t(fc::BoxDrawingsHorizontal));
|
FString line(width-2, wchar_t(fc::BoxDrawingsHorizontal));
|
||||||
print (line);
|
print (line);
|
||||||
print(fc::BoxDrawingsVerticalAndLeft);
|
print(fc::BoxDrawingsVerticalAndLeft);
|
||||||
|
}
|
||||||
if ( isMonochron() )
|
if ( isMonochron() )
|
||||||
setReverse(false);
|
setReverse(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -445,9 +445,12 @@ bool FMenuItem::setFocus (bool on)
|
||||||
if ( ! selected )
|
if ( ! selected )
|
||||||
{
|
{
|
||||||
FMenuList* menu_list = dynamic_cast<FMenuList*>(getSuperMenu());
|
FMenuList* menu_list = dynamic_cast<FMenuList*>(getSuperMenu());
|
||||||
menu_list->unselectItem();
|
|
||||||
setSelected();
|
setSelected();
|
||||||
|
if ( menu_list )
|
||||||
|
{
|
||||||
|
menu_list->unselectItem();
|
||||||
menu_list->setSelectedItem(this);
|
menu_list->setSelectedItem(this);
|
||||||
|
}
|
||||||
|
|
||||||
if ( statusBar() )
|
if ( statusBar() )
|
||||||
statusBar()->drawMessage();
|
statusBar()->drawMessage();
|
||||||
|
|
|
@ -706,7 +706,7 @@ void MyDialog::adjustSize()
|
||||||
if ( X < 1 )
|
if ( X < 1 )
|
||||||
X = 1;
|
X = 1;
|
||||||
setX (X, false);
|
setX (X, false);
|
||||||
myList->setHeight (getHeight() - 4, false);
|
myList->setHeight (getHeight() - 3, false);
|
||||||
FDialog::adjustSize();
|
FDialog::adjustSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue