CPUFreq: use transparent background when used as replicant
This commit is contained in:
@@ -483,9 +483,12 @@ void
|
|||||||
StatusView::AttachedToWindow()
|
StatusView::AttachedToWindow()
|
||||||
{
|
{
|
||||||
BView::AttachedToWindow();
|
BView::AttachedToWindow();
|
||||||
if (Parent())
|
if (Parent()) {
|
||||||
SetViewColor(Parent()->ViewColor());
|
if ((Parent()->Flags() & B_DRAW_ON_CHILDREN) != 0)
|
||||||
else
|
SetViewColor(B_TRANSPARENT_COLOR);
|
||||||
|
else
|
||||||
|
SetViewColor(Parent()->ViewColor());
|
||||||
|
} else
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
|
|
||||||
SetLowColor(ViewColor());
|
SetLowColor(ViewColor());
|
||||||
@@ -590,10 +593,10 @@ StatusView::Draw(BRect updateRect)
|
|||||||
GetFontHeight(&fontHeight);
|
GetFontHeight(&fontHeight);
|
||||||
float height = fontHeight.ascent + fontHeight.descent;
|
float height = fontHeight.ascent + fontHeight.descent;
|
||||||
|
|
||||||
if (be_control_look != NULL)
|
if (be_control_look != NULL) {
|
||||||
be_control_look->DrawLabel(this, fFreqString.String(),
|
be_control_look->DrawLabel(this, fFreqString.String(),
|
||||||
this->ViewColor(), 0, BPoint(0, height));
|
Parent()->ViewColor(), 0, BPoint(0, height));
|
||||||
else {
|
} else {
|
||||||
MovePenTo(0, height);
|
MovePenTo(0, height);
|
||||||
DrawString(fFreqString.String());
|
DrawString(fFreqString.String());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user