Skip to content

Commit

Permalink
Merge branch 'master' into feature/dos_process_managment_init
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilien-noal authored Dec 29, 2024
2 parents 0a778e5 + 599ad26 commit de7680d
Show file tree
Hide file tree
Showing 43 changed files with 1,018 additions and 569 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ jobs:

- name: Upload NuGet Bufdio.Spice86
working-directory: ./src/Bufdio.Spice86/bin/Release
run: nuget push Bufdio.Spice86.7.0.0.nupkg ${{secrets.NUGET_API_KEY}} -Source 'https://api.nuget.org/v3/index.json' -SkipDuplicate
run: nuget push Bufdio.Spice86.8.0.0.nupkg ${{secrets.NUGET_API_KEY}} -Source 'https://api.nuget.org/v3/index.json' -SkipDuplicate

- name: Upload NuGet Spice86.Shared
working-directory: ./src/Spice86.Shared/bin/Release
run: nuget push Spice86.Shared.7.0.0.nupkg ${{secrets.NUGET_API_KEY}} -Source 'https://api.nuget.org/v3/index.json' -SkipDuplicate
run: nuget push Spice86.Shared.8.0.0.nupkg ${{secrets.NUGET_API_KEY}} -Source 'https://api.nuget.org/v3/index.json' -SkipDuplicate

- name: Upload NuGet Spice86.Logging
working-directory: ./src/Spice86.Logging/bin/Release
run: nuget push Spice86.Logging.7.0.0.nupkg ${{secrets.NUGET_API_KEY}} -Source 'https://api.nuget.org/v3/index.json' -SkipDuplicate
run: nuget push Spice86.Logging.8.0.0.nupkg ${{secrets.NUGET_API_KEY}} -Source 'https://api.nuget.org/v3/index.json' -SkipDuplicate

- name: Upload NuGet Spice86.Core
working-directory: ./src/Spice86.Core/bin/Release
run: nuget push Spice86.Core.7.0.0.nupkg ${{secrets.NUGET_API_KEY}} -Source 'https://api.nuget.org/v3/index.json' -SkipDuplicate
run: nuget push Spice86.Core.8.0.0.nupkg ${{secrets.NUGET_API_KEY}} -Source 'https://api.nuget.org/v3/index.json' -SkipDuplicate

- name: Upload NuGet Spice86
working-directory: ./src/Spice86/bin/Release
run: nuget push Spice86.7.0.0.nupkg ${{secrets.NUGET_API_KEY}} -Source 'https://api.nuget.org/v3/index.json' -SkipDuplicate
run: nuget push Spice86.8.0.0.nupkg ${{secrets.NUGET_API_KEY}} -Source 'https://api.nuget.org/v3/index.json' -SkipDuplicate
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ Stunts:

Betrayal at Krondor:

![](doc/BaK.PNG)
![](doc/BaK.png)

