mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
- RollBack reset logic and Adjust naming
This commit is contained in:
parent
0a52d71497
commit
4fd05f59f1
3 changed files with 53 additions and 181 deletions
|
|
@ -77,6 +77,22 @@ public partial class SettingsPaneThemeViewModel : BaseModel
|
|||
set => Settings.ItemHeightSize = value;
|
||||
}
|
||||
|
||||
public double QueryBoxFontSize
|
||||
{
|
||||
get => Settings.QueryBoxFontSize;
|
||||
set => Settings.QueryBoxFontSize = value;
|
||||
}
|
||||
public double ResultItemFontSize
|
||||
{
|
||||
get => Settings.ResultItemFontSize;
|
||||
set => Settings.ResultItemFontSize = value;
|
||||
}
|
||||
|
||||
public double ResultSubItemFontSize
|
||||
{
|
||||
get => Settings.ResultSubItemFontSize;
|
||||
set => Settings.ResultSubItemFontSize = value;
|
||||
}
|
||||
public List<string> Themes =>
|
||||
ThemeManager.Instance.LoadAvailableThemes().Select(Path.GetFileNameWithoutExtension).ToList();
|
||||
|
||||
|
|
@ -153,6 +169,12 @@ public partial class SettingsPaneThemeViewModel : BaseModel
|
|||
|
||||
public string DateText => DateTime.Now.ToString(DateFormat, Culture);
|
||||
|
||||
public double WindowWidthSize
|
||||
{
|
||||
get => Settings.WindowSize;
|
||||
set => Settings.WindowSize = value;
|
||||
}
|
||||
|
||||
public bool UseGlyphIcons
|
||||
{
|
||||
get => Settings.UseGlyphIcons;
|
||||
|
|
@ -188,7 +210,6 @@ public partial class SettingsPaneThemeViewModel : BaseModel
|
|||
return speeds;
|
||||
}
|
||||
}
|
||||
|
||||
public bool UseSound
|
||||
{
|
||||
get => Settings.UseSound;
|
||||
|
|
@ -451,183 +472,4 @@ public partial class SettingsPaneThemeViewModel : BaseModel
|
|||
Settings = settings;
|
||||
}
|
||||
|
||||
public string QueryBoxFont
|
||||
{
|
||||
get => Settings.QueryBoxFont;
|
||||
set
|
||||
{
|
||||
Settings.QueryBoxFont = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public string QueryBoxFontStyle
|
||||
{
|
||||
get => Settings.QueryBoxFontStyle;
|
||||
set
|
||||
{
|
||||
Settings.QueryBoxFontStyle = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public string QueryBoxFontWeight
|
||||
{
|
||||
get => Settings.QueryBoxFontWeight;
|
||||
set
|
||||
{
|
||||
Settings.QueryBoxFontWeight = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public string QueryBoxFontStretch
|
||||
{
|
||||
get => Settings.QueryBoxFontStretch;
|
||||
set
|
||||
{
|
||||
Settings.QueryBoxFontStretch = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public double QueryBoxFontSize
|
||||
{
|
||||
get => Settings.QueryBoxFontSize;
|
||||
set
|
||||
{
|
||||
Settings.QueryBoxFontSize = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public string ResultFont
|
||||
{
|
||||
get => Settings.ResultFont;
|
||||
set
|
||||
{
|
||||
Settings.ResultFont = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public string ResultFontStyle
|
||||
{
|
||||
get => Settings.ResultFontStyle;
|
||||
set
|
||||
{
|
||||
Settings.ResultFontStyle = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public string ResultFontWeight
|
||||
{
|
||||
get => Settings.ResultFontWeight;
|
||||
set
|
||||
{
|
||||
Settings.ResultFontWeight = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public string ResultFontStretch
|
||||
{
|
||||
get => Settings.ResultFontStretch;
|
||||
set
|
||||
{
|
||||
Settings.ResultFontStretch = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public double ResultItemFontSize
|
||||
{
|
||||
get => Settings.ResultItemFontSize;
|
||||
set
|
||||
{
|
||||
Settings.ResultItemFontSize = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public string ResultSubFont
|
||||
{
|
||||
get => Settings.ResultSubFont;
|
||||
set
|
||||
{
|
||||
Settings.ResultSubFont = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public string ResultSubFontStyle
|
||||
{
|
||||
get => Settings.ResultSubFontStyle;
|
||||
set
|
||||
{
|
||||
Settings.ResultSubFontStyle = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public string ResultSubFontWeight
|
||||
{
|
||||
get => Settings.ResultSubFontWeight;
|
||||
set
|
||||
{
|
||||
Settings.ResultSubFontWeight = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public string ResultSubFontStretch
|
||||
{
|
||||
get => Settings.ResultSubFontStretch;
|
||||
set
|
||||
{
|
||||
Settings.ResultSubFontStretch = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public double ResultSubItemFontSize
|
||||
{
|
||||
get => Settings.ResultSubItemFontSize;
|
||||
set
|
||||
{
|
||||
Settings.ResultSubItemFontSize = value;
|
||||
ThemeManager.Instance.ChangeTheme(Settings.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
public int CustomAnimationLength
|
||||
{
|
||||
get => Settings.CustomAnimationLength;
|
||||
set => Settings.CustomAnimationLength = value;
|
||||
}
|
||||
|
||||
public void ResetCustomize()
|
||||
{
|
||||
QueryBoxFont = "Segoe UI";
|
||||
QueryBoxFontStyle = "Normal";
|
||||
QueryBoxFontWeight = "Normal";
|
||||
QueryBoxFontStretch = "Normal";
|
||||
QueryBoxFontSize = 20;
|
||||
|
||||
ResultFont = "Segoe UI";
|
||||
ResultFontStyle = "Normal";
|
||||
ResultFontWeight = "Normal";
|
||||
ResultFontStretch = "Normal";
|
||||
ResultItemFontSize = 16;
|
||||
|
||||
ResultSubFont = "Segoe UI";
|
||||
ResultSubFontStyle = "Normal";
|
||||
ResultSubFontWeight = "Normal";
|
||||
ResultSubFontStretch = "Normal";
|
||||
ResultSubItemFontSize = 13;
|
||||
|
||||
ItemHeightSize = 58;
|
||||
WindowHeightSize = 42;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@
|
|||
TickFrequency="1"
|
||||
Value="{Binding QueryBoxFontSize, Mode=TwoWay}" />
|
||||
<ComboBox
|
||||
Name="QueryBoxFontComboBox"
|
||||
Width="150"
|
||||
Margin="8 4 8 0"
|
||||
HorizontalAlignment="Center"
|
||||
|
|
@ -124,6 +125,7 @@
|
|||
ItemsSource="{Binding Source={StaticResource SortedFonts}}"
|
||||
SelectedItem="{Binding SelectedQueryBoxFont}" />
|
||||
<ComboBox
|
||||
Name="QueryBoxFontStyleComboBox"
|
||||
Width="150"
|
||||
Margin="8"
|
||||
HorizontalAlignment="Center"
|
||||
|
|
@ -177,6 +179,7 @@
|
|||
TickFrequency="1"
|
||||
Value="{Binding ResultItemFontSize, Mode=TwoWay}" />
|
||||
<ComboBox
|
||||
Name="ResultItemFontComboBox"
|
||||
Width="140"
|
||||
Margin="8 4 8 0"
|
||||
HorizontalAlignment="Center"
|
||||
|
|
@ -185,6 +188,7 @@
|
|||
ItemsSource="{Binding Source={StaticResource SortedFonts}}"
|
||||
SelectedItem="{Binding SelectedResultFont}" />
|
||||
<ComboBox
|
||||
Name="ResultItemFontStyleComboBox"
|
||||
Width="140"
|
||||
Margin="8 4 8 8"
|
||||
HorizontalAlignment="Center"
|
||||
|
|
@ -221,6 +225,7 @@
|
|||
TickFrequency="1"
|
||||
Value="{Binding ResultSubItemFontSize, Mode=TwoWay}" />
|
||||
<ComboBox
|
||||
Name="ResultSubItemFontComboBox"
|
||||
Width="140"
|
||||
Margin="8 4 8 0"
|
||||
HorizontalAlignment="Center"
|
||||
|
|
@ -229,6 +234,7 @@
|
|||
ItemsSource="{Binding Source={StaticResource SortedFonts}}"
|
||||
SelectedItem="{Binding SelectedResultSubFont}" />
|
||||
<ComboBox
|
||||
Name="ResultSubItemFontStyleComboBox"
|
||||
Width="140"
|
||||
Margin="8 4 8 8"
|
||||
HorizontalAlignment="Center"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,30 @@ public partial class SettingsPaneTheme : Page
|
|||
|
||||
private void Reset_Click(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
_viewModel.ResetCustomize();
|
||||
//QueryBoxFont = "Segoe UI";
|
||||
//QueryBoxFontStyle = "Normal";
|
||||
//QueryBoxFontWeight = "Normal";
|
||||
//QueryBoxFontStretch = "Normal";
|
||||
//QueryBoxFontSize = 20;
|
||||
QueryBoxFontSize.Value = 20;
|
||||
|
||||
//ResultFont = "Segoe UI";
|
||||
//ResultFontStyle = "Normal";
|
||||
//ResultFontWeight = "Normal";
|
||||
//ResultFontStretch = "Normal";
|
||||
//ResultItemFontSize = 16;
|
||||
resultItemFontSize.Value = 16;
|
||||
|
||||
//ResultSubFont = "Segoe UI";
|
||||
//ResultSubFontStyle = "Normal";
|
||||
//ResultSubFontWeight = "Normal";
|
||||
//ResultSubFontStretch = "Normal";
|
||||
//ResultSubItemFontSize = 13;
|
||||
resultSubItemFontSize.Value = 13;
|
||||
//ItemHeightSize = 58;
|
||||
//WindowHeightSize = 42;
|
||||
WindowHeightValue.Value = 42;
|
||||
ItemHeightValue.Value = 58;
|
||||
//_viewModel.ResetCustomize();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue