Skip to content

Commit

Permalink
refactor: Memory view buttons layout
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilien Noal <noal.maximilien@gmail.com>
  • Loading branch information
maximilien-noal committed Nov 11, 2024
1 parent 62f448a commit 1e19339
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions src/Spice86/Views/MemoryView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,36 @@
</UserControl.Resources>
<ScrollViewer>
<Grid RowDefinitions="Auto,*">
<StackPanel Orientation="Horizontal" Grid.Row="0">
<Button Command="{Binding EditMemoryCommand}" Content="Edit..." />
<Button Command="{Binding BeginCreateMemoryBreakpointCommand}" Content="Breakpoint..." />
<Button Command="{Binding StartMemorySearchCommand}" Content="Search..." />
<Button Command="{Binding DumpMemoryCommand}" Content="Dump..." />
<Button
Command="{Binding NewMemoryViewCommand}"
Content="New Memory View"
IsEnabled="{Binding IsPaused}" />
<Button
Command="{Binding CloseTabCommand}"
Content="Close View"
IsEnabled="{Binding CanCloseTab}" />
<StackPanel Orientation="Horizontal" Grid.Row="0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
ScrollViewer.HorizontalScrollBarVisibility="Hidden">
<Button VerticalAlignment="Top" Command="{Binding StartMemorySearchCommand}" Content="Search..." />
<Button VerticalAlignment="Top" Command="{Binding EditMemoryCommand}" Content="Edit..." />
<Button VerticalAlignment="Top" Command="{Binding DumpMemoryCommand}" Content="Dump..." />
<StackPanel Orientation="Vertical">
<Button Command="{Binding BeginCreateMemoryBreakpointCommand}" Content="Breakpoint..." />
<Button IsVisible="{Binding IsStructureInfoPresent}"
Command="{Binding ShowStructureView}"
Content="Structure view" />
</StackPanel>
<StackPanel Orientation="Vertical">
<Button
Command="{Binding NewMemoryViewCommand}"
Content="New Memory View"
IsEnabled="{Binding IsPaused}" />
<Button
Command="{Binding CloseTabCommand}"
Content="Close View"
IsEnabled="{Binding CanCloseTab}" />
</StackPanel>
<UniformGrid>
<Label Content="Start" />
<NumericUpDown Value="{Binding StartAddress}" />
<Label Content="End" />
<NumericUpDown Value="{Binding EndAddress}" />
</UniformGrid>
<Button IsVisible="{Binding IsPaused}" Command="{Binding UpdateBinaryDocumentCommand}" Content="Refresh" />
<Button IsVisible="{Binding IsStructureInfoPresent}" Command="{Binding ShowStructureView}" Content="Structure view" />
</StackPanel>
<Grid Grid.Row="1">
<TextBlock IsVisible="{Binding !IsPaused}" Text="Memory is displayed only when the emulator is paused" />
Expand Down

0 comments on commit 1e19339

Please sign in to comment.