Skip to content

Commit

Permalink
remove unused property IsChoosingThemeVariationsEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayXHD committed Jan 6, 2022
1 parent 7e3a8e4 commit deafec8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,6 @@ public bool LabelRestartIsNeededVisible
set => lblRestartNeeded.Visible = value;
}

public bool IsChoosingThemeVariationsEnabled
{
get => chkColorblind.Enabled;
set => chkColorblind.Enabled = value;
}

public bool IsChoosingVisualStyleEnabled
{
get => chkUseSystemVisualStyle.Enabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ public interface IColorsSettingsPage

bool LabelRestartIsNeededVisible { get; set; }

bool IsChoosingThemeVariationsEnabled { get; set; }

bool IsChoosingVisualStyleEnabled { get; set; }

void ShowThemeLoadingErrorMessage(ThemeId themeId, string[] variations, Exception ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,12 @@ public void When_current_theme_is_default_choosing_visual_style_should_be_disabl
}

[Test]
public void When_current_theme_is_default_choosing_theme_variation_should_be_enabled()
{
AppSettings.ThemeId = ThemeId.Default;
ThemeModule.TestAccessor.ReloadThemeSettings(_context.ThemeRepository);

_context.Controller.ShowThemeSettings();

_context.Page.IsChoosingThemeVariationsEnabled.Should().BeTrue();
}

[Test]
public void When_current_theme_is_non_default_choosing_visual_style_or_theme_variation_should_be_enabled()
public void When_current_theme_is_non_default_choosing_visual_style_should_be_enabled()
{
AppSettings.ThemeId = new ThemeId("non_default", isBuiltin: true);
ThemeModule.TestAccessor.ReloadThemeSettings(_context.ThemeRepository);
_context.Controller.ShowThemeSettings();

_context.Page.IsChoosingThemeVariationsEnabled.Should().BeTrue();
_context.Controller.ShowThemeSettings();
_context.Page.IsChoosingVisualStyleEnabled.Should().BeTrue();
}

Expand Down Expand Up @@ -178,7 +166,6 @@ private class MockColorsSettingsPage : IColorsSettingsPage
public string[] SelectedThemeVariations { get; set; }
public bool UseSystemVisualStyle { get; set; }
public bool LabelRestartIsNeededVisible { get; set; }
public bool IsChoosingThemeVariationsEnabled { get; set; }
public bool IsChoosingVisualStyleEnabled { get; set; }

public void ShowThemeLoadingErrorMessage(ThemeId themeId, string[] variations, Exception ex) =>
Expand Down

0 comments on commit deafec8

Please sign in to comment.