Skip to content

Commit

Permalink
fix console size, upscale button
Browse files Browse the repository at this point in the history
  • Loading branch information
the-database committed May 26, 2024
1 parent 76e9d65 commit 3aa6eef
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
7 changes: 5 additions & 2 deletions AnimeJaNaiConverterGui/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -814,8 +814,11 @@ public bool Valid
set
{
this.RaiseAndSetIfChanged(ref _valid, value);
this.RaisePropertyChanged(nameof(Vm.UpscaleEnabled));
this.RaisePropertyChanged(nameof(Vm.LeftStatus));
if (Vm != null)
{
Vm.RaisePropertyChanged(nameof(Vm.UpscaleEnabled));
Vm.RaisePropertyChanged(nameof(Vm.LeftStatus));
}
}
}

Expand Down
13 changes: 10 additions & 3 deletions AnimeJaNaiConverterGui/Views/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<!-- Main Form -->
<DockPanel Grid.Column="1" IsVisible="{Binding ShowMainForm}">
<!--Bottom Status Panel -->
<StackPanel DockPanel.Dock="Bottom" IsVisible="{Binding !IsExtractingBackend}">
<StackPanel DockPanel.Dock="Bottom">

<StackPanel Orientation="Horizontal">
<Button Margin="20,10,0,10" FontWeight="Bold" Background="Green" IsEnabled="{Binding UpscaleEnabled}" Command="{Binding RunUpscale}">
Expand All @@ -118,8 +118,15 @@
</StackPanel>

<StackPanel IsVisible="{Binding ShowConsole}" >
<TextBlock Margin="20,10,0,0" FontWeight="Bold" Text="Console"></TextBlock>
<ScrollViewer x:Name="ConsoleScrollViewer" Margin="0,10,0,0" Background="#111111" Height="500" Width="500" HorizontalScrollBarVisibility="Auto" Foreground="Gray" PropertyChanged="ConsoleScrollViewer_PropertyChanged">
<DockPanel>
<TextBlock DockPanel.Dock="Left" Margin="20,10,0,0" FontWeight="Bold" Text="Console"></TextBlock>
<ToggleButton DockPanel.Dock="Right" Margin="0,0,20,0" IsChecked="{Binding !ShowConsole}">
<materialIcons:MaterialIcon Kind="Close" />
</ToggleButton>
<Rectangle/>
</DockPanel>

<ScrollViewer x:Name="ConsoleScrollViewer" Margin="0,10,0,0" Background="#111111" Height="450" HorizontalAlignment="Stretch" HorizontalScrollBarVisibility="Auto" Foreground="Gray" PropertyChanged="ConsoleScrollViewer_PropertyChanged">
<SelectableTextBlock x:Name="ConsoleTextBlock" Margin="20" Text="{Binding ConsoleText}" FontFamily="Consolas" PropertyChanged="ConsoleTextBlock_PropertyChanged" />
</ScrollViewer>
</StackPanel>
Expand Down
2 changes: 1 addition & 1 deletion AnimeJaNaiConverterGui/Views/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private void MainWindow_Resized(object? sender, WindowResizedEventArgs e)
var consoleScrollViewer = this.FindControl<ScrollViewer>("ConsoleScrollViewer");
if (consoleScrollViewer != null)
{
consoleScrollViewer.Width = Width - 40; // Adjust the width as needed
consoleScrollViewer.Width = Width - 340; // Adjust the width as needed
}

}
Expand Down

0 comments on commit 3aa6eef

Please sign in to comment.