CPUFreq: use transparent background when used as replicant

This commit is contained in:
Philippe Saint-Pierre
2013-07-18 20:54:50 -04:00
parent a5bee83638
commit d087b9ca15
+9 -6
View File
@@ -483,9 +483,12 @@ void
StatusView::AttachedToWindow()
{
BView::AttachedToWindow();
if (Parent())
SetViewColor(Parent()->ViewColor());
else
if (Parent()) {
if ((Parent()->Flags() & B_DRAW_ON_CHILDREN) != 0)
SetViewColor(B_TRANSPARENT_COLOR);
else
SetViewColor(Parent()->ViewColor());
} else
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
SetLowColor(ViewColor());
@@ -590,10 +593,10 @@ StatusView::Draw(BRect updateRect)
GetFontHeight(&fontHeight);
float height = fontHeight.ascent + fontHeight.descent;
if (be_control_look != NULL)
if (be_control_look != NULL) {
be_control_look->DrawLabel(this, fFreqString.String(),
this->ViewColor(), 0, BPoint(0, height));
else {
Parent()->ViewColor(), 0, BPoint(0, height));
} else {
MovePenTo(0, height);
DrawString(fFreqString.String());
}