Make the toggle panel draw properly.

A toggle panel has no fore and background and need to draw depending on
its state like a control, so use that drawing method.
This commit is contained in:
Mark de Wever 2008-12-25 10:40:22 +00:00
parent 0286721af5
commit 16c522f2c8

View File

@ -125,7 +125,21 @@ public:
const bool invalidate_background = false)
{ tcontainer_::draw(surface, force, invalidate_background); }
#else
// FIXME test whether we need to implement draw_background.
/** Inherited from tpanel. */
void draw_background(surface& frame_buffer)
{
// We don't have a fore and background and need to draw depending on
// our state, like a control. So we use the controls drawing method.
tcontrol::draw_background(frame_buffer);
}
/** Inherited from tpanel. */
void draw_foreground(surface& frame_buffer)
{
// We don't have a fore and background and need to draw depending on
// our state, like a control. So we use the controls drawing method.
tcontrol::draw_foreground(frame_buffer);
}
#endif
/**
* Inherited from tpanel.