Skip to content

Commit 7abf79f

Browse files
Merge pull request #175 from PhantomGamers/dev
2 parents 441a06a + a84a3c3 commit 7abf79f

File tree

5 files changed

+41
-25
lines changed

5 files changed

+41
-25
lines changed

Directory.Packages.props

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
<PackageVersion Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
1111
<PackageVersion Include="Avalonia.ReactiveUI" Version="$(AvaloniaVersion)" />
1212
<PackageVersion Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" />
13-
<PackageVersion Include="Flurl.Http" Version="4.0.0-pre4" />
13+
<PackageVersion Include="Flurl.Http" Version="4.0.0-pre6" />
1414
<PackageVersion Include="PuppeteerSharp" Version="6.2.0" />
1515
<PackageVersion Include="ReactiveUI.Fody" Version="19.5.1" />
1616
<PackageVersion Include="Semver" Version="2.3.0" />
1717
<PackageVersion Include="PortableJsonSettingsProvider" Version="0.2.2" />
1818
<PackageVersion Include="Gameloop.Vdf" Version="0.6.2" />
19-
<PackageVersion Include="NLog" Version="5.2.5" />
19+
<PackageVersion Include="NLog" Version="5.2.6" />
2020
<PackageVersion Include="MinVer" Version="4.3.0">
2121
<PrivateAssets>all</PrivateAssets>
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
@@ -29,7 +29,7 @@
2929
<PrivateAssets>all</PrivateAssets>
3030
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
3131
</PackageVersion>
32-
<PackageVersion Include="FileWatcherEx" Version="2.5.0" />
32+
<PackageVersion Include="FileWatcherEx" Version="2.6.0" />
3333
<PackageVersion Include="FluentAvaloniaUI" Version="2.0.4" />
3434
<PackageVersion Include="WindowsShortcutFactory" Version="1.1.0" />
3535
<PackageVersion Include="WmiLight" Version="4.0.0" />

SFP/Models/Utils.cs

+12
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,16 @@ public static List<string> GetCommandLine(Process? process)
6262

6363
return new List<string>();
6464
}
65+
66+
public static string ConvertARGBtoRGBA(string argb)
67+
{
68+
if (argb.Length != 9 || !argb.StartsWith("#"))
69+
{
70+
throw new ArgumentException("Invalid ARGB format");
71+
}
72+
var alpha = argb.Substring(1, 2);
73+
var rgb = argb[3..];
74+
return "#" + rgb + alpha;
75+
}
76+
6577
}