## Credits

Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</PropertyGroup>
<!-- Nuget package info-->
<PropertyGroup>
<Version>7.0.0</Version>
<PackageReleaseNotes>Some breaking API changes (SegmentRegisters.cs), WIP new CFG_CPU, addtionnal memory/disasm views to the internal debugger, replaced UI DI framework with Microsoft.DI.</PackageReleaseNotes>
<Version>8.0.0</Version>
<PackageReleaseNotes>Some breaking API changes (replaced Microosft.DI with compile-time DI, see Spice86DependencyInjection), Breakpoint support in Internal Debugger, SegmentRegisters replaced by SegmentRegisterIndex, and dependendencies to the Machine class have been replaced with direct dependencies in all classes, which is also a breaking change for projects using Spice86 compared to Nuget v7.0.0.</PackageReleaseNotes>
<Authors>Kevin Ferrare, Maximilien Noal, Joris van Eijden, Artjom Vejsel</Authors>
<PackageTags>reverse-engineering;avalonia;debugger;assembly;emulator;cross-platform</PackageTags>
<Description>Reverse engineer and rewrite real mode dos programs</Description>
Expand Down
29 changes: 15 additions & 14 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Avalonia" Version="11.2.1" />
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.2.1" />
<PackageVersion Include="Avalonia" Version="11.2.3" />
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.2.3" />
<PackageVersion Include="Avalonia.Controls.PanAndZoom" Version="11.2.0" />
<PackageVersion Include="Avalonia.Controls.TreeDataGrid" Version="11.0.10" />
<PackageVersion Include="Avalonia.Desktop" Version="11.2.1" />
<PackageVersion Include="Avalonia.Diagnostics" Version="11.2.1" />
<PackageVersion Include="Avalonia.Fonts.Inter" Version="11.2.1" />
<PackageVersion Include="Avalonia.Xaml.Behaviors" Version="11.2.0" />
<PackageVersion Include="Avalonia.Controls.TreeDataGrid" Version="11.1.0" />
<PackageVersion Include="Avalonia.Desktop" Version="11.2.3" />
<PackageVersion Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageVersion Include="Avalonia.Fonts.Inter" Version="11.2.3" />
<PackageVersion Include="Avalonia.Xaml.Behaviors" Version="11.2.0.1" />
<PackageVersion Include="AvaloniaGraphControl" Version="0.6.1" />
<PackageVersion Include="AvaloniaHex" Version="0.1.5" />
<PackageVersion Include="AvaloniaHex" Version="0.1.6" />
<PackageVersion Include="bodong.Avalonia.PropertyGrid" Version="11.1.4.2" />
<PackageVersion Include="bodong.PropertyModels" Version="11.1.4.2" />
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
<PackageVersion Include="CommunityToolkit.HighPerformance" Version="8.3.2" />
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageVersion Include="CommunityToolkit.HighPerformance" Version="8.4.0" />
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="Deadpikle.AvaloniaProgressRing" Version="0.10.10" />
<PackageVersion Include="DialogHost.Avalonia" Version="0.8.1" />
<PackageVersion Include="ErrorProne.NET.CoreAnalyzers" Version="0.1.2" />
<PackageVersion Include="FluentIcons.Avalonia.Fluent" Version="1.1.265" />
<PackageVersion Include="FluentIcons.Avalonia.Fluent" Version="1.1.271" />
<PackageVersion Include="Iced" Version="1.21.0" />
<PackageVersion Include="JetBrains.Annotations" Version="2024.3.0" />
<PackageVersion Include="JvE.Structurizer" Version="1.0.1" />
Expand All @@ -34,10 +35,10 @@
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.9" />
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.12.9" />
<PackageVersion Include="Semi.Avalonia" Version="11.2.1" />
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.2.1" />
<PackageVersion Include="Semi.Avalonia" Version="11.2.1.2" />
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.2.1.2" />
<PackageVersion Include="Semi.Avalonia.TreeDataGrid" Version="11.0.10.1" />
<PackageVersion Include="Serilog" Version="4.1.0" />
<PackageVersion Include="Serilog" Version="4.2.0" />
<PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageVersion Include="Serilog.Sinks.Debug" Version="3.0.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="6.0.0" />
Expand Down
7 changes: 5 additions & 2 deletions src/Spice86.Core/Emulator/Devices/Video/Renderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Spice86.Core.Emulator.Devices.Video;
/// <inheritdoc cref="IVgaRenderer" />
public class Renderer : IVgaRenderer {
private static readonly object RenderLock = new();
private readonly IVideoMemory _memory;
private readonly VideoMemory _memory;
private readonly IVideoState _state;

/// <summary>
Expand Down Expand Up @@ -194,7 +194,10 @@ private MemoryWidth DetermineMemoryWidthMode() {
return memoryWidthMode;
}

private (byte plane0, byte plane1, byte plane2, byte plane3) ReadVideoMemory(MemoryWidth memoryWidthMode, int memoryAddressCounter, bool scanLineBit0ForAddressBit13, int scanline, bool scanLineBit0ForAddressBit14, IReadOnlyList<bool> planesEnabled) {
private (byte plane0, byte plane1, byte plane2, byte plane3) ReadVideoMemory(
MemoryWidth memoryWidthMode, int memoryAddressCounter,
bool scanLineBit0ForAddressBit13, int scanline,
bool scanLineBit0ForAddressBit14, ReadOnlySpan<bool> planesEnabled) {
// Convert logical address to physical address.
ushort physicalAddress = memoryWidthMode switch {

Check warning on line 202 in src/Spice86.Core/Emulator/Devices/Video/Renderer.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

The switch expression does not handle some values of its input type (it is not exhaustive) involving an unnamed enum value. For example, the pattern '(Spice86.Core.Emulator.Devices.Video.MemoryWidth)4' is not covered.

Check warning on line 202 in src/Spice86.Core/Emulator/Devices/Video/Renderer.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

The switch expression does not handle some values of its input type (it is not exhaustive) involving an unnamed enum value. For example, the pattern '(Spice86.Core.Emulator.Devices.Video.MemoryWidth)4' is not covered.

Check warning on line 202 in src/Spice86.Core/Emulator/Devices/Video/Renderer.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The switch expression does not handle some values of its input type (it is not exhaustive) involving an unnamed enum value. For example, the pattern '(Spice86.Core.Emulator.Devices.Video.MemoryWidth)4' is not covered.
MemoryWidth.Byte => (ushort)memoryAddressCounter,
Expand Down
5 changes: 3 additions & 2 deletions src/Spice86.Core/Emulator/Devices/Video/VideoMemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private void HandleWriteMode2(byte value, Register8 planeEnable, bool[] writePla
}
}

private void HandleWriteMode1(Register8 planeEnable, IReadOnlyList<bool> writePlane, uint offset) {
private void HandleWriteMode1(Register8 planeEnable, ReadOnlySpan<bool> writePlane, uint offset) {
// Foreach plane
for (int plane = 0; plane < 4; plane++) {
if (planeEnable[plane] && writePlane[plane]) {
Expand All @@ -151,7 +151,8 @@ private void HandleWriteMode1(Register8 planeEnable, IReadOnlyList<bool> writePl
}
}

private void HandleWriteMode0(byte value, Register8 planeEnable, IReadOnlyList<bool> writePlane, Register8 setResetEnable, Register8 setReset, uint offset) {
private void HandleWriteMode0(byte value, Register8 planeEnable,
ReadOnlySpan<bool> writePlane, Register8 setResetEnable, Register8 setReset, uint offset) {
Debug.Assert(offset < 0x10000);
if (_state.GraphicsControllerRegisters.DataRotateRegister.RotateCount != 0) {
value.Ror(_state.GraphicsControllerRegisters.DataRotateRegister.RotateCount);
Expand Down
8 changes: 5 additions & 3 deletions src/Spice86.Core/Emulator/Gdb/GdbCommandBreakPointHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ public GdbCommandBreakpointHandler(EmulatorBreakpointsManager emulatorBreakpoint
/// <returns>A response string to send back to GDB.</returns>
public string AddBreakpoint(string commandContent) {
BreakPoint? breakPoint = ParseBreakPoint(commandContent);
_emulatorBreakpointsManager.ToggleBreakPoint(breakPoint, true);
if (_loggerService.IsEnabled(LogEventLevel.Debug)) {
_loggerService.Debug("Breakpoint added!\n{@BreakPoint}", breakPoint);
if(breakPoint is not null) {
_emulatorBreakpointsManager.ToggleBreakPoint(breakPoint, true);
if (_loggerService.IsEnabled(LogEventLevel.Debug)) {
_loggerService.Debug("Breakpoint added!\n{@BreakPoint}", breakPoint);
}
}
return _gdbIo.GenerateResponse("OK");
}
Expand Down
10 changes: 5 additions & 5 deletions src/Spice86.Core/Emulator/Gdb/GdbCommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ private string Kill() {

private Tuple<string, object> ParseSupportedQuery(string item) {
Tuple<string, object> res;
if (item.EndsWith("+")) {
if (item.EndsWith('+')) {
res = Tuple.Create(item[0..^1], (object)true);
} else if (item.EndsWith("-")) {
} else if (item.EndsWith('-')) {
res = Tuple.Create(item[0..^1], (object)false);
} else {
string[] split = item.Split("=");
string[] split = item.Split('=');
res = Tuple.Create(split[0], new object());
if (split.Length == 2) {
res = Tuple.Create(split[0], (object)split[1]);
Expand Down Expand Up @@ -171,12 +171,12 @@ private string QueryVariable(string command) {
return _gdbIo.GenerateResponse("");
}

if (command.StartsWith("L")) {
if (command.StartsWith('L')) {
string nextthread = command[4..];
return _gdbIo.GenerateResponse($"qM011{nextthread}00000001");
}

if (command.StartsWith("P")) {
if (command.StartsWith('P')) {
return _gdbIo.GenerateResponse("");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public MemoryAsmWriter(IIndexable memory, SegmentedAddress beginningAddress, Cal
/// <param name="callbackNumber">Callback index</param>
/// <param name="runnable">Action to run when this callback is executed by the CPU</param>
public void RegisterAndWriteCallback(byte callbackNumber, Action runnable) {
ICallback callback = new Callback(callbackNumber, runnable, GetCurrentAddressCopy());
Callback callback = new Callback(callbackNumber, runnable, GetCurrentAddressCopy());
_callbackHandler.AddCallback(callback);
WriteCallback(callback.Index);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class DosInt21Handler : InterruptHandler {

private StringBuilder _displayOutputBuilder = new();
private readonly DosFileManager _dosFileManager;
private readonly IList<IVirtualDevice> _devices;
private readonly List<IVirtualDevice> _devices;
private readonly Dos _dos;
private readonly KeyboardInt16Handler _keyboardInt16Handler;
private readonly IVgaFunctionality _vgaFunctionality;
Expand Down
20 changes: 10 additions & 10 deletions src/Spice86.Core/Emulator/InterruptHandlers/VGA/VgaFunctionality.cs
Original file line number Diff line number Diff line change
Expand Up @@ -792,9 +792,9 @@ private SegmentedAddress GetInterruptVectorAddress(byte vector) {
return new SegmentedAddress(_interruptVectorTable[vector]);
}

private int MemCmp(IReadOnlyList<byte> bytes, ushort segment, ushort offset, int length) {
private int MemCmp(ReadOnlySpan<byte> bytes, ushort segment, ushort offset, int length) {
int i = 0;
while (length-- > 0 && i < bytes.Count) {
while (length-- > 0 && i < bytes.Length) {
int difference = bytes[i] - _memory.UInt8[segment, offset];
if (difference != 0) {
return difference < 0 ? -1 : 1;
Expand Down Expand Up @@ -1245,7 +1245,7 @@ private void SetAttributeControllerIndex(byte value) {
WriteByteToIoPort(value, VgaPort.AttributeAddress);
}

private void WriteToDac(IReadOnlyList<byte> palette, byte startIndex, int count) {
private void WriteToDac(ReadOnlySpan<byte> palette, byte startIndex, int count) {
WriteByteToIoPort(startIndex, VgaPort.DacAddressWriteIndex);
int i = 0;
while (count > 0) {
Expand Down Expand Up @@ -1333,26 +1333,26 @@ private void FillRegisters(VideoMode videoMode) {
WriteToMiscellaneousOutput(miscellaneousRegisterValue);
}

private void SetCrtControllerRegisters(VgaPort crtControllerPort, IReadOnlyList<byte> videoModeCrtControllerRegisterValues) {
private void SetCrtControllerRegisters(VgaPort crtControllerPort, ReadOnlySpan<byte> videoModeCrtControllerRegisterValues) {
for (byte i = 0; i <= 0x18; i++) {
WriteToCrtController(crtControllerPort, i, videoModeCrtControllerRegisterValues[i]);
}
}

private void SetGraphicsControllerRegisters(IReadOnlyList<byte> videoModeGraphicsControllerRegisterValues) {
for (byte i = 0; i < videoModeGraphicsControllerRegisterValues.Count; i++) {
private void SetGraphicsControllerRegisters(ReadOnlySpan<byte> videoModeGraphicsControllerRegisterValues) {
for (byte i = 0; i < videoModeGraphicsControllerRegisterValues.Length; i++) {
WriteToGraphicsController(i, videoModeGraphicsControllerRegisterValues[i]);
}
}

private void SetSequencerRegisters(IReadOnlyList<byte> videoModeSequencerRegisterValues) {
for (byte i = 0; i < videoModeSequencerRegisterValues.Count; i++) {
private void SetSequencerRegisters(ReadOnlySpan<byte> videoModeSequencerRegisterValues) {
for (byte i = 0; i < videoModeSequencerRegisterValues.Length; i++) {
WriteToSequencer(i, videoModeSequencerRegisterValues[i]);
}
}

private void SetAttributeControllerRegisters(IReadOnlyList<byte> videoModeAttributeControllerRegisterValues) {
for (byte i = 0; i < videoModeAttributeControllerRegisterValues.Count; i++) {
private void SetAttributeControllerRegisters(ReadOnlySpan<byte> videoModeAttributeControllerRegisterValues) {
for (byte i = 0; i < videoModeAttributeControllerRegisterValues.Length; i++) {
WriteToAttributeController(i, videoModeAttributeControllerRegisterValues[i]);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public DosPathResolver(string? cDriveFolderPath, string? executablePath, char cu
/// </summary>
public DosFileOperationResult GetCurrentDosDirectory(byte driveNumber, out string currentDir) {
//0 = default drive
if (driveNumber == 0 && _driveMap.Any()) {
if (driveNumber == 0 && _driveMap.Count > 0) {
MountedFolder mountedFolder = _driveMap[_currentDrive];
currentDir = mountedFolder.CurrentDosDirectory;
return DosFileOperationResult.NoValue();
Expand Down
7 changes: 2 additions & 5 deletions src/Spice86.Core/Emulator/VM/EmulatorBreakpointsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,8 @@ public void OnMachineStop() {
/// </summary>
/// <param name="breakPoint">The breakpoint to toggle.</param>
/// <param name="on">True to turn the breakpoint on, false to turn it off.</param>
public void ToggleBreakPoint(BreakPoint? breakPoint, bool on) {
if (breakPoint is null) {
return;
}
BreakPointType? breakPointType = breakPoint.BreakPointType;
public void ToggleBreakPoint(BreakPoint breakPoint, bool on) {
BreakPointType breakPointType = breakPoint.BreakPointType;
switch (breakPointType) {
case BreakPointType.EXECUTION:
_executionBreakPoints.ToggleBreakPoint(breakPoint, on);
Expand Down
45 changes: 23 additions & 22 deletions src/Spice86/App.axaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
<Application
x:Class="Spice86.App"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dialogHostAvalonia="clr-namespace:DialogHostAvalonia;assembly=DialogHost.Avalonia"
RequestedThemeVariant="Default">
x:Class="Spice86.App"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dialogHostAvalonia="clr-namespace:DialogHostAvalonia;assembly=DialogHost.Avalonia"
RequestedThemeVariant="Default">

<Application.Resources>
<ResourceDictionary>
<FontFamily x:Key="RobotoMonoFont">avares://Spice86/Assets#Roboto Mono</FontFamily>
<FontFamily x:Key="ConsolasFont">Consolas</FontFamily>
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="avares://Spice86/Assets/ControlThemes.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
<Application.Resources>
<ResourceDictionary>
<FontFamily x:Key="RobotoMonoFont">avares://Spice86/Assets#Roboto Mono</FontFamily>
<FontFamily x:Key="ConsolasFont">Consolas</FontFamily>
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="avares://Spice86/Assets/ControlThemes.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

<Application.Styles>
<dialogHostAvalonia:DialogHostStyles />
<StyleInclude Source="avares://AvaloniaHex/Themes/Simple/AvaloniaHex.axaml" />
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
<StyleInclude Source="avares://Semi.Avalonia.TreeDataGrid/Index.axaml" />
<StyleInclude Source="Styles/Spice86.axaml" />
</Application.Styles>
<Application.Styles>
<StyleInclude Source="avares://AvaloniaProgressRing/Styles/ProgressRing.xaml"/>
<dialogHostAvalonia:DialogHostStyles />
<StyleInclude Source="avares://AvaloniaHex/Themes/Simple/AvaloniaHex.axaml" />
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
<StyleInclude Source="avares://Semi.Avalonia.TreeDataGrid/Index.axaml" />
<StyleInclude Source="Styles/Spice86.axaml" />
</Application.Styles>

</Application>
4 changes: 2 additions & 2 deletions src/Spice86/Controls/GroupBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Spice86.Controls;
/// </summary>
internal sealed class GroupBox : HeaderedContentControl {
static GroupBox() {
IsTabStopProperty.OverrideDefaultValue(typeof(GroupBox), false);
FocusableProperty.OverrideDefaultValue(typeof(GroupBox), false);
IsTabStopProperty.OverrideDefaultValue<GroupBox>(false);
FocusableProperty.OverrideDefaultValue<GroupBox>(false);
}
}
2 changes: 1 addition & 1 deletion src/Spice86/Controls/StatusBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ internal sealed class StatusBar : StackPanel {
protected override Type StyleKeyOverride { get; } = typeof(StackPanel);

static StatusBar() {
OrientationProperty.OverrideDefaultValue(typeof(StatusBar), Orientation.Horizontal);
OrientationProperty.OverrideDefaultValue<StatusBar>(Orientation.Horizontal);
HorizontalAlignmentProperty.OverrideDefaultValue<StatusBar>(HorizontalAlignment.Stretch);
}
}
2 changes: 1 addition & 1 deletion src/Spice86/Controls/StatusBarItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ namespace Spice86.Controls;
internal sealed class StatusBarItem : ContentControl {
static StatusBarItem() {
HorizontalContentAlignmentProperty.OverrideDefaultValue<StatusBarItem>(HorizontalAlignment.Stretch);
IsTabStopProperty.OverrideDefaultValue(typeof(StatusBarItem), false);
IsTabStopProperty.OverrideDefaultValue<StatusBarItem>(false);
}
}
Loading

0 comments on commit de7680d

Please sign in to comment.