Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Sep 2, 2024
1 parent 161718d commit ece0250
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions LightBulb.Core.Tests/LocationSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class LocationSpecs
new GeoLocation(69.6489, 18.9551),
new DateTimeOffset(2020, 01, 03, 00, 00, 00, TimeSpan.FromHours(+1)),
new SolarTimes(new TimeOnly(11, 48), new TimeOnly(11, 48))
}
},
};

[Theory]
Expand Down Expand Up @@ -91,7 +91,7 @@ SolarTimes expectedSolarTimes
{ "-41.25 S, 120.9762 E", null },
{ "41.25", null },
{ "", null },
{ null, null }
{ null, null },
};

[Theory]
Expand Down
2 changes: 1 addition & 1 deletion LightBulb.Core/CycleState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public enum CycleState
Paused,
Day,
Night,
Transition
Transition,
}
6 changes: 3 additions & 3 deletions LightBulb.Core/Utils/Http.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public static class Http
new ProductInfoHeaderValue(
"LightBulb",
Assembly.GetExecutingAssembly().GetName().Version?.ToString()
)
}
}
),
},
},
};
}
2 changes: 1 addition & 1 deletion LightBulb.PlatformInterop/DeviceContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void SetGamma(double redMultiplier, double greenMultiplier, double blueMu
{
Red = new ushort[256],
Green = new ushort[256],
Blue = new ushort[256]
Blue = new ushort[256],
};

// Create linear ramps for each color
Expand Down
2 changes: 1 addition & 1 deletion LightBulb.PlatformInterop/Internal/WndProcSponge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ internal partial class WndProcSponge
{
ClassName = ClassName,
WndProc = wndProc,
Instance = NativeModule.CurrentHandle
Instance = NativeModule.CurrentHandle,
};

var classHandle = NativeMethods.RegisterClassEx(ref classInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ public static string GetShortMoniker(this RegistryHive hive) =>
RegistryHive.Users => "HKU",
RegistryHive.PerformanceData => "HKPD",
RegistryHive.CurrentConfig => "HKCC",
_ => throw new ArgumentOutOfRangeException(nameof(hive))
_ => throw new ArgumentOutOfRangeException(nameof(hive)),
};
}
7 changes: 3 additions & 4 deletions LightBulb.PlatformInterop/Utils/Reg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ public static void SetValue<T>(string key, string entry, T value)
null => "REG_NONE",
int => "REG_DWORD",
string => "REG_SZ",
_
=> throw new NotSupportedException(
$"Unsupported registry value type '{value.GetType()}'."
)
_ => throw new NotSupportedException(
$"Unsupported registry value type '{value.GetType()}'."
),
};

Run(["add", key, "/v", entry, "/d", value?.ToString() ?? "", "/t", entryType, "/f"], true);
Expand Down
4 changes: 2 additions & 2 deletions LightBulb/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public App()
{
ThemeVariant.Light => Avalonia.Styling.ThemeVariant.Light,
ThemeVariant.Dark => Avalonia.Styling.ThemeVariant.Dark,
_ => Avalonia.Styling.ThemeVariant.Default
_ => Avalonia.Styling.ThemeVariant.Default,
};
InitializeTheme();
Expand Down Expand Up @@ -122,7 +122,7 @@ private void InitializeTheme()
{
"Light" => PlatformThemeVariant.Light,
"Dark" => PlatformThemeVariant.Dark,
_ => PlatformSettings?.GetColorValues().ThemeVariant ?? PlatformThemeVariant.Light
_ => PlatformSettings?.GetColorValues().ThemeVariant ?? PlatformThemeVariant.Light,
};

this.LocateMaterialTheme<MaterialThemeBase>().CurrentTheme =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public object Convert(object? value, Type targetType, object? parameter, Culture
CycleState.Day => MaterialIconKind.WhiteBalanceSunny,
CycleState.Night => MaterialIconKind.MoonAndStars,
CycleState.Transition => MaterialIconKind.Sync,
_ => MaterialIconKind.QuestionMark // shouldn't happen
// Shouldn't happen
_ => MaterialIconKind.QuestionMark,
};

public object ConvertBack(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public object Convert(object? value, Type targetType, object? parameter, Culture
AdvancedSettingsTabViewModel => MaterialIconKind.CheckboxesMarked,
ApplicationWhitelistSettingsTabViewModel => MaterialIconKind.Apps,
HotKeySettingsTabViewModel => MaterialIconKind.Keyboard,
_ => MaterialIconKind.QuestionMark // shouldn't happen
// Shouldn't happen
_ => MaterialIconKind.QuestionMark,
};

public object ConvertBack(
Expand Down
2 changes: 1 addition & 1 deletion LightBulb/Framework/ThemeVariant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ public enum ThemeVariant
{
System,
Light,
Dark
Dark,
}
2 changes: 1 addition & 1 deletion LightBulb/Framework/ViewManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public partial class ViewManager
GeneralSettingsTabViewModel => new GeneralSettingsTabView(),
HotKeySettingsTabViewModel => new HotKeySettingsTabView(),
LocationSettingsTabViewModel => new LocationSettingsTabView(),
_ => null
_ => null,
};

public Control? TryBindView(ViewModelBase viewModel)
Expand Down
2 changes: 1 addition & 1 deletion LightBulb/StartOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ public static StartOptions Parse(IReadOnlyList<string> commandLineArgs) =>
IsInitiallyHidden = commandLineArgs.Contains(
IsInitiallyHiddenArgument,
StringComparer.OrdinalIgnoreCase
)
),
};
}
9 changes: 4 additions & 5 deletions LightBulb/ViewModels/Components/DashboardViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ ExternalApplicationService externalApplicationService
o => o.DecreaseTemperatureOffsetHotKey,
o => o.IncreaseBrightnessOffsetHotKey,
o => o.DecreaseBrightnessOffsetHotKey,
o => o.ResetConfigurationOffsetHotKey
o => o.ResetConfigurationOffsetHotKey,
],
RegisterHotKeys
)
Expand Down Expand Up @@ -173,9 +173,8 @@ ExternalApplicationService externalApplicationService
_settingsService.MinimumBrightness,
_settingsService.MaximumBrightness
)
: _settingsService.IsDefaultToDayConfigurationEnabled
? _settingsService.DayConfiguration
: ColorConfiguration.Default;
: _settingsService.IsDefaultToDayConfigurationEnabled ? _settingsService.DayConfiguration
: ColorConfiguration.Default;

public ColorConfiguration AdjustedDayConfiguration =>
_settingsService.DayConfiguration.WithOffset(TemperatureOffset, BrightnessOffset);
Expand All @@ -191,7 +190,7 @@ ExternalApplicationService externalApplicationService
_ when IsPaused => CycleState.Paused,
_ when CurrentConfiguration == AdjustedDayConfiguration => CycleState.Day,
_ when CurrentConfiguration == AdjustedNightConfiguration => CycleState.Night,
_ => CycleState.Transition
_ => CycleState.Transition,
};

private void RegisterHotKeys()
Expand Down

0 comments on commit ece0250

Please sign in to comment.