CPUFrequency replicant

Use be_control_look to outline label (and change text color) when needed.
This commit is contained in:
Philippe Saint-Pierre
2012-02-22 19:25:11 -05:00
parent d63b75faf8
commit c90ebe1e5a
+6 -1
View File
@@ -14,6 +14,7 @@
#include <Alert.h> #include <Alert.h>
#include <Application.h> #include <Application.h>
#include <Catalog.h> #include <Catalog.h>
#include <ControlLook.h>
#include <Deskbar.h> #include <Deskbar.h>
#include <GroupLayout.h> #include <GroupLayout.h>
#include <Locale.h> #include <Locale.h>
@@ -590,10 +591,14 @@ 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)
be_control_look->DrawLabel(this, fFreqString.String(),
this->ViewColor(), 0, BPoint(0, height));
else {
MovePenTo(0, height); MovePenTo(0, height);
DrawString(fFreqString.String()); DrawString(fFreqString.String());
} }
}