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
|
||||
* Menu supports newfont
|
||||
|
||||
2015-11-05 Markus Gans <guru.mail@muenster.de>
|
||||
* 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⎹
|
||||
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);
|
||||
for (int x=1; x < width-1; x++) // low line _
|
||||
print (fc::NF_border_line_bottom);
|
||||
gotoxy (x2, y2);
|
||||
// lower right corner border ⎦
|
||||
print (fc::NF_rev_border_corner_lower_right);
|
||||
}
|
||||
gotoxy (x1, y2);
|
||||
// lower left corner border ⎣
|
||||
print (fc::NF_border_corner_lower_left);
|
||||
for (int x=1; x < width-1; x++) // low line _
|
||||
print (fc::NF_border_line_bottom);
|
||||
gotoxy (x2, y2);
|
||||
// lower right corner border ⎦
|
||||
print (fc::NF_rev_border_corner_lower_right);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -602,10 +599,20 @@ inline void FMenu::drawSeparator(int y)
|
|||
setColor (wc.menu_active_fg, wc.menu_active_bg);
|
||||
if ( isMonochron() )
|
||||
setReverse(true);
|
||||
print(fc::BoxDrawingsVerticalAndRight);
|
||||
FString line(width-2, wchar_t(fc::BoxDrawingsHorizontal));
|
||||
print (line);
|
||||
print(fc::BoxDrawingsVerticalAndLeft);
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -445,9 +445,12 @@ bool FMenuItem::setFocus (bool on)
|
|||
if ( ! selected )
|
||||
{
|
||||
FMenuList* menu_list = dynamic_cast<FMenuList*>(getSuperMenu());
|
||||
menu_list->unselectItem();
|
||||
setSelected();
|
||||
menu_list->setSelectedItem(this);
|
||||
if ( menu_list )
|
||||
{
|
||||
menu_list->unselectItem();
|
||||
menu_list->setSelectedItem(this);
|
||||
}
|
||||
|
||||
if ( statusBar() )
|
||||
statusBar()->drawMessage();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue