fix: creator feedback batch Branch 1 — TRAX volume, tooltip, meter boost, slider click, backdrop
- TRAX: LocalGain now applies 0.2× factor so music is quieter relative to desktop audio slider - TRAX tooltip: switched to ToolTipService with Placement=Top to fix z-order in Viewbox overlay - Mic meter: MeterLevel multiplied by 1.2× before clamping for ~20% higher visual readout - Volume sliders: click anywhere on track to jump thumb to that position before dragging - Backdrop: Image Visibility now binds to BackdropVisible; compositor checks IsVisible before blit - Renamed 'Backdrop' to 'Game Capture' in EnsureBackdrop + test assertions
This commit is contained in:
@@ -83,6 +83,8 @@ public partial class MainWindow : Window
|
||||
|
||||
private void VolumeSlider_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender is Slider slider)
|
||||
SetSliderValueFromClick(slider, e);
|
||||
if (sender is FrameworkElement { DataContext: MainViewModel vm })
|
||||
vm.SetVolumeAdjusting(true);
|
||||
}
|
||||
@@ -101,6 +103,8 @@ public partial class MainWindow : Window
|
||||
|
||||
private void GameVolumeSlider_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender is Slider slider)
|
||||
SetSliderValueFromClick(slider, e);
|
||||
if (sender is FrameworkElement { DataContext: MainViewModel vm })
|
||||
vm.SetGameVolumeAdjusting(true);
|
||||
}
|
||||
@@ -117,6 +121,15 @@ public partial class MainWindow : Window
|
||||
vm.SetGameVolumeAdjusting(false);
|
||||
}
|
||||
|
||||
private static void SetSliderValueFromClick(Slider slider, MouseButtonEventArgs e)
|
||||
{
|
||||
var track = slider.Template.FindName("PART_Track", slider) as System.Windows.Controls.Primitives.Track;
|
||||
if (track == null) return;
|
||||
var pos = e.GetPosition(track);
|
||||
var fraction = Math.Clamp(pos.X / track.RenderSize.Width, 0, 1);
|
||||
slider.Value = slider.Minimum + fraction * (slider.Maximum - slider.Minimum);
|
||||
}
|
||||
|
||||
private void MicSpeaker_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender is FrameworkElement { DataContext: MainViewModel vm })
|
||||
|
||||
Reference in New Issue
Block a user