Skip to content

Commit

Permalink
Merge pull request #18 from Joehuu/prefer-24h
Browse files Browse the repository at this point in the history
Add setting to prefer 24h
  • Loading branch information
Joehuu authored Dec 4, 2024
2 parents c18db55 + 7647a64 commit 85d4c43
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
3 changes: 2 additions & 1 deletion RMSKIN/Skins/uhe/@Resources/Variables/uservariables.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Gradient=0
Icons=1

;use https://lokeshdhakar.com/projects/color-thief/ for getting the best colors
LightHighlight=185,158,177
DarkHighlight=75,50,76
;use https://lokeshdhakar.com/projects/color-thief/ for getting the best colors
Prefer24h=0
20 changes: 19 additions & 1 deletion RMSKIN/Skins/uhe/Settings/Settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Information=Toggles different looks of the skin and system.

[Variables]
Width=200
HeightExpanded=325
HeightExpanded=375
DropdownHeight=#HeightExpanded#
Expanded=0

Expand Down Expand Up @@ -49,6 +49,14 @@ IfTrueAction=[!SetOption meterToggleLightMode Text [\xf204]][!SetVariable Toggle
IfFalseAction=[!SetOption meterToggleLightMode Text [\xf205]][!SetVariable ToggleLightMode 0]
DynamicVariables=1

[measurePrefer24hSetting]
Measure=Calc
Formula=#Prefer24h#
IfCondition=measurePrefer24hSetting = 0
IfTrueAction=[!SetOption meterTogglePrefer24h Text [\xf204]][!SetVariable TogglePrefer24h 1]
IfFalseAction=[!SetOption meterTogglePrefer24h Text [\xf205]][!SetVariable TogglePrefer24h 0]
DynamicVariables=1

[measureNewUpdate]
Measure=Plugin
Plugin=RunCommand
Expand Down Expand Up @@ -255,6 +263,16 @@ Plugin=RunCommand
DynamicVariables=1
Parameter=REG ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize /v SystemUsesLightTheme /t REG_DWORD /d #ToggleLightMode# /f

[meterLabelPrefer24h]
Meter=String
MeterStyle=styleLabel
Text=Prefer 24h

[meterTogglePrefer24h]
Meter=String
MeterStyle=styleToggle
LeftMouseUpAction=#PlayButtonClick#[!WriteKeyValue Variables Prefer24h #TogglePrefer24h# "#@#Variables/uservariables.inc"][!SetVariableGroup Prefer24h #TogglePrefer24h# TimeGroup][!UpdateGroup TimeGroup][!SetVariable Prefer24h #TogglePrefer24h#][!Update]

[meterVersionFooter]
Meter=String
Y=#DropdownHeight#
Expand Down
11 changes: 10 additions & 1 deletion RMSKIN/Skins/uhe/Time/Digital/Digital.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
ContextTitle2="Edit timestamp generator"
ContextAction2=["#CURRENTPATH#timestampgen.inc"]
OnRefreshAction=[!Delay 500]#HorizontalExpandCommand#[!Delay 2000]#HorizontalCollapseCommand#
Group=AllSkins | TimeGroup

[Metadata]
Author=Joehu
Expand All @@ -14,9 +15,16 @@ Information=Checks time using digital.
[Variables]
DropdownHeight=[meterDropdownContent:W]

[measurePrefer24h]
Measure=Calc
DynamicVariables=1
Formula=#Prefer24h#
IfCondition=#CURRENTSECTION# = 0
IfTrueAction=[!SetOption measureTime Format "%#I:%M:%S %p"]
IfFalseAction=[!SetOption measureTime Format ""]

[measureTime]
Measure=Time
Format=%#I:%M:%S %p

[measureHours]
Measure=Time
Expand Down Expand Up @@ -73,6 +81,7 @@ Padding=#PaddingSize#
Group=TextGroup
MouseOverAction=#HorizontalExpandCommand#[!ShowMeter meterDiscordIcon]
MouseLeaveAction=#HorizontalCollapseCommand#[!HideMeter meterDiscordIcon]
OnUpdateAction=[!UpdateMeter meterBackground]

[meterDiscordIcon]
Meter=String
Expand Down

0 comments on commit 85d4c43

Please sign in to comment.