Skip to content

Commit

Permalink
ApplyAutoThemeChangeToMainWindow 메서드 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
rkttu committed Dec 19, 2023
1 parent 6ffd2e6 commit 296a883
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/TableCloth/Commands/MainWindowLoadedCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public override async void Execute(object parameter)
if (parameter is not MainWindowViewModel viewModel)
throw new ArgumentException("Selected parameter is not a supported type.", nameof(parameter));

this.visualThemeManager.ApplyAutoThemeChangeToMainWindow();
this.visualThemeManager.ApplyAutoThemeChange(
Application.Current.MainWindow);

var currentConfig = this.preferencesManager.LoadPreferences();

if (currentConfig == null)
Expand Down
5 changes: 0 additions & 5 deletions src/TableCloth/Components/VisualThemeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ namespace TableCloth.Components
{
public sealed class VisualThemeManager
{
public void ApplyAutoThemeChangeToMainWindow()
{
ApplyAutoThemeChange(App.Current.MainWindow);
}

public void ApplyAutoThemeChange(Window targetWindow)
{
var source = HwndSource.FromHwnd(new WindowInteropHelper(targetWindow).Handle);
Expand Down

0 comments on commit 296a883

Please sign in to comment.