Skip to content

Commit ade0049

Browse files
committed
refactor: usings
1 parent e0fe69f commit ade0049

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

src/ByteSync.Client/Business/Themes/ThemeColor.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using ByteSync.Helpers;
1+
using Avalonia.Media;
2+
using ByteSync.Helpers;
23

34
namespace ByteSync.Business.Themes;
45

@@ -11,7 +12,7 @@ public ThemeColor(string hexaColor)
1112
InitializeHsv();
1213
}
1314

14-
public ThemeColor(Avalonia.Media.Color color)
15+
public ThemeColor(Color color)
1516
{
1617
HexaColor = ColorUtils.ToHex(color);
1718
AvaloniaColor = color;
@@ -28,7 +29,7 @@ private void InitializeHsv()
2829

2930
public string HexaColor { get; }
3031

31-
public Avalonia.Media.Color AvaloniaColor { get; }
32+
public Color AvaloniaColor { get; }
3233

3334
public double Hue { get; private set; }
3435

@@ -40,22 +41,22 @@ private void InitializeHsv()
4041

4142
public ThemeColor WithHue(double hue)
4243
{
43-
var newSystemColor = ColorUtils.ColorFromHsv(hue, this.Saturation, this.Value);
44+
var newSystemColor = ColorUtils.ColorFromHsv(hue, Saturation, Value);
4445
return new ThemeColor(newSystemColor);
4546
}
4647

4748
public ThemeColor WithSaturationValue(double saturation, double value)
4849
{
49-
var newSystemColor = ColorUtils.ColorFromHsv(this.Hue, saturation, value);
50+
var newSystemColor = ColorUtils.ColorFromHsv(Hue, saturation, value);
5051
return new ThemeColor(newSystemColor);
5152
}
5253

5354
public ThemeColor AdjustSaturationValue(double saturationPercent, double valuePercent)
5455
{
55-
double newSaturation = ComputeAdjustedValue(this.Saturation, saturationPercent);
56-
double newValue = ComputeAdjustedValue(this.Value, valuePercent);
56+
double newSaturation = ComputeAdjustedValue(Saturation, saturationPercent);
57+
double newValue = ComputeAdjustedValue(Value, valuePercent);
5758

58-
var newSystemColor = ColorUtils.ColorFromHsv(this.Hue, newSaturation, newValue);
59+
var newSystemColor = ColorUtils.ColorFromHsv(Hue, newSaturation, newValue);
5960
return new ThemeColor(newSystemColor);
6061
}
6162

0 commit comments

Comments
 (0)