Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/ScriptRunner/ScriptRunner.GUI/Views/RunningJobsSection.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>

<TextBox Text="{Binding ExecutedCommand}" Background="#474747" CornerRadius="0" BorderBrush="#6e6e6e" Padding="5" Margin="10" BorderThickness="1" IsReadOnly="True" TextWrapping="Wrap" VerticalAlignment="Stretch"></TextBox>
<TextBox Height="30"
GotFocus="InputElement_OnGotFocus"
LostFocus="InputElement_OnLostFocus"
Text="{Binding ExecutedCommand}"
Background="#474747"
CornerRadius="0"
BorderBrush="#6e6e6e"
Padding="5" Margin="0, 5,5, 10" BorderThickness="1" IsReadOnly="True" TextWrapping="Wrap" VerticalAlignment="Stretch"></TextBox>
<Panel Grid.Row="1" IsVisible="{Binding CurrentTroubleshootingMessage, Converter={x:Static ObjectConverters.IsNotNull}}" Background="{Binding CurrentTroubleShootingSeverity, Converter={x:Static viewModels:TroubleShootingSeverityToBrushConverter.Instance}}" Opacity="0.5" ZIndex="10"></Panel>
<ScrollViewer Grid.Row="1" IsVisible="{Binding CurrentTroubleshootingMessage, Converter={x:Static ObjectConverters.IsNotNull}}" ZIndex="11">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
Expand All @@ -44,7 +51,7 @@
</StackPanel>
</ScrollViewer>
<ScrollViewer Grid.Row="1" ScrollChanged="ScrollChangedHandler" BringIntoViewOnFocusChange="False" Margin="0,0,0,10">
<SelectableTextBlock TextWrapping="Wrap" Classes="consoleOutput" Inlines="{Binding RichOutput}" ></SelectableTextBlock>
<SelectableTextBlock TextWrapping="Wrap" Margin="0" Classes="consoleOutput" Inlines="{Binding RichOutput}" ></SelectableTextBlock>
</ScrollViewer>
<StackPanel Grid.Row="2" IsVisible="{Binding ExecutionPending, Mode=OneWay}" Margin="0, 0, 0,10">
<ItemsRepeater ItemsSource="{Binding CurrentInteractiveInputs}">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Avalonia;
using System;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using ScriptRunner.GUI.ViewModels;

Expand Down Expand Up @@ -36,4 +38,20 @@ public void AcceptCommand(object? sender, KeyEventArgs e)
}
}
}

private void InputElement_OnGotFocus(object? sender, GotFocusEventArgs e)
{
if (sender is TextBox textBox)
{
textBox.Height = Double.NaN;
}
}

private void InputElement_OnLostFocus(object? sender, RoutedEventArgs e)
{
if (sender is TextBox textBox)
{
textBox.Height = 30;
}
}
}
Loading