- 좌측 사이드바와 본문 사이 경계선에 GridSplitter 추가 - 사이드바가 열려 있을 때만 드래그 가능하도록 splitter 표시 상태 연동 - 사용자가 조절한 폭을 저장해 사이드바를 닫았다 다시 열어도 마지막 너비 유지 - 열기/닫기 애니메이션이 현재 폭과 저장 폭을 함께 사용하도록 정리 - README 및 DEVELOPMENT 문서에 2026-04-05 23:15 (KST) 기준 변경 이력 반영 검증: - dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\verify\ -p:IntermediateOutputPath=obj\verify\ - 경고 0 / 오류 0 확인
This commit is contained in:
@@ -837,6 +837,20 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<GridSplitter x:Name="SidebarResizeSplitter"
|
||||
Grid.Column="1"
|
||||
Width="8"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="Transparent"
|
||||
ResizeDirection="Columns"
|
||||
ResizeBehavior="PreviousAndNext"
|
||||
ShowsPreview="False"
|
||||
Cursor="SizeWE"
|
||||
Visibility="Visible"
|
||||
DragCompleted="SidebarResizeSplitter_DragCompleted"
|
||||
Panel.ZIndex="40"/>
|
||||
|
||||
<!-- ══════════════════════════════════════════════════════ -->
|
||||
<!-- 우측: 메시지 영역 -->
|
||||
<!-- ══════════════════════════════════════════════════════ -->
|
||||
|
||||
@@ -34,6 +34,7 @@ public partial class ChatWindow : Window
|
||||
private CancellationTokenSource? _streamCts;
|
||||
private bool _isStreaming;
|
||||
private bool _sidebarVisible = true;
|
||||
private double _sidebarExpandedWidth = 262;
|
||||
private string _selectedCategory = ""; // "" = 전체
|
||||
private readonly Dictionary<string, string> _tabSelectedCategory = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
@@ -2854,25 +2855,33 @@ public partial class ChatWindow : Window
|
||||
IconBarColumn.Width = new GridLength(0);
|
||||
IconBarPanel.Visibility = Visibility.Collapsed;
|
||||
SidebarPanel.Visibility = Visibility.Visible;
|
||||
SidebarResizeSplitter.Visibility = Visibility.Visible;
|
||||
|
||||
var targetWidth = Math.Max(190, _sidebarExpandedWidth);
|
||||
|
||||
if (animated)
|
||||
{
|
||||
AnimateSidebar(0, 220, () => SidebarColumn.MinWidth = 168);
|
||||
AnimateSidebar(0, targetWidth, () => SidebarColumn.MinWidth = 168);
|
||||
}
|
||||
else
|
||||
{
|
||||
SidebarColumn.MinWidth = 168;
|
||||
SidebarColumn.Width = new GridLength(220);
|
||||
SidebarColumn.MinWidth = 168;
|
||||
SidebarColumn.Width = new GridLength(targetWidth);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var currentWidth = SidebarColumn.ActualWidth > 0 ? SidebarColumn.ActualWidth : SidebarColumn.Width.Value;
|
||||
if (currentWidth > 0)
|
||||
_sidebarExpandedWidth = Math.Max(190, currentWidth);
|
||||
|
||||
SidebarColumn.MinWidth = 0;
|
||||
if (animated)
|
||||
{
|
||||
AnimateSidebar(248, 0, () =>
|
||||
AnimateSidebar(currentWidth > 0 ? currentWidth : _sidebarExpandedWidth, 0, () =>
|
||||
{
|
||||
SidebarPanel.Visibility = Visibility.Collapsed;
|
||||
SidebarResizeSplitter.Visibility = Visibility.Collapsed;
|
||||
IconBarColumn.Width = new GridLength(52);
|
||||
IconBarPanel.Visibility = Visibility.Visible;
|
||||
});
|
||||
@@ -2881,11 +2890,22 @@ public partial class ChatWindow : Window
|
||||
{
|
||||
SidebarColumn.Width = new GridLength(0);
|
||||
SidebarPanel.Visibility = Visibility.Collapsed;
|
||||
SidebarResizeSplitter.Visibility = Visibility.Collapsed;
|
||||
IconBarColumn.Width = new GridLength(52);
|
||||
IconBarPanel.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
private void SidebarResizeSplitter_DragCompleted(object sender, DragCompletedEventArgs e)
|
||||
{
|
||||
if (!_sidebarVisible)
|
||||
return;
|
||||
|
||||
var currentWidth = SidebarColumn.ActualWidth > 0 ? SidebarColumn.ActualWidth : SidebarColumn.Width.Value;
|
||||
_sidebarExpandedWidth = Math.Clamp(currentWidth, 190, 420);
|
||||
SidebarColumn.Width = new GridLength(_sidebarExpandedWidth);
|
||||
}
|
||||
|
||||
private void AnimateSidebar(double from, double to, Action? onComplete = null)
|
||||
{
|
||||
var duration = 200.0;
|
||||
|
||||
Reference in New Issue
Block a user