Better monochrome support in scrollview example
This commit is contained in:
parent
36bba82e9f
commit
dbbf811993
|
@ -327,6 +327,9 @@ void FScrollView::draw()
|
|||
{
|
||||
use_own_print_area = true;
|
||||
|
||||
if ( isMonochron() )
|
||||
setReverse(true);
|
||||
|
||||
if ( FWidget* p = getParentWidget() )
|
||||
setColor (p->getForegroundColor(), p->getBackgroundColor());
|
||||
else
|
||||
|
@ -337,6 +340,9 @@ void FScrollView::draw()
|
|||
else
|
||||
drawBorder();
|
||||
|
||||
if ( isMonochron() )
|
||||
setReverse(false);
|
||||
|
||||
use_own_print_area = false;
|
||||
copy2area();
|
||||
redrawVBar();
|
||||
|
|
|
@ -107,7 +107,10 @@ void scrollview::setScrollSize (int width, int height)
|
|||
//----------------------------------------------------------------------
|
||||
void scrollview::draw()
|
||||
{
|
||||
setColor (wc.dialog_fg, wc.dialog_bg);
|
||||
if ( isMonochron() )
|
||||
setReverse(true);
|
||||
|
||||
setColor (wc.label_inactive_fg, wc.dialog_bg);
|
||||
clearArea();
|
||||
|
||||
for (int y=0; y < getScrollHeight(); y++)
|
||||
|
@ -118,6 +121,9 @@ void scrollview::draw()
|
|||
print (32 + ((x + y) % 0x5f));
|
||||
}
|
||||
|
||||
if ( isMonochron() )
|
||||
setReverse(false);
|
||||
|
||||
FScrollView::draw();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue