feat: fix double tap followed by dragging.
This commit is contained in:
@@ -11,7 +11,22 @@
|
|||||||
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
|
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
|
||||||
<Setter Property="ExtendClientAreaTitleBarHeightHint" Value="-1" />
|
<Setter Property="ExtendClientAreaTitleBarHeightHint" Value="-1" />
|
||||||
<Setter Property="ExtendClientAreaToDecorationsHint" Value="True" />
|
<Setter Property="ExtendClientAreaToDecorationsHint" Value="True" />
|
||||||
<Setter Property="SystemDecorations" Value="Full" />
|
<Setter Property="SystemDecorations">
|
||||||
|
<OnPlatform>
|
||||||
|
<OnPlatform.Default>
|
||||||
|
<SystemDecorations>Full</SystemDecorations>
|
||||||
|
</OnPlatform.Default>
|
||||||
|
<OnPlatform.macOS>
|
||||||
|
<SystemDecorations>Full</SystemDecorations>
|
||||||
|
</OnPlatform.macOS>
|
||||||
|
<OnPlatform.Linux>
|
||||||
|
<SystemDecorations>None</SystemDecorations>
|
||||||
|
</OnPlatform.Linux>
|
||||||
|
<OnPlatform.Windows>
|
||||||
|
<SystemDecorations>Full</SystemDecorations>
|
||||||
|
</OnPlatform.Windows>
|
||||||
|
</OnPlatform>
|
||||||
|
</Setter>
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="u:UrsaWindow">
|
<ControlTemplate TargetType="u:UrsaWindow">
|
||||||
<Panel>
|
<Panel>
|
||||||
|
|||||||
@@ -50,10 +50,13 @@ public class TitleBar: ContentControl
|
|||||||
private void OnPointerPressed(object sender, PointerPressedEventArgs e)
|
private void OnPointerPressed(object sender, PointerPressedEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
|
if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
|
||||||
|
{
|
||||||
|
if (e.ClickCount < 2)
|
||||||
{
|
{
|
||||||
_visualRoot?.BeginMoveDrag(e);
|
_visualRoot?.BeginMoveDrag(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void OnDoubleTapped(object sender, TappedEventArgs e)
|
private void OnDoubleTapped(object sender, TappedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user