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