Skip to content

Commit 7719336

Browse files
committed
reverse logs in ui
1 parent b9f21d2 commit 7719336

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

AvaGui/Models/ObjectEditorModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public ObjectEditorModel()
5555
{
5656
Logger = new Logger();
5757
LoggerObservableLogs = [];
58-
Logger.LogAdded += (sender, laea) => LoggerObservableLogs.Add(laea.Log);
58+
Logger.LogAdded += (sender, laea) => LoggerObservableLogs.Insert(0, laea.Log);
5959

6060
LoadSettings(SettingsFile, Logger);
6161
}

AvaGui/Views/MainWindow.axaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@
245245
</Menu>
246246
<ToggleSwitch IsChecked="{Binding IsDarkTheme, Mode=TwoWay}" HorizontalAlignment="Right" OnContent="{materialIcons:MaterialIconExt Kind=MoonWaningCrescent}" OffContent="{materialIcons:MaterialIconExt Kind=WeatherSunny}" />
247247
</DockPanel>
248-
<Expander Header="Logs" Padding="0" ExpandDirection="Down" DockPanel.Dock="Bottom" HorizontalAlignment="Stretch" Margin="8">
248+
<Expander Header="Logs" Padding="0" ExpandDirection="Down" DockPanel.Dock="Bottom" HorizontalAlignment="Stretch" Margin="8" MaxHeight="512">
249249
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
250-
<DataGrid MinHeight="256" MaxHeight="1024" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ItemsSource="{Binding Logs}" AutoGenerateColumns="True" CanUserReorderColumns="True" CanUserResizeColumns="True" CanUserSortColumns="False" />
250+
<DataGrid MinHeight="256" MaxHeight="1024" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ItemsSource="{Binding Logs}" AutoGenerateColumns="True" CanUserReorderColumns="True" CanUserResizeColumns="True" CanUserSortColumns="False"/>
251251
</ScrollViewer>
252252
</Expander>
253253
<Grid DataContext="{Binding FolderTreeViewModel}" DockPanel.Dock="Left" Margin="8" MinWidth="256" MaxWidth="512">

0 commit comments

Comments
 (0)