Partially modernizes Scenarios (#4512)

This commit is contained in:
Tig
2025-12-19 20:02:04 -07:00
committed by GitHub
parent 8f4ad8a7d4
commit af0efb3c64
17 changed files with 1307 additions and 1045 deletions

View File

@@ -564,15 +564,15 @@ public class TreeViewFileSystem : Scenario
}
// Only handle mouse clicks
if (e.Context is not CommandContext<MouseBinding> { Binding.MouseEventArgs: { } mouseArgs })
if (e.Context is not CommandContext<MouseBinding> { Binding.MouseEventArgs: { } mouse })
{
return;
}
// if user right clicks
if (mouseArgs.Flags.HasFlag (MouseFlags.Button3Clicked))
if (mouse.Flags.HasFlag (MouseFlags.Button3Clicked))
{
IFileSystemInfo? rightClicked = _treeViewFiles.GetObjectOnRow (mouseArgs.Position.Y);
IFileSystemInfo? rightClicked = _treeViewFiles.GetObjectOnRow (mouse.Position.Y);
// nothing was clicked
if (rightClicked is null)
@@ -582,8 +582,8 @@ public class TreeViewFileSystem : Scenario
ShowContextMenu (
new (
mouseArgs.Position.X + _treeViewFiles.Frame.X,
mouseArgs.Position.Y + _treeViewFiles.Frame.Y + 2
mouse.Position.X + _treeViewFiles.Frame.X,
mouse.Position.Y + _treeViewFiles.Frame.Y + 2
),
rightClicked
);