-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDebugPanelWindow.xaml
More file actions
108 lines (101 loc) · 4.36 KB
/
DebugPanelWindow.xaml
File metadata and controls
108 lines (101 loc) · 4.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<Window x:Class="SteamPersonaSwitcher.DebugPanelWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Debug Log"
Width="350"
MinWidth="470"
MaxWidth="800"
SizeToContent="Height"
WindowStyle="None"
AllowsTransparency="False"
ResizeMode="CanResizeWithGrip"
ShowInTaskbar="False"
Topmost="False"
Background="#1E1E1E"
BorderBrush="#3E3E42"
BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Debug Panel Header -->
<Border Grid.Row="0" Background="#2D2D30" Padding="10,8">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0"
Text="🐛 Debug Log"
Foreground="White"
FontWeight="SemiBold"
VerticalAlignment="Center"/>
<CheckBox Grid.Column="1"
x:Name="WordWrapCheckBox"
Content="Word Wrap"
Foreground="White"
IsChecked="True"
Margin="10,0"
Checked="WordWrapCheckBox_Changed"
Unchecked="WordWrapCheckBox_Changed"
ToolTip="Enable word wrapping for long log messages"/>
<CheckBox Grid.Column="2"
x:Name="AutoScrollCheckBox"
Content="Auto-scroll"
Foreground="White"
IsChecked="True"
Margin="10,0"
ToolTip="Automatically scroll to newest messages"/>
<Button Grid.Column="3"
Content="📋 Copy"
Click="CopyDebugLog_Click"
Width="70"
Margin="5,0"
Padding="5,2"
ToolTip="Copy all logs to clipboard"/>
<Button Grid.Column="4"
Content="🗑️ Clear"
Click="ClearDebugLog_Click"
Width="70"
Margin="5,0,0,0"
Padding="5,2"
ToolTip="Clear debug log"/>
</Grid>
</Border>
<!-- Debug Log Content -->
<ScrollViewer Grid.Row="1"
x:Name="DebugScrollViewer"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled"
Background="#1E1E1E"
Padding="10">
<ItemsControl x:Name="DebugLogItems" Background="Transparent" HorizontalContentAlignment="Stretch">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Foreground="{Binding Color}"
FontFamily="Consolas, Courier New, monospace"
FontSize="11"
Margin="0,1"
Text="{Binding FullText}"
TextWrapping="Wrap"
HorizontalAlignment="Stretch"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemContainerStyle>
<Style>
<Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
</Style>
</ItemsControl.ItemContainerStyle>
</ItemsControl>
</ScrollViewer>
</Grid>
</Window>