0

これはちょっと変わった問題です。現在のバッテリーの割合に応じて色が動的に変化するバッテリースキンがあります。ただし、RGB の正の赤の値は表示されません。以下に含まれる完全なスキンコードは、必要に応じて問題のスクリーンショットを提供できます。

[Rainmeter]
Update=1000
AccurateText=1

[Variables]
COLORBKGD=255,255,255,255
COLORMEASURE=0,255,0,255

[MeasureBatteryStatus]
Measure=Plugin
Plugin=PowerPlugin
PowerState=Status
IfCondition=MeasureBatteryStatus = 1
IfFalseAction=[!SetOption MeterIcon ImageName "#@#power.png"][!Redraw]
IfTrueAction=[!SetOption MeterIcon ImageName "#@#powerCharging.png"][!Redraw]

[MeasureGreenValue]
Measure=Calc
Formula=Floor([MeasureBatteryPct] < 25 ? 0 : ([MeasureBatteryPct] > 75 ? 255 : ([MeasureBatteryPct] - 25) / 50 * 255))
DynamicVariables=1

[MeasureRedValue]
Measure=Calc
Formula=Floor([MeasureBatteryPct] > 75 ? 0 : ([MeasureBatteryPct] < 25 ? 255 : (1 - ([MeasureBatteryPct] - 25) / 50) * 255))
DynamicVariables=1


[MeasureBatteryPct]
Measure=Plugin
Plugin=PowerPlugin
PowerState=Percent
DynamicVariables=1
OnUpdateAction=[!SetVariable COLORMEASURE ([MeasureRedValue],[MeasureGreenValue],0,255)][!SetOption MeterBatteryPct LineColor #COLORMEASURE#][!Redraw]

[MeterIcon]
Meter=Image
ImageName="#@#power.png"
X=8
Y=7
W=48
PreserveAspectRatio=1

[MeterBkgd]
Meter=Roundline
X=0
Y=0
W=64
H=64
RotationAngle=(2*PI)
LineWidth=16
LineLength=29
LineStart=28
AntiAlias=1
Solid=1
LineColor=#COLORBKGD#

[MeterBatteryPct]
Meter=Roundline
MeasureName=MeasureBatteryPct
X=0
Y=0
W=64
H=64
StartAngle=(3*PI/2)
RotationAngle=(2*PI)
LineLength=31
Solid=1
AntiAlias=1
LineColor=255,0,0,255
LineStart=26
DynamicVariables=1
4

1 に答える 1