@@ -22,6 +22,7 @@ namespace Flow.Launcher.SettingPages.ViewModels;
22
22
23
23
public partial class SettingsPaneThemeViewModel : BaseModel
24
24
{
25
+ private const string DefaultFont = "Segoe UI" ;
25
26
public Settings Settings { get ; }
26
27
27
28
public static string LinkHowToCreateTheme => @"https://flowlauncher.com/docs/#/how-to-create-a-theme" ;
@@ -144,11 +145,13 @@ public string DateFormat
144
145
}
145
146
146
147
public IEnumerable < int > MaxResultsRange => Enumerable . Range ( 2 , 16 ) ;
148
+
147
149
public bool KeepMaxResults
148
150
{
149
151
get => Settings . KeepMaxResults ;
150
152
set => Settings . KeepMaxResults = value ;
151
153
}
154
+
152
155
public string ClockText => DateTime . Now . ToString ( TimeFormat , CultureInfo . CurrentCulture ) ;
153
156
154
157
public string DateText => DateTime . Now . ToString ( DateFormat , CultureInfo . CurrentCulture ) ;
@@ -286,7 +289,7 @@ public FontFamily SelectedQueryBoxFont
286
289
return fontExists switch
287
290
{
288
291
true => new FontFamily ( Settings . QueryBoxFont ) ,
289
- _ => new FontFamily ( "Segoe UI" )
292
+ _ => new FontFamily ( DefaultFont )
290
293
} ;
291
294
}
292
295
set
@@ -330,7 +333,7 @@ public FontFamily SelectedResultFont
330
333
return fontExists switch
331
334
{
332
335
true => new FontFamily ( Settings . ResultFont ) ,
333
- _ => new FontFamily ( "Segoe UI" )
336
+ _ => new FontFamily ( DefaultFont )
334
337
} ;
335
338
}
336
339
set
@@ -375,7 +378,7 @@ public FontFamily SelectedResultSubFont
375
378
}
376
379
else
377
380
{
378
- var font = new FontFamily ( "Segoe UI" ) ;
381
+ var font = new FontFamily ( DefaultFont ) ;
379
382
return font ;
380
383
}
381
384
}
@@ -406,6 +409,7 @@ public FamilyTypeface SelectedResultSubFontFaces
406
409
ThemeManager . Instance . ChangeTheme ( Settings . Theme ) ;
407
410
}
408
411
}
412
+
409
413
public string ThemeImage => Constant . QueryTextBoxIconImagePath ;
410
414
411
415
[ RelayCommand ]
@@ -430,4 +434,21 @@ public SettingsPaneThemeViewModel(Settings settings)
430
434
Settings = settings ;
431
435
}
432
436
437
+ public void Reset ( )
438
+ {
439
+ SelectedQueryBoxFont = new FontFamily ( DefaultFont ) ;
440
+ SelectedQueryBoxFontFaces = new FamilyTypeface { Stretch = FontStretches . Normal , Weight = FontWeights . Normal , Style = FontStyles . Normal } ;
441
+ QueryBoxFontSize = 20 ;
442
+
443
+ SelectedResultFont = new FontFamily ( DefaultFont ) ;
444
+ SelectedResultFontFaces = new FamilyTypeface { Stretch = FontStretches . Normal , Weight = FontWeights . Normal , Style = FontStyles . Normal } ;
445
+ ResultItemFontSize = 16 ;
446
+
447
+ SelectedResultSubFont = new FontFamily ( DefaultFont ) ;
448
+ SelectedResultSubFontFaces = new FamilyTypeface { Stretch = FontStretches . Normal , Weight = FontWeights . Normal , Style = FontStyles . Normal } ;
449
+ ResultSubItemFontSize = 13 ;
450
+
451
+ WindowHeightSize = 42 ;
452
+ ItemHeightSize = 58 ;
453
+ }
433
454
}
0 commit comments