Skip to content

Commit 6341122

Browse files
committed
Support Ultimate Performance by battery splash
1 parent 8e9b5e1 commit 6341122

File tree

4 files changed

+28
-24
lines changed

4 files changed

+28
-24
lines changed

Battery.Splash.pas

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,18 @@ class function TBatterySplash.GeneratePicture(Width, Height: Integer; Monitor: T
9797
CircleGreen = 0;
9898
CircleYellow = 1;
9999
CircleRed = 2;
100-
CircleBlue = 3;
101-
102-
RingGreen = 4;
103-
RingYellow = 5;
104-
RingRed = 6;
105-
RingBlue = 7;
106-
107-
BatteryBody = 8;
108-
PercentageOffset = 9;
109-
Charge = 18;
100+
CirclePurple = 3;
101+
CircleBlue = 4;
102+
103+
RingGreen = 5;
104+
RingYellow = 6;
105+
RingRed = 7;
106+
RingPurple = 8;
107+
RingBlue = 9;
108+
109+
BatteryBody = 10;
110+
PercentageOffset = 11;
111+
Charge = 20;
110112
var
111113
Graphics: IGPGraphics;
112114
Indexes: array of Integer;
@@ -118,25 +120,26 @@ class function TBatterySplash.GeneratePicture(Width, Height: Integer; Monitor: T
118120
if FInvertColor then
119121
begin
120122
case FBatteryState.PowerScheme.PowerSchemeType of
121-
pstMaxPowerSavings : Indexes := Indexes + [CircleRed];
123+
pstMaxPowerSavings : Indexes := Indexes + [CircleRed];
122124
pstTypicalPowerSavings:
123125
begin
124126
if IsOverlayAsScheme then
125127
begin
126128
case FBatteryState.PowerScheme.OverlaySchemeType of
127-
ostOverlayMin : Indexes := Indexes + [CircleRed];
128-
ostOverlayHigh : Indexes := Indexes + [CircleBlue];
129-
ostOverlayMax : Indexes := Indexes + [CircleGreen];
130-
else Indexes := Indexes + [CircleYellow];
129+
ostOverlayMin : Indexes := Indexes + [CircleRed];
130+
ostOverlayHigh : Indexes := Indexes + [CircleBlue];
131+
ostOverlayMax : Indexes := Indexes + [CircleGreen];
132+
else Indexes := Indexes + [CircleYellow];
131133
end;
132134
end
133135
else
134136
begin
135137
Indexes := Indexes + [CircleYellow];
136138
end;
137139
end;
138-
pstMinPowerSavings : Indexes := Indexes + [CircleGreen];
139-
else Indexes := Indexes + [CircleBlue];
140+
pstMinPowerSavings : Indexes := Indexes + [CircleGreen];
141+
pstUltimatePowerSavings: Indexes := Indexes + [CirclePurple];
142+
else Indexes := Indexes + [CircleBlue];
140143
end;
141144

142145
case FBatteryState.PowerScheme.OverlaySchemeType of
@@ -149,25 +152,26 @@ class function TBatterySplash.GeneratePicture(Width, Height: Integer; Monitor: T
149152
else
150153
begin
151154
case FBatteryState.PowerScheme.PowerSchemeType of
152-
pstMaxPowerSavings : Indexes := Indexes + [CircleGreen];
155+
pstMaxPowerSavings : Indexes := Indexes + [CircleGreen];
153156
pstTypicalPowerSavings:
154157
begin
155158
if IsOverlayAsScheme then
156159
begin
157160
case FBatteryState.PowerScheme.OverlaySchemeType of
158-
ostOverlayMin : Indexes := Indexes + [CircleGreen];
159-
ostOverlayHigh : Indexes := Indexes + [CircleBlue];
160-
ostOverlayMax : Indexes := Indexes + [CircleRed];
161-
else Indexes := Indexes + [CircleYellow];
161+
ostOverlayMin : Indexes := Indexes + [CircleGreen];
162+
ostOverlayHigh : Indexes := Indexes + [CircleBlue];
163+
ostOverlayMax : Indexes := Indexes + [CircleRed];
164+
else Indexes := Indexes + [CircleYellow];
162165
end;
163166
end
164167
else
165168
begin
166169
Indexes := Indexes + [CircleYellow];
167170
end;
168171
end;
169-
pstMinPowerSavings : Indexes := Indexes + [CircleRed];
170-
else Indexes := Indexes + [CircleBlue];
172+
pstMinPowerSavings : Indexes := Indexes + [CircleRed];
173+
pstUltimatePowerSavings: Indexes := Indexes + [CirclePurple];
174+
else Indexes := Indexes + [CircleBlue];
171175
end;
172176

173177
case FBatteryState.PowerScheme.OverlaySchemeType of

Image/BatterySplash.png

-66.2 KB
Loading

Image/Source/BatterySplash.cdr

-1.53 MB
Binary file not shown.

Image/Source/BatterySplash.fig

16.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)