Skip to content

Commit 9eab94a

Browse files
committed
fix(config): fix unrestoreable subtitle parameters [Fixes #92]
- Secondary subtitle size - Large value of SubtitlePosition
1 parent 323c834 commit 9eab94a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

LLPlayer/Services/AppConfig.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,6 @@ public void Initialize(AppConfig rootConfig, FlyleafManager fl)
218218
FL = fl;
219219
Loaded = true;
220220

221-
// Initialize the size of secondary subtitles to the same size as the primary at startup
222-
SubsFontSize2 = SubsFontSize;
223221
// Save the initial value of the position for reset.
224222
_subsPositionInitial = SubsPosition;
225223

@@ -298,7 +296,6 @@ public double SubsFontSize
298296
public double SubsFontSizeFix => GetFixFontSize(SubsFontSize);
299297

300298
// Secondary Subtitle Size
301-
[JsonIgnore]
302299
public double SubsFontSize2
303300
{
304301
get;
@@ -314,7 +311,7 @@ public double SubsFontSize2
314311
OnPropertyChanged(nameof(SubsFontSize2Fix));
315312
}
316313
}
317-
}
314+
} = 44;
318315

319316
[JsonIgnore]
320317
public double SubsFontSize2Fix => GetFixFontSize(SubsFontSize2);
@@ -391,7 +388,7 @@ public Size SubsPanelSize
391388
}
392389
}
393390

394-
private bool _isSubsOverflowBottom = true;
391+
private bool _isSubsOverflowBottom;
395392

396393
[JsonIgnore]
397394
public Thickness SubsMargin
@@ -422,7 +419,7 @@ public double SubsPosition
422419
get;
423420
set
424421
{
425-
if (_isSubsOverflowBottom && field < value)
422+
if (_isSubsOverflowBottom && SubsPanelSize.Height > 0 && field < value)
426423
{
427424
// Prohibit going further down when it overflows below.
428425
return;

0 commit comments

Comments
 (0)