PowerStatus: added note battery color.

* When the capacity drops below 30%, it now turns yellow.
This commit is contained in:
Axel Dörfler
2015-01-08 15:37:00 +01:00
parent e889ce2519
commit 070e77cc59
+3
View File
@@ -58,6 +58,7 @@ const uint32 kMinIconWidth = 16;
const uint32 kMinIconHeight = 16;
const int32 kLowBatteryPercentage = 15;
const int32 kNoteBatteryPercentage = 30;
PowerStatusView::PowerStatusView(PowerStatusDriverInterface* interface,
@@ -206,6 +207,8 @@ PowerStatusView::_DrawBattery(BRect rect)
if (fHasBattery) {
if (percent <= kLowBatteryPercentage)
base.set_to(180, 0, 0);
else if (percent <= kNoteBatteryPercentage)
base.set_to(200, 140, 0);
else
base.set_to(20, 180, 0);