Move mic to preview row + restructure bottom bar + hide avatar when signed out
Mic button/sound bar/slider moved from footer into the preview pane (vertically below the Socials+TRAX row). Bottom bar reduced to a single row: gear icon left, stream stats centered under preview, resolution dropdown right. Avatar image only loads when IsConnected fires true — no stale image from a previous session on startup. Build 0w, 247 tests.
This commit is contained in:
+193
-217
@@ -1287,239 +1287,215 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- ═══ SOCIALS + TRAX METER (below preview, never overlaps) ═══ -->
|
<!-- ═══ LIVE CONTROLS (below preview, never overlaps) ═══
|
||||||
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center"
|
Line 1: Socials + TRAX meter (desktop/game audio)
|
||||||
|
Line 2: Mic meter + volume -->
|
||||||
|
<StackPanel Grid.Row="2" Orientation="Vertical" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" Margin="0,4">
|
VerticalAlignment="Center" Margin="0,4">
|
||||||
<!-- Socials button: hover glows the social bar in the preview -->
|
<!-- Line 1: Socials + TRAX -->
|
||||||
<Button x:Name="SocialsButton"
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,4">
|
||||||
Command="{Binding OpenSocialDialogCommand}"
|
<!-- Socials button: hover glows the social bar in the preview -->
|
||||||
Style="{StaticResource YtButtonSecondary}" Padding="12,4"
|
<Button x:Name="SocialsButton"
|
||||||
FontSize="11" VerticalAlignment="Center" Margin="0,0,12,0"
|
Command="{Binding OpenSocialDialogCommand}"
|
||||||
ToolTip="Add or manage your social handles"
|
Style="{StaticResource YtButtonSecondary}" Padding="12,4"
|
||||||
MouseEnter="SocialsButton_MouseEnter"
|
FontSize="11" VerticalAlignment="Center" Margin="0,0,12,0"
|
||||||
MouseLeave="SocialsButton_MouseLeave">
|
ToolTip="Add or manage your social handles"
|
||||||
<StackPanel Orientation="Horizontal">
|
MouseEnter="SocialsButton_MouseEnter"
|
||||||
<Ellipse Width="8" Height="8" Fill="{Binding SocialBarDotBrush}"
|
MouseLeave="SocialsButton_MouseLeave">
|
||||||
Margin="0,0,6,0" VerticalAlignment="Center"/>
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock Text="Socials"/>
|
<Ellipse Width="8" Height="8" Fill="{Binding SocialBarDotBrush}"
|
||||||
</StackPanel>
|
Margin="0,0,6,0" VerticalAlignment="Center"/>
|
||||||
</Button>
|
<TextBlock Text="Socials"/>
|
||||||
<!-- TRAX meter -->
|
</StackPanel>
|
||||||
<Border Background="#D9000000" CornerRadius="6" Padding="12,8">
|
</Button>
|
||||||
<StackPanel Orientation="Horizontal">
|
<!-- TRAX meter -->
|
||||||
<!-- TRAX sits left of the "Desktop Audio" label
|
<Border Background="#D9000000" CornerRadius="6" Padding="12,8">
|
||||||
(the creator's pick): it rides the desktop
|
<StackPanel Orientation="Horizontal">
|
||||||
channel, so the music control lives with the
|
<Button Style="{StaticResource YtButtonSecondary}" Padding="8,2"
|
||||||
desktop audio controls. -->
|
FontSize="11" VerticalAlignment="Center" Margin="0,0,8,0"
|
||||||
<Button Style="{StaticResource YtButtonSecondary}" Padding="8,2"
|
ToolTipService.ToolTip="{Binding TraxToolTip}"
|
||||||
FontSize="11" VerticalAlignment="Center" Margin="0,0,8,0"
|
ToolTipService.Placement="Top"
|
||||||
ToolTipService.ToolTip="{Binding TraxToolTip}"
|
Click="TraxButton_Click"
|
||||||
ToolTipService.Placement="Top"
|
PreviewMouseRightButtonUp="TraxButton_PreviewMouseRightButtonUp">
|
||||||
Click="TraxButton_Click"
|
<StackPanel Orientation="Horizontal">
|
||||||
PreviewMouseRightButtonUp="TraxButton_PreviewMouseRightButtonUp">
|
<Ellipse Width="8" Height="8" Fill="{Binding TraxDotBrush}"
|
||||||
<StackPanel Orientation="Horizontal">
|
Margin="0,0,6,0" VerticalAlignment="Center"/>
|
||||||
<Ellipse Width="8" Height="8" Fill="{Binding TraxDotBrush}"
|
<TextBlock Text="TRAX"/>
|
||||||
Margin="0,0,6,0" VerticalAlignment="Center"/>
|
</StackPanel>
|
||||||
<TextBlock Text="TRAX"/>
|
</Button>
|
||||||
</StackPanel>
|
<TextBlock Text="Desktop Audio" Foreground="#a0a0b0" FontSize="11"
|
||||||
</Button>
|
FontWeight="SemiBold" VerticalAlignment="Center" Margin="0,0,8,0"
|
||||||
<TextBlock Text="Desktop Audio" Foreground="#a0a0b0" FontSize="11"
|
ToolTip="Desktop/game audio via WASAPI loopback (automatic); TRAX music rides the same channel"/>
|
||||||
FontWeight="SemiBold" VerticalAlignment="Center" Margin="0,0,8,0"
|
<Border Width="288" Height="14" CornerRadius="7" Background="#3a3b52" Margin="0,0,8,0"
|
||||||
ToolTip="Desktop/game audio via WASAPI loopback (automatic); TRAX music rides the same channel"/>
|
ClipToBounds="True" VerticalAlignment="Center">
|
||||||
<Border Width="288" Height="14" CornerRadius="7" Background="#3a3b52" Margin="0,0,8,0"
|
<Grid>
|
||||||
ClipToBounds="True" VerticalAlignment="Center">
|
<Rectangle Width="57" Fill="#4a4520" HorizontalAlignment="Left" Margin="173,0,0,0"
|
||||||
<Grid>
|
VerticalAlignment="Stretch"/>
|
||||||
<Rectangle Width="57" Fill="#4a4520" HorizontalAlignment="Left" Margin="173,0,0,0"
|
<Rectangle Width="58" Fill="#4a2222" HorizontalAlignment="Left" Margin="230,0,0,0"
|
||||||
VerticalAlignment="Stretch"/>
|
VerticalAlignment="Stretch"/>
|
||||||
<Rectangle Width="58" Fill="#4a2222" HorizontalAlignment="Left" Margin="230,0,0,0"
|
<Border HorizontalAlignment="Left" Width="{Binding GameMeterFillWidth}"
|
||||||
VerticalAlignment="Stretch"/>
|
Background="{Binding GameMeterBrush}" Opacity="0.75"/>
|
||||||
<Border HorizontalAlignment="Left" Width="{Binding GameMeterFillWidth}"
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="36,0,0,0"/>
|
||||||
Background="{Binding GameMeterBrush}" Opacity="0.75"/>
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="72,0,0,0"/>
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="36,0,0,0"/>
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="108,0,0,0"/>
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="72,0,0,0"/>
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="144,0,0,0"/>
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="108,0,0,0"/>
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="180,0,0,0"/>
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="144,0,0,0"/>
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="216,0,0,0"/>
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="180,0,0,0"/>
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="252,0,0,0"/>
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="216,0,0,0"/>
|
<Rectangle Width="2" Fill="#00000080" HorizontalAlignment="Left" Margin="173,0,0,0"
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="252,0,0,0"/>
|
VerticalAlignment="Stretch"/>
|
||||||
<Rectangle Width="2" Fill="#00000080" HorizontalAlignment="Left" Margin="173,0,0,0"
|
<Rectangle Width="2" Fill="#00000080" HorizontalAlignment="Left" Margin="230,0,0,0"
|
||||||
VerticalAlignment="Stretch"/>
|
VerticalAlignment="Stretch"/>
|
||||||
<Rectangle Width="2" Fill="#00000080" HorizontalAlignment="Left" Margin="230,0,0,0"
|
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled"
|
||||||
VerticalAlignment="Stretch"/>
|
Visibility="{Binding TraxError, Converter={StaticResource NotNullToVis}}"
|
||||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled"
|
VerticalAlignment="Center" Margin="4,0">
|
||||||
Visibility="{Binding TraxError, Converter={StaticResource NotNullToVis}}"
|
<TextBlock Text="{Binding TraxError}" Foreground="#e94560" FontSize="9"
|
||||||
VerticalAlignment="Center" Margin="4,0">
|
FontWeight="SemiBold" VerticalAlignment="Center"/>
|
||||||
<TextBlock Text="{Binding TraxError}" Foreground="#e94560" FontSize="9"
|
</ScrollViewer>
|
||||||
FontWeight="SemiBold" VerticalAlignment="Center"/>
|
</Grid>
|
||||||
</ScrollViewer>
|
</Border>
|
||||||
|
<Grid Width="16" Height="16" Cursor="Hand" Margin="0,0,8,0"
|
||||||
|
VerticalAlignment="Center" ToolTip="{Binding GameMuteText}"
|
||||||
|
MouseLeftButtonUp="GameSpeaker_MouseLeftButtonUp">
|
||||||
|
<Path Fill="#d0d0d0" Stretch="Uniform"
|
||||||
|
Data="M3,9v6h4l5,5V4L7,9H3zM16.5,12c0,-1.77 -1,-3.29 -2.5,-4.03v8.05c1.5,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z"
|
||||||
|
Visibility="{Binding GameMuted, Converter={StaticResource InverseBoolToVis}}"/>
|
||||||
|
<Path Fill="#ef4444" Stretch="Uniform"
|
||||||
|
Data="M3,9v6h4l5,5V4L7,9H3zM16.5,12c0,-1.77 -1,-3.29 -2.5,-4.03v8.05c1.5,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z"
|
||||||
|
Visibility="{Binding GameMuted, Converter={StaticResource BoolToVis}}"/>
|
||||||
|
<Path Stroke="#ef4444" StrokeThickness="2.5" StrokeEndLineCap="Round" Stretch="Uniform"
|
||||||
|
Data="M21,3 L3,21"
|
||||||
|
Visibility="{Binding GameMuted, Converter={StaticResource BoolToVis}}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
<Slider Width="130" Minimum="0" Maximum="1"
|
||||||
<Grid Width="16" Height="16" Cursor="Hand" Margin="0,0,8,0"
|
Value="{Binding GameAudioVolume, Mode=TwoWay}" VerticalAlignment="Center"
|
||||||
VerticalAlignment="Center" ToolTip="{Binding GameMuteText}"
|
PreviewMouseLeftButtonDown="GameVolumeSlider_PreviewMouseLeftButtonDown"
|
||||||
MouseLeftButtonUp="GameSpeaker_MouseLeftButtonUp">
|
PreviewMouseLeftButtonUp="GameVolumeSlider_PreviewMouseLeftButtonUp"
|
||||||
<Path Fill="#d0d0d0" Stretch="Uniform"
|
LostMouseCapture="GameVolumeSlider_LostMouseCapture"/>
|
||||||
Data="M3,9v6h4l5,5V4L7,9H3zM16.5,12c0,-1.77 -1,-3.29 -2.5,-4.03v8.05c1.5,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z"
|
</StackPanel>
|
||||||
Visibility="{Binding GameMuted, Converter={StaticResource InverseBoolToVis}}"/>
|
</Border>
|
||||||
<Path Fill="#ef4444" Stretch="Uniform"
|
</StackPanel>
|
||||||
Data="M3,9v6h4l5,5V4L7,9H3zM16.5,12c0,-1.77 -1,-3.29 -2.5,-4.03v8.05c1.5,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z"
|
<!-- Line 2: Mic meter + volume -->
|
||||||
Visibility="{Binding GameMuted, Converter={StaticResource BoolToVis}}"/>
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||||
<Path Stroke="#ef4444" StrokeThickness="2.5" StrokeEndLineCap="Round" Stretch="Uniform"
|
<Button Command="{Binding OpenMicPickerCommand}"
|
||||||
Data="M21,3 L3,21"
|
Style="{StaticResource YtButtonSecondary}" Padding="12,4"
|
||||||
Visibility="{Binding GameMuted, Converter={StaticResource BoolToVis}}"/>
|
FontSize="11" VerticalAlignment="Center" Margin="0,0,8,0"
|
||||||
|
ToolTip="{Binding MicStatusToolTip}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Ellipse Width="8" Height="8" Fill="{Binding MicStatusBrush}"
|
||||||
|
Margin="0,0,6,0" VerticalAlignment="Center"/>
|
||||||
|
<TextBlock Text="MIC"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
|
<Border Width="288" Height="14" CornerRadius="7" Background="#3a3b52" Margin="0,0,8,0"
|
||||||
|
ClipToBounds="True" VerticalAlignment="Center">
|
||||||
|
<Grid>
|
||||||
|
<Rectangle Width="57" Fill="#4a4520" HorizontalAlignment="Left" Margin="173,0,0,0"
|
||||||
|
VerticalAlignment="Stretch"/>
|
||||||
|
<Rectangle Width="58" Fill="#4a2222" HorizontalAlignment="Left" Margin="230,0,0,0"
|
||||||
|
VerticalAlignment="Stretch"/>
|
||||||
|
<TextBlock Text="{Binding MicSourceName}" Foreground="#b8b8c8" FontSize="10"
|
||||||
|
VerticalAlignment="Center" Margin="6,0,0,0" MaxWidth="270"
|
||||||
|
TextTrimming="CharacterEllipsis"
|
||||||
|
Visibility="{Binding MicSourceName, Converter={StaticResource NotNullToVis}}"/>
|
||||||
|
<Border HorizontalAlignment="Left" Width="{Binding MeterFillWidth}"
|
||||||
|
Background="{Binding MeterBrush}" Opacity="0.75"/>
|
||||||
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="36,0,0,0"/>
|
||||||
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="72,0,0,0"/>
|
||||||
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="108,0,0,0"/>
|
||||||
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="144,0,0,0"/>
|
||||||
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="180,0,0,0"/>
|
||||||
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="216,0,0,0"/>
|
||||||
|
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="252,0,0,0"/>
|
||||||
|
<Rectangle Width="2" Fill="#00000080" HorizontalAlignment="Left" Margin="173,0,0,0"
|
||||||
|
VerticalAlignment="Stretch"/>
|
||||||
|
<Rectangle Width="2" Fill="#00000080" HorizontalAlignment="Left" Margin="230,0,0,0"
|
||||||
|
VerticalAlignment="Stretch"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Slider Width="130" Minimum="0" Maximum="1"
|
</Border>
|
||||||
Value="{Binding GameAudioVolume, Mode=TwoWay}" VerticalAlignment="Center"
|
<Grid Width="16" Height="16" Cursor="Hand" Margin="0,0,8,0"
|
||||||
PreviewMouseLeftButtonDown="GameVolumeSlider_PreviewMouseLeftButtonDown"
|
VerticalAlignment="Center" ToolTip="{Binding MicMuteText}"
|
||||||
PreviewMouseLeftButtonUp="GameVolumeSlider_PreviewMouseLeftButtonUp"
|
MouseLeftButtonUp="MicSpeaker_MouseLeftButtonUp">
|
||||||
LostMouseCapture="GameVolumeSlider_LostMouseCapture"/>
|
<Path Fill="#d0d0d0" Stretch="Uniform"
|
||||||
</StackPanel>
|
Data="M12,14c1.66,0 3,-1.34 3,-3V5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v6C9,12.66 10.34,14 12,14zM17.3,11c0,3 -2.54,5.1 -5.3,5.1S6.7,14 6.7,11H5c0,3.41 2.72,6.23 6,6.72V21h2v-3.28c3.28,-0.49 6,-3.31 6,-6.72H17.3z"
|
||||||
</Border>
|
Visibility="{Binding MicMuted, Converter={StaticResource InverseBoolToVis}}"/>
|
||||||
|
<Path Fill="#ef4444" Stretch="Uniform"
|
||||||
|
Data="M12,14c1.66,0 3,-1.34 3,-3V5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v6C9,12.66 10.34,14 12,14zM17.3,11c0,3 -2.54,5.1 -5.3,5.1S6.7,14 6.7,11H5c0,3.41 2.72,6.23 6,6.72V21h2v-3.28c3.28,-0.49 6,-3.31 6,-6.72H17.3z"
|
||||||
|
Visibility="{Binding MicMuted, Converter={StaticResource BoolToVis}}"/>
|
||||||
|
<Path Stroke="#ef4444" StrokeThickness="2.5" StrokeEndLineCap="Round" Stretch="Uniform"
|
||||||
|
Data="M21,3 L3,21"
|
||||||
|
Visibility="{Binding MicMuted, Converter={StaticResource BoolToVis}}"/>
|
||||||
|
</Grid>
|
||||||
|
<Slider Width="130" Minimum="0" Maximum="1"
|
||||||
|
Value="{Binding MicVolume, Mode=TwoWay}" VerticalAlignment="Center"
|
||||||
|
PreviewMouseLeftButtonDown="VolumeSlider_PreviewMouseLeftButtonDown"
|
||||||
|
PreviewMouseLeftButtonUp="VolumeSlider_PreviewMouseLeftButtonUp"
|
||||||
|
LostMouseCapture="VolumeSlider_LostMouseCapture"/>
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- ═══ BOTTOM BAR: Stream Health + Audio ═══ -->
|
<!-- ═══ BOTTOM BAR: Stream stats + controls ═══ -->
|
||||||
<Border Grid.Row="3" Background="#0f3460" Padding="16,6">
|
<Border Grid.Row="3" Background="#0f3460" Padding="16,4">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.RowDefinitions>
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!-- Line 1: Mic meter + volume control CENTERED beneath the preview panel.
|
<!-- Gear icon: far left -->
|
||||||
Audio is KISS: desktop/game audio is automatic (WASAPI loopback);
|
<Button Grid.Column="0" ToolTip="Menu" Style="{StaticResource IconButton}"
|
||||||
the mic meter is the creator's only footer audio control (the
|
VerticalAlignment="Center" Click="GearButton_Click">
|
||||||
game audio bar lives INSIDE the preview window, overlaid at its
|
<Button.ContextMenu>
|
||||||
bottom edge while a full-screen game is up, and carries the
|
<ContextMenu DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
|
||||||
TRAX button left of its "Desktop Audio" label). -->
|
<MenuItem Header="App Settings" Command="{Binding OpenSettingsCommand}"/>
|
||||||
<Grid Grid.Row="0">
|
<Separator/>
|
||||||
<Grid.ColumnDefinitions>
|
<MenuItem Header="Report Bug" Command="{Binding OpenBugCommand}"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<MenuItem Header="Feature Request" Command="{Binding OpenFeatureCommand}"/>
|
||||||
</Grid.ColumnDefinitions>
|
<MenuItem Header="About" Command="{Binding OpenAboutCommand}"/>
|
||||||
|
</ContextMenu>
|
||||||
|
</Button.ContextMenu>
|
||||||
|
<Path Data="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"
|
||||||
|
Fill="#d0d0d0" Width="16" Height="16" Stretch="Uniform"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
<!-- Mic meter + volume: centered under the preview panel -->
|
<!-- Stream stats: centered under the preview pane -->
|
||||||
<StackPanel Grid.Column="0" Orientation="Horizontal"
|
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
HorizontalAlignment="Center" VerticalAlignment="Center">
|
<TextBlock Text="Bitrate:" Style="{StaticResource YtLabel}" Margin="0,0,4,0"/>
|
||||||
<Button Command="{Binding OpenMicPickerCommand}"
|
<TextBlock Style="{StaticResource YtLabel}"
|
||||||
Style="{StaticResource YtButtonSecondary}" Padding="12,4"
|
Foreground="White" Margin="0,0,20,0">
|
||||||
FontSize="11" VerticalAlignment="Center" Margin="0,0,8,0"
|
<Run Text="{Binding CurrentHealth.CurrentBitrate, Mode=OneWay}"/>
|
||||||
ToolTip="{Binding MicStatusToolTip}">
|
<Run Text=" Mbps"/>
|
||||||
<StackPanel Orientation="Horizontal">
|
</TextBlock>
|
||||||
<Ellipse Width="8" Height="8" Fill="{Binding MicStatusBrush}"
|
|
||||||
Margin="0,0,6,0" VerticalAlignment="Center"/>
|
|
||||||
<TextBlock Text="MIC"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<!-- Sound meter: muted track with a ruler scale, zone tints at
|
|
||||||
the yellow (60%) and red (80%) starts. READ-ONLY realtime
|
|
||||||
level display (fill = live level scaled by volume). -->
|
|
||||||
<Border Width="288" Height="14" CornerRadius="7" Background="#3a3b52" Margin="0,0,8,0"
|
|
||||||
ClipToBounds="True" VerticalAlignment="Center">
|
|
||||||
<Grid>
|
|
||||||
<Rectangle Width="57" Fill="#4a4520" HorizontalAlignment="Left" Margin="173,0,0,0"
|
|
||||||
VerticalAlignment="Stretch"/>
|
|
||||||
<Rectangle Width="58" Fill="#4a2222" HorizontalAlignment="Left" Margin="230,0,0,0"
|
|
||||||
VerticalAlignment="Stretch"/>
|
|
||||||
<!-- Mic source name, left-justified inside the bar; the
|
|
||||||
semi-transparent fill lets it (and the markings) show through. -->
|
|
||||||
<TextBlock Text="{Binding MicSourceName}" Foreground="#b8b8c8" FontSize="10"
|
|
||||||
VerticalAlignment="Center" Margin="6,0,0,0" MaxWidth="270"
|
|
||||||
TextTrimming="CharacterEllipsis"
|
|
||||||
Visibility="{Binding MicSourceName, Converter={StaticResource NotNullToVis}}"/>
|
|
||||||
<Border HorizontalAlignment="Left" Width="{Binding MeterFillWidth}"
|
|
||||||
Background="{Binding MeterBrush}" Opacity="0.75"/>
|
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="36,0,0,0"/>
|
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="72,0,0,0"/>
|
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="108,0,0,0"/>
|
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="144,0,0,0"/>
|
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="180,0,0,0"/>
|
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="216,0,0,0"/>
|
|
||||||
<Rectangle Width="1" Height="10" Fill="#26000000" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="252,0,0,0"/>
|
|
||||||
<Rectangle Width="2" Fill="#00000080" HorizontalAlignment="Left" Margin="173,0,0,0"
|
|
||||||
VerticalAlignment="Stretch"/>
|
|
||||||
<Rectangle Width="2" Fill="#00000080" HorizontalAlignment="Left" Margin="230,0,0,0"
|
|
||||||
VerticalAlignment="Stretch"/>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
<Grid Width="16" Height="16" Cursor="Hand" Margin="0,0,8,0"
|
|
||||||
VerticalAlignment="Center" ToolTip="{Binding MicMuteText}"
|
|
||||||
MouseLeftButtonUp="MicSpeaker_MouseLeftButtonUp">
|
|
||||||
<Path Fill="#d0d0d0" Stretch="Uniform"
|
|
||||||
Data="M12,14c1.66,0 3,-1.34 3,-3V5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v6C9,12.66 10.34,14 12,14zM17.3,11c0,3 -2.54,5.1 -5.3,5.1S6.7,14 6.7,11H5c0,3.41 2.72,6.23 6,6.72V21h2v-3.28c3.28,-0.49 6,-3.31 6,-6.72H17.3z"
|
|
||||||
Visibility="{Binding MicMuted, Converter={StaticResource InverseBoolToVis}}"/>
|
|
||||||
<Path Fill="#ef4444" Stretch="Uniform"
|
|
||||||
Data="M12,14c1.66,0 3,-1.34 3,-3V5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v6C9,12.66 10.34,14 12,14zM17.3,11c0,3 -2.54,5.1 -5.3,5.1S6.7,14 6.7,11H5c0,3.41 2.72,6.23 6,6.72V21h2v-3.28c3.28,-0.49 6,-3.31 6,-6.72H17.3z"
|
|
||||||
Visibility="{Binding MicMuted, Converter={StaticResource BoolToVis}}"/>
|
|
||||||
<Path Stroke="#ef4444" StrokeThickness="2.5" StrokeEndLineCap="Round" Stretch="Uniform"
|
|
||||||
Data="M21,3 L3,21"
|
|
||||||
Visibility="{Binding MicMuted, Converter={StaticResource BoolToVis}}"/>
|
|
||||||
</Grid>
|
|
||||||
<Slider Width="130" Minimum="0" Maximum="1"
|
|
||||||
Value="{Binding MicVolume, Mode=TwoWay}" VerticalAlignment="Center"
|
|
||||||
PreviewMouseLeftButtonDown="VolumeSlider_PreviewMouseLeftButtonDown"
|
|
||||||
PreviewMouseLeftButtonUp="VolumeSlider_PreviewMouseLeftButtonUp"
|
|
||||||
LostMouseCapture="VolumeSlider_LostMouseCapture"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Line 2: everything else — stream stats on the left, quality +
|
<TextBlock Text="FPS:" Style="{StaticResource YtLabel}" Margin="0,0,4,0"/>
|
||||||
gear on the right. -->
|
<TextBlock Style="{StaticResource YtLabel}"
|
||||||
<Grid Grid.Row="1" Margin="0,6,0,0">
|
Foreground="White" Margin="0,0,24,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Run Text="{Binding CurrentHealth.FPS, Mode=OneWay, StringFormat={}{0:0}}"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
</TextBlock>
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
|
<TextBlock Text="Dropped:" Style="{StaticResource YtLabel}" Margin="0,0,4,0"/>
|
||||||
<TextBlock Text="Bitrate:" Style="{StaticResource YtLabel}" Margin="0,0,4,0"/>
|
<TextBlock Text="{Binding CurrentHealth.DroppedFrames}" Style="{StaticResource YtLabel}"
|
||||||
<TextBlock Style="{StaticResource YtLabel}"
|
Foreground="White" Margin="0,0,20,0"/>
|
||||||
Foreground="White" Margin="0,0,20,0">
|
|
||||||
<Run Text="{Binding CurrentHealth.CurrentBitrate, Mode=OneWay}"/>
|
|
||||||
<Run Text=" Mbps"/>
|
|
||||||
</TextBlock>
|
|
||||||
|
|
||||||
<TextBlock Text="FPS:" Style="{StaticResource YtLabel}" Margin="0,0,4,0"/>
|
<TextBlock Text="Duration:" Style="{StaticResource YtLabel}" Margin="0,0,4,0"/>
|
||||||
<TextBlock Style="{StaticResource YtLabel}"
|
<TextBlock Text="{Binding CurrentHealth.StreamDuration}" Style="{StaticResource YtLabel}"
|
||||||
Foreground="White" Margin="0,0,24,0">
|
Foreground="White"/>
|
||||||
<Run Text="{Binding CurrentHealth.FPS, Mode=OneWay, StringFormat={}{0:0}}"/>
|
|
||||||
</TextBlock>
|
|
||||||
|
|
||||||
<TextBlock Text="Dropped:" Style="{StaticResource YtLabel}" Margin="0,0,4,0"/>
|
<TextBlock Text="{Binding CurrentHealth.HealthMessage}" Style="{StaticResource YtLabel}"
|
||||||
<TextBlock Text="{Binding CurrentHealth.DroppedFrames}" Style="{StaticResource YtLabel}"
|
Foreground="#e94560" Margin="20,0,0,0"/>
|
||||||
Foreground="White" Margin="0,0,20,0"/>
|
</StackPanel>
|
||||||
|
|
||||||
<TextBlock Text="Duration:" Style="{StaticResource YtLabel}" Margin="0,0,4,0"/>
|
<!-- Resolution dropdown: far right -->
|
||||||
<TextBlock Text="{Binding CurrentHealth.StreamDuration}" Style="{StaticResource YtLabel}"
|
<ComboBox Grid.Column="2" Style="{StaticResource YtComboBox}" MinWidth="150"
|
||||||
Foreground="White"/>
|
ItemsSource="{Binding QualityOptions}"
|
||||||
|
SelectedItem="{Binding SelectedQuality}"
|
||||||
<TextBlock Text="{Binding CurrentHealth.HealthMessage}" Style="{StaticResource YtLabel}"
|
DisplayMemberPath="Label"
|
||||||
Foreground="#e94560" Margin="20,0,0,0"/>
|
ToolTip="{Binding ResolutionHelp}"
|
||||||
</StackPanel>
|
IsEnabled="{Binding IsOffline}"/>
|
||||||
|
|
||||||
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
|
|
||||||
<ComboBox Style="{StaticResource YtComboBox}" MinWidth="150"
|
|
||||||
ItemsSource="{Binding QualityOptions}"
|
|
||||||
SelectedItem="{Binding SelectedQuality}"
|
|
||||||
DisplayMemberPath="Label"
|
|
||||||
ToolTip="{Binding ResolutionHelp}"
|
|
||||||
IsEnabled="{Binding IsOffline}"/>
|
|
||||||
<Button ToolTip="Menu" Style="{StaticResource IconButton}" Click="GearButton_Click">
|
|
||||||
<Button.ContextMenu>
|
|
||||||
<ContextMenu DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
|
|
||||||
<MenuItem Header="App Settings" Command="{Binding OpenSettingsCommand}"/>
|
|
||||||
<Separator/>
|
|
||||||
<MenuItem Header="Report Bug" Command="{Binding OpenBugCommand}"/>
|
|
||||||
<MenuItem Header="Feature Request" Command="{Binding OpenFeatureCommand}"/>
|
|
||||||
<MenuItem Header="About" Command="{Binding OpenAboutCommand}"/>
|
|
||||||
</ContextMenu>
|
|
||||||
</Button.ContextMenu>
|
|
||||||
<Path Data="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"
|
|
||||||
Fill="#d0d0d0" Width="16" Height="16" Stretch="Uniform"/>
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -34,7 +34,8 @@ public partial class MainWindow : Window
|
|||||||
_viewModel.ChatMessages.CollectionChanged += OnChatMessagesChanged;
|
_viewModel.ChatMessages.CollectionChanged += OnChatMessagesChanged;
|
||||||
UpdateTaskbarOverlay();
|
UpdateTaskbarOverlay();
|
||||||
UpdateSelectionOverlay();
|
UpdateSelectionOverlay();
|
||||||
LoadAvatarImage();
|
AvatarImage.Source = null;
|
||||||
|
AvatarInitial.Visibility = Visibility.Collapsed;
|
||||||
RestoreWindowGeometry();
|
RestoreWindowGeometry();
|
||||||
AppLog.Write("MainWindow ctor: end");
|
AppLog.Write("MainWindow ctor: end");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user