Skip to content

Commit

Permalink
Buf fix for CurrentFontSize
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Jan 5, 2025
1 parent b12b7a1 commit 0381615
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private void BindingUI()
y => y > 0)
.Subscribe(c =>
{
if (_config.UiItem.CurrentFontSize != CurrentFontSize && CurrentFontSize >= Global.MinFontSize)
if (_config.UiItem.CurrentFontSize != CurrentFontSize)
{
_config.UiItem.CurrentFontSize = CurrentFontSize;
ModifyFontSize();
Expand Down Expand Up @@ -158,6 +158,8 @@ public void ModifyTheme()
private void ModifyFontSize()
{
double size = (long)CurrentFontSize;
if (size < Global.MinFontSize) size = Global.MinFontSize;

Application.Current.Resources["StdFontSize"] = size;
Application.Current.Resources["StdFontSize1"] = size + 1;
Application.Current.Resources["StdFontSize-1"] = size - 1;
Expand Down

0 comments on commit 0381615

Please sign in to comment.