SFP/packages.lock.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
},
2323
"FileWatcherEx": {
2424
"type": "Direct",
25-
"requested": "[2.5.0, )",
26-
"resolved": "2.5.0",
27-
"contentHash": "XmNJt94gt/xlr0RY5w6gKcZhwQ2wNSA7j+VqakpEHY3kk8dXVnYShNZMBVyEPUcDdCzFrI+4d7BvGnmDHB/m/w=="
25+
"requested": "[2.6.0, )",
26+
"resolved": "2.6.0",
27+
"contentHash": "zHDfVCmqguDYzcRhUmsAzUVBMm5G3nvkD5+p3/f5TjqPHcxFvDoEfSKvxZ4/Mid6fVDZJOU+7xxittk+AIE2Bw=="
2828
},
2929
"Flurl.Http": {
3030
"type": "Direct",
31-
"requested": "[4.0.0-pre4, )",
32-
"resolved": "4.0.0-pre4",
33-
"contentHash": "gK20RSLGp1QBG7FCgu6/pmUUmhP6FGIRU0LBWWHdhTDicdHq760jP9QdD6UPyaVMLlhJrvwrSZ4HHLkHT8ZrjQ==",
31+
"requested": "[4.0.0-pre6, )",
32+
"resolved": "4.0.0-pre6",
33+
"contentHash": "YwWbb/egekWqLmoYZLY2PTzwmN4l6/C4iQKuUsWuNrjxYQ84Oa+OBfQzPYx+04lpOAhhjoBeXFB8y7C+F0CpJA==",
3434
"dependencies": {
3535
"Flurl": "4.0.0-pre4"
3636
}
@@ -54,9 +54,9 @@
5454
},
5555
"NLog": {
5656
"type": "Direct",
57-
"requested": "[5.2.5, )",
58-
"resolved": "5.2.5",
59-
"contentHash": "mMXtbAxfNzqkXcBjhJ3wN3rH7kwUZ0JL0GrUBI/lso7+tQ/HC4e5SnlmR3R5qQ9zWbqMbjxeH37rIf0yQGWTiA=="
57+
"requested": "[5.2.6, )",
58+
"resolved": "5.2.6",
59+
"contentHash": "7/RQ4VBu6HT6kieczhwfI52ugcxrsrMNWIGy43Q36SdfN5dApZW7otsgXuIXx2rKspIGkPhD99JVWIs6FtIilA=="
6060
},
6161
"PortableJsonSettingsProvider": {
6262
"type": "Direct",

SFP_UI/App.axaml.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,20 @@ private static IEnumerable<string> GetColorValues()
7979
{
8080
if (Current!.Styles[0] is not FluentAvaloniaTheme faTheme)
8181
{
82+
Log.Logger.Warn("Could not get color values, FluentAvaloniaTheme is null");
8283
return Array.Empty<string>();
8384
}
8485
var colorValues = new string[7];
8586
for (var i = 0; i < 7; i++)
8687
{
8788
if (!faTheme.Resources.TryGetResource(Injector.ColorNames[i], null, out var c))
8889
{
90+
Log.Logger.Warn("Could not get color value for {ColorName}", Injector.ColorNames[i]);
8991
continue;
9092
}
91-
colorValues[i] = c?.ToString() ?? colorValues[i];
93+
94+
var rgbaStr = Utils.ConvertARGBtoRGBA(c!.ToString()!);
95+
colorValues[i] = rgbaStr;
9296
}
9397

9498
return colorValues;

SFP_UI/packages.lock.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@
8787
},
8888
"NLog": {
8989
"type": "Direct",
90-
"requested": "[5.2.5, )",
91-
"resolved": "5.2.5",
92-
"contentHash": "mMXtbAxfNzqkXcBjhJ3wN3rH7kwUZ0JL0GrUBI/lso7+tQ/HC4e5SnlmR3R5qQ9zWbqMbjxeH37rIf0yQGWTiA=="
90+
"requested": "[5.2.6, )",
91+
"resolved": "5.2.6",
92+
"contentHash": "7/RQ4VBu6HT6kieczhwfI52ugcxrsrMNWIGy43Q36SdfN5dApZW7otsgXuIXx2rKspIGkPhD99JVWIs6FtIilA=="
9393
},
9494
"ReactiveUI.Fody": {
9595
"type": "Direct",
@@ -1525,10 +1525,10 @@
15251525
"sfp": {
15261526
"type": "Project",
15271527
"dependencies": {
1528-
"FileWatcherEx": "[2.5.0, )",
1529-
"Flurl.Http": "[4.0.0-pre4, )",
1528+
"FileWatcherEx": "[2.6.0, )",
1529+
"Flurl.Http": "[4.0.0-pre6, )",
15301530
"Gameloop.Vdf": "[0.6.2, )",
1531-
"NLog": "[5.2.5, )",
1531+
"NLog": "[5.2.6, )",
15321532
"PortableJsonSettingsProvider": "[0.2.2, )",
15331533
"PuppeteerSharp": "[6.2.0, )",
15341534
"WindowsShortcutFactory": "[1.1.0, )",
@@ -1537,15 +1537,15 @@
15371537
},
15381538
"FileWatcherEx": {
15391539
"type": "CentralTransitive",
1540-
"requested": "[2.5.0, )",
1541-
"resolved": "2.5.0",
1542-
"contentHash": "XmNJt94gt/xlr0RY5w6gKcZhwQ2wNSA7j+VqakpEHY3kk8dXVnYShNZMBVyEPUcDdCzFrI+4d7BvGnmDHB/m/w=="
1540+
"requested": "[2.6.0, )",
1541+
"resolved": "2.6.0",
1542+
"contentHash": "zHDfVCmqguDYzcRhUmsAzUVBMm5G3nvkD5+p3/f5TjqPHcxFvDoEfSKvxZ4/Mid6fVDZJOU+7xxittk+AIE2Bw=="
15431543
},
15441544
"Flurl.Http": {
15451545
"type": "CentralTransitive",
1546-
"requested": "[4.0.0-pre4, )",
1547-
"resolved": "4.0.0-pre4",
1548-
"contentHash": "gK20RSLGp1QBG7FCgu6/pmUUmhP6FGIRU0LBWWHdhTDicdHq760jP9QdD6UPyaVMLlhJrvwrSZ4HHLkHT8ZrjQ==",
1546+
"requested": "[4.0.0-pre6, )",
1547+
"resolved": "4.0.0-pre6",
1548+
"contentHash": "YwWbb/egekWqLmoYZLY2PTzwmN4l6/C4iQKuUsWuNrjxYQ84Oa+OBfQzPYx+04lpOAhhjoBeXFB8y7C+F0CpJA==",
15491549
"dependencies": {
15501550
"Flurl": "4.0.0-pre4"
15511551
}

0 commit comments

Comments
 (0)