fix: countdown timer panel showing under webcam properties
Same root cause as IsChatBox — SourceType binding fails on WebcamSceneConfig, WPF defaults Visibility to Visible without calling the converter. Added virtual bool IsCountdown on SceneElement, override in Source. Swapped binding to BoolToVis. Removed dead SourceTypeToVisibility converters.
This commit is contained in:
+3
-6
@@ -39,11 +39,8 @@
|
||||
xmlns:Helpers="clr-namespace:ytLive.Helpers"/>
|
||||
<Helpers:EnumToBoolConverter x:Key="EnumToBool"
|
||||
xmlns:Helpers="clr-namespace:ytLive.Helpers"/>
|
||||
<Helpers:SourceTypeToVisibilityConverter x:Key="SourceTypeToCountdownVis"
|
||||
xmlns:Helpers="clr-namespace:ytLive.Helpers"
|
||||
xmlns:models2="clr-namespace:ytLive.Models"/>
|
||||
<Helpers:SourceTypeToVisibilityConverter x:Key="SourceTypeToWebVis"
|
||||
xmlns:Helpers="clr-namespace:ytLive.Helpers"/>
|
||||
|
||||
|
||||
|
||||
<!-- Red dot shown in the taskbar icon while live -->
|
||||
<DrawingImage x:Key="LiveOverlay">
|
||||
@@ -454,7 +451,7 @@
|
||||
</StackPanel>
|
||||
|
||||
<!-- Countdown config -->
|
||||
<StackPanel Visibility="{Binding SelectedElement.Type, Converter={StaticResource SourceTypeToCountdownVis}, ConverterParameter=Countdown}" Margin="0,0,0,8">
|
||||
<StackPanel Visibility="{Binding SelectedElement.IsCountdown, Converter={StaticResource BoolToVis}}" Margin="0,0,0,8">
|
||||
<TextBlock Text="Timer (minutes)" Foreground="#a0a0b0" FontSize="11" Margin="0,0,0,2"/>
|
||||
<DockPanel Margin="0,0,0,6">
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource IconButton}"
|
||||
|
||||
@@ -59,6 +59,9 @@ public abstract class SceneElement : INotifyPropertyChanged
|
||||
/// <summary>True only for ChatBox-type sources. Gates chat overlay properties panel.</summary>
|
||||
public virtual bool IsChatBox => false;
|
||||
|
||||
/// <summary>True only for Countdown-type sources. Gates timer properties panel.</summary>
|
||||
public virtual bool IsCountdown => false;
|
||||
|
||||
private bool _isVisible = true;
|
||||
public bool IsVisible { get => _isVisible; set => Set(ref _isVisible, value); }
|
||||
|
||||
|
||||
@@ -184,6 +184,8 @@ public class Source : SceneElement
|
||||
|
||||
public override bool IsChatBox => Type == SourceType.ChatBox;
|
||||
|
||||
public override bool IsCountdown => Type == SourceType.Countdown;
|
||||
|
||||
private bool _chatPreviewEnabled = true;
|
||||
public bool ChatPreviewEnabled
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user