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,17 +433,14 @@ 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);
|
||||||
{
|
// lower left corner border ⎣
|
||||||
gotoxy (x1, y2);
|
print (fc::NF_border_corner_lower_left);
|
||||||
// lower left corner border ⎣
|
for (int x=1; x < width-1; x++) // low line _
|
||||||
print (fc::NF_border_corner_lower_left);
|
print (fc::NF_border_line_bottom);
|
||||||
for (int x=1; x < width-1; x++) // low line _
|
gotoxy (x2, y2);
|
||||||
print (fc::NF_border_line_bottom);
|
// lower right corner border ⎦
|
||||||
gotoxy (x2, y2);
|
print (fc::NF_rev_border_corner_lower_right);
|
||||||
// lower right corner border ⎦
|
|
||||||
print (fc::NF_rev_border_corner_lower_right);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -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);
|
||||||
print(fc::BoxDrawingsVerticalAndRight);
|
if ( isNewFont() )
|
||||||
FString line(width-2, wchar_t(fc::BoxDrawingsHorizontal));
|
{
|
||||||
print (line);
|
print(fc::NF_border_line_vertical_right);
|
||||||
print(fc::BoxDrawingsVerticalAndLeft);
|
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() )
|
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();
|
||||||
menu_list->setSelectedItem(this);
|
if ( menu_list )
|
||||||
|
{
|
||||||
|
menu_list->unselectItem();
|
||||||
|
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