@@ -125,6 +125,10 @@ internal sealed class ConfigManager
125
125
public double DeconjugationInfoFontSize { get ; set ; } = 17 ;
126
126
public Brush DictTypeColor { get ; private set ; } = Brushes . LightBlue ;
127
127
public double DictTypeFontSize { get ; set ; } = 15 ;
128
+ public Brush AudioButtonColor { get ; private set ; } = Brushes . White ;
129
+ public double AudioButtonFontSize { get ; set ; } = 12 ;
130
+ public Brush MiningButtonColor { get ; private set ; } = Brushes . White ;
131
+ public double MiningButtonFontSize { get ; set ; } = 12 ;
128
132
public Brush SeparatorColor { get ; private set ; } = Brushes . White ;
129
133
public bool HideDictTabsWithNoResults { get ; private set ; } = true ;
130
134
public bool AutoHidePopupIfMouseIsNotOverIt { get ; private set ; } // = false;
@@ -427,6 +431,8 @@ public void ApplyPreferences(SqliteConnection connection)
427
431
FrequencyFontSize = ConfigDBManager . GetNumberWithDecimalPointFromConfig ( connection , FrequencyFontSize , nameof ( FrequencyFontSize ) , double . TryParse ) ;
428
432
DeconjugationInfoFontSize = ConfigDBManager . GetNumberWithDecimalPointFromConfig ( connection , DeconjugationInfoFontSize , nameof ( DeconjugationInfoFontSize ) , double . TryParse ) ;
429
433
DictTypeFontSize = ConfigDBManager . GetNumberWithDecimalPointFromConfig ( connection , DictTypeFontSize , nameof ( DictTypeFontSize ) , double . TryParse ) ;
434
+ AudioButtonFontSize = ConfigDBManager . GetNumberWithDecimalPointFromConfig ( connection , AudioButtonFontSize , nameof ( AudioButtonFontSize ) , double . TryParse ) ;
435
+ MiningButtonFontSize = ConfigDBManager . GetNumberWithDecimalPointFromConfig ( connection , MiningButtonFontSize , nameof ( MiningButtonFontSize ) , double . TryParse ) ;
430
436
MaxDelayBetweenCopiesForMergingMatchingSequentialTextsInMilliseconds = ConfigDBManager . GetNumberWithDecimalPointFromConfig ( connection , MaxDelayBetweenCopiesForMergingMatchingSequentialTextsInMilliseconds , nameof ( MaxDelayBetweenCopiesForMergingMatchingSequentialTextsInMilliseconds ) , double . TryParse ) ;
431
437
MaxNumResultsNotInMiningMode = ConfigDBManager . GetValueFromConfig ( connection , MaxNumResultsNotInMiningMode , nameof ( MaxNumResultsNotInMiningMode ) , int . TryParse ) ;
432
438
@@ -509,10 +515,10 @@ public void ApplyPreferences(SqliteConnection connection)
509
515
DefinitionsColor = ConfigUtils . GetFrozenBrushFromConfig ( connection , DefinitionsColor , nameof ( DefinitionsColor ) ) ;
510
516
FrequencyColor = ConfigUtils . GetFrozenBrushFromConfig ( connection , FrequencyColor , nameof ( FrequencyColor ) ) ;
511
517
DeconjugationInfoColor = ConfigUtils . GetFrozenBrushFromConfig ( connection , DeconjugationInfoColor , nameof ( DeconjugationInfoColor ) ) ;
512
-
513
518
SeparatorColor = ConfigUtils . GetFrozenBrushFromConfig ( connection , SeparatorColor , nameof ( SeparatorColor ) ) ;
514
-
515
519
DictTypeColor = ConfigUtils . GetFrozenBrushFromConfig ( connection , DictTypeColor , nameof ( DictTypeColor ) ) ;
520
+ AudioButtonColor = ConfigUtils . GetFrozenBrushFromConfig ( connection , AudioButtonColor , nameof ( AudioButtonColor ) ) ;
521
+ MiningButtonColor = ConfigUtils . GetFrozenBrushFromConfig ( connection , MiningButtonColor , nameof ( MiningButtonColor ) ) ;
516
522
517
523
HighlightColor = ConfigUtils . GetFrozenBrushFromConfig ( connection , HighlightColor , nameof ( HighlightColor ) ) ;
518
524
mainWindow . MainTextBox . SelectionBrush = HighlightColor ;
@@ -859,7 +865,8 @@ public void LoadPreferenceWindow(PreferencesWindow preferenceWindow)
859
865
WindowsUtils . SetButtonColor ( preferenceWindow . PopupBackgroundColorButton , PopupBackgroundColor ) ;
860
866
WindowsUtils . SetButtonColor ( preferenceWindow . SeparatorColorButton , SeparatorColor ) ;
861
867
WindowsUtils . SetButtonColor ( preferenceWindow . DictTypeColorButton , DictTypeColor ) ;
862
-
868
+ WindowsUtils . SetButtonColor ( preferenceWindow . AudioButtonColorButton , AudioButtonColor ) ;
869
+ WindowsUtils . SetButtonColor ( preferenceWindow . MiningButtonColorButton , MiningButtonColor ) ;
863
870
864
871
CoreConfigManager coreConfigManager = CoreConfigManager . Instance ;
865
872
preferenceWindow . SearchUrlTextBox . Text = SearchUrl ;
@@ -971,6 +978,8 @@ public void LoadPreferenceWindow(PreferencesWindow preferenceWindow)
971
978
preferenceWindow . AlternativeSpellingsFontSizeNumericUpDown . Value = AlternativeSpellingsFontSize ;
972
979
preferenceWindow . DeconjugationInfoFontSizeNumericUpDown . Value = DeconjugationInfoFontSize ;
973
980
preferenceWindow . DictTypeFontSizeNumericUpDown . Value = DictTypeFontSize ;
981
+ preferenceWindow . AudioButtonFontSizeNumericUpDown . Value = AudioButtonFontSize ;
982
+ preferenceWindow . MiningButtonFontSizeNumericUpDown . Value = MiningButtonFontSize ;
974
983
preferenceWindow . MaxDelayBetweenCopiesForMergingMatchingSequentialTextsInMillisecondsNumericUpDown . Value = MaxDelayBetweenCopiesForMergingMatchingSequentialTextsInMilliseconds ;
975
984
preferenceWindow . TextBoxCustomLineHeightNumericUpDown . Value = TextBoxCustomLineHeight ;
976
985
preferenceWindow . AutoHidePopupIfMouseIsNotOverItDelayInMillisecondsNumericUpDown . Value = AutoHidePopupIfMouseIsNotOverItDelayInMilliseconds ;
@@ -1363,6 +1372,12 @@ public async Task SavePreferences(PreferencesWindow preferenceWindow)
1363
1372
ConfigDBManager . UpdateSetting ( connection , nameof ( DictTypeFontSize ) ,
1364
1373
preferenceWindow . DictTypeFontSizeNumericUpDown . Value . ToString ( CultureInfo . InvariantCulture ) ) ;
1365
1374
1375
+ ConfigDBManager . UpdateSetting ( connection , nameof ( AudioButtonFontSize ) ,
1376
+ preferenceWindow . AudioButtonFontSizeNumericUpDown . Value . ToString ( CultureInfo . InvariantCulture ) ) ;
1377
+
1378
+ ConfigDBManager . UpdateSetting ( connection , nameof ( MiningButtonFontSize ) ,
1379
+ preferenceWindow . MiningButtonFontSizeNumericUpDown . Value . ToString ( CultureInfo . InvariantCulture ) ) ;
1380
+
1366
1381
ConfigDBManager . UpdateSetting ( connection , nameof ( MaxDelayBetweenCopiesForMergingMatchingSequentialTextsInMilliseconds ) ,
1367
1382
preferenceWindow . MaxDelayBetweenCopiesForMergingMatchingSequentialTextsInMillisecondsNumericUpDown . Value . ToString ( CultureInfo . InvariantCulture ) ) ;
1368
1383
@@ -1373,6 +1388,10 @@ public async Task SavePreferences(PreferencesWindow preferenceWindow)
1373
1388
1374
1389
ConfigDBManager . UpdateSetting ( connection , nameof ( DictTypeColor ) , preferenceWindow . DictTypeColorButton . Tag . ToString ( ) ! ) ;
1375
1390
1391
+ ConfigDBManager . UpdateSetting ( connection , nameof ( AudioButtonColor ) , preferenceWindow . AudioButtonColorButton . Tag . ToString ( ) ! ) ;
1392
+
1393
+ ConfigDBManager . UpdateSetting ( connection , nameof ( MiningButtonColor ) , preferenceWindow . MiningButtonColorButton . Tag . ToString ( ) ! ) ;
1394
+
1376
1395
ConfigDBManager . UpdateSetting ( connection , nameof ( PopupFocusOnLookup ) ,
1377
1396
preferenceWindow . PopupFocusOnLookupCheckBox . IsChecked . ToString ( ) ! ) ;
1378
1397
0 commit comments