Skip to content

Commit 00894be

Browse files
committed
cleanup of changes
1 parent 0973c9e commit 00894be

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

App/Controls/ExpandContent.xaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
13
<UserControl
24
x:Class="Coder.Desktop.App.Controls.ExpandContent"
35
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
46
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5-
xmlns:toolkit="using:CommunityToolkit.WinUI">
7+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
xmlns:toolkit="using:CommunityToolkit.WinUI"
10+
mc:Ignorable="d">
611

7-
<Grid>
8-
<Grid x:Name="CollapsiblePanel"
9-
Visibility="Collapsed"
10-
Opacity="0"
11-
MaxHeight="0"
12-
toolkit:UIElementExtensions.ClipToBounds="True">
12+
<Grid>
13+
<Grid x:Name="CollapsiblePanel" Opacity="0" Visibility="Collapsed" MaxHeight="0" toolkit:UIElementExtensions.ClipToBounds="True">
1314

1415
<Grid.RenderTransform>
15-
<TranslateTransform x:Name="Slide" Y="-16"/>
16+
<TranslateTransform x:Name="SlideTransform" Y="-16"/>
1617
</Grid.RenderTransform>
1718
</Grid>
1819

@@ -27,7 +28,7 @@
2728
<DoubleAnimation Storyboard.TargetName="CollapsiblePanel"
2829
Storyboard.TargetProperty="Opacity" BeginTime="0:0:0.16"
2930
To="1" Duration="0:0:0.16"/>
30-
<DoubleAnimation Storyboard.TargetName="Slide"
31+
<DoubleAnimation Storyboard.TargetName="SlideTransform"
3132
Storyboard.TargetProperty="Y" BeginTime="0:0:0.16"
3233
To="0" Duration="0:0:0.16"/>
3334
</Storyboard>
@@ -42,7 +43,7 @@
4243
<DoubleAnimation Storyboard.TargetName="CollapsiblePanel"
4344
Storyboard.TargetProperty="Opacity"
4445
To="0" Duration="0:0:0.16"/>
45-
<DoubleAnimation Storyboard.TargetName="Slide"
46+
<DoubleAnimation Storyboard.TargetName="SlideTransform"
4647
Storyboard.TargetProperty="Y"
4748
To="-16" Duration="0:0:0.16"/>
4849
</Storyboard>

App/ViewModels/TrayWindowViewModel.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,6 @@ private void ShowFileSyncListWindow()
362362
[RelayCommand]
363363
private async Task SignOut()
364364
{
365-
//if (VpnLifecycle is not VpnLifecycle.Stopped)
366-
// return;
367365
await _rpcController.StopVpn();
368366
await _credentialManager.ClearCredentials();
369367
}

App/Views/TrayWindow.xaml.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public sealed partial class TrayWindow : Window
3434
private bool _resizeInProgress;
3535

3636
private NativeApi.POINT? _lastActivatePosition;
37-
private int _maxHeightSinceLastActivation;
3837

3938
private readonly IRpcController _rpcController;
4039
private readonly ICredentialManager _credentialManager;
@@ -209,7 +208,6 @@ private void MoveAndResize(double height)
209208
private void MoveResizeAndActivate()
210209
{
211210
SaveCursorPos();
212-
_maxHeightSinceLastActivation = 0;
213211
MoveAndResize(RootFrame.GetContentSize().Height);
214212
AppWindow.Show();
215213
NativeApi.SetForegroundWindow(WindowNative.GetWindowHandle(this));
@@ -234,9 +232,6 @@ private SizeInt32 CalculateWindowSize(double height)
234232
var scale = DisplayScale.WindowScale(this);
235233
var newWidth = (int)(WIDTH * scale);
236234
var newHeight = (int)(height * scale);
237-
// Store the maximum height we've seen for positioning purposes.
238-
if (newHeight > _maxHeightSinceLastActivation)
239-
_maxHeightSinceLastActivation = newHeight;
240235

241236
return new SizeInt32(newWidth, newHeight);
242237
}

0 commit comments

Comments
 (0)