mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-07-07 19:09:43 +02:00
remove recording indicator from snapshot window
This commit is contained in:
@@ -18,31 +18,6 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Recording indicator -->
|
||||
<StackPanel
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,12,0,4"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal"
|
||||
Spacing="8">
|
||||
<Ellipse
|
||||
x:Name="RecordingDot"
|
||||
Width="12"
|
||||
Height="12"
|
||||
VerticalAlignment="Center"
|
||||
Fill="Red">
|
||||
<Ellipse.OpacityTransition>
|
||||
<ScalarTransition Duration="0:0:0.6" />
|
||||
</Ellipse.OpacityTransition>
|
||||
</Ellipse>
|
||||
<TextBlock
|
||||
x:Uid="CapturingLabel"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="13"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{ThemeResource SystemFillColorCriticalBrush}" />
|
||||
</StackPanel>
|
||||
|
||||
<ContentControl
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="2"
|
||||
|
||||
@@ -18,9 +18,7 @@ namespace WorkspacesEditor.Views
|
||||
{
|
||||
public sealed partial class SnapshotWindow : Window
|
||||
{
|
||||
private readonly Microsoft.UI.Xaml.DispatcherTimer _pulseTimer;
|
||||
private bool _captured;
|
||||
private bool _dotVisible = true;
|
||||
|
||||
public SnapshotWindow()
|
||||
{
|
||||
@@ -58,16 +56,6 @@ namespace WorkspacesEditor.Views
|
||||
int y = workArea.Y + ((workArea.Height - 200) / 2);
|
||||
appWindow.Move(new Windows.Graphics.PointInt32(x, y));
|
||||
|
||||
// Pulse the recording dot
|
||||
_pulseTimer = new Microsoft.UI.Xaml.DispatcherTimer();
|
||||
_pulseTimer.Interval = TimeSpan.FromMilliseconds(600);
|
||||
_pulseTimer.Tick += (s, e) =>
|
||||
{
|
||||
_dotVisible = !_dotVisible;
|
||||
RecordingDot.Opacity = _dotVisible ? 1.0 : 0.15;
|
||||
};
|
||||
_pulseTimer.Start();
|
||||
|
||||
this.Closed += OnClosed;
|
||||
|
||||
// Set focus to the Capture button when window loads
|
||||
@@ -102,7 +90,6 @@ namespace WorkspacesEditor.Views
|
||||
|
||||
private void OnClosed(object sender, WindowEventArgs args)
|
||||
{
|
||||
_pulseTimer.Stop();
|
||||
if (!_captured)
|
||||
{
|
||||
StrongReferenceMessenger.Default.Send(new SnapshotCancelledMessage());
|
||||
|
||||
Reference in New Issue
Block a user