Skip to content

Commit

Permalink
coderabbit feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlm committed Nov 30, 2024
1 parent 24b6a82 commit 0c923c5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Consolonia.Core/Drawing/DrawingContextImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public DrawingContextImpl(ConsoleWindow consoleWindow, PixelBuffer pixelBuffer)
_consoleWindow = consoleWindow;
_pixelBuffer = pixelBuffer;
_clipStack.Push(pixelBuffer.Size);
RenderOptions = new RenderOptions();
}

private Rect CurrentClip => _clipStack.Peek();
Expand Down
4 changes: 3 additions & 1 deletion src/Consolonia.Core/Infrastructure/ConsoleWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ public object TryGetFeature(Type featureType)

public void GetWindowsZOrder(Span<Window> windows, Span<long> zOrder)
{
throw new NotImplementedException();
// In console mode, all windows are considered to be at the same z-order level
for (int i = 0; i < zOrder.Length; i++)
zOrder[i] = 0;
}

private void ConsoleOnMouseEvent(RawPointerEventType type, Point point, Vector? wheelDelta,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class ConsoloniaApplication : Application
public override void RegisterServices()
{
base.RegisterServices();

AvaloniaLocator.CurrentMutable.Bind<IKeyboardNavigationHandler>()
.ToTransient<ArrowsAndKeyboardNavigationHandler>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _____/ :--'
Bill Ames
</TextBlock>
<Button Content="One More"
Name="Button"
Name="OneMoreButton"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Click="OneMore_Clicked" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ public SomeDialogWindow(double width, double height)
InitializeComponent();
Width = width;
Height = height;
this.Button.Focus();

AttachedToVisualTree += (_, _)
=> OneMoreButton.AttachedToVisualTree += (_, _)
=> OneMoreButton.Focus();
}

// ReSharper disable once MemberCanBePrivate.Global Can be used by constructor
Expand Down

0 comments on commit 0c923c5

Please sign in to comment.