AX Agent surface visual language 공통화 및 preview/file browser 정리
Some checks failed
Release Gate / gate (push) Has been cancelled

- ChatWindow에 공통 popup container/menu item/separator/file tree header helper를 추가
- Preview와 FileBrowser presentation이 같은 surface 스타일을 사용하도록 정리
- README와 DEVELOPMENT 문서에 2026-04-06 11:20 (KST) 기준 visual polish 1차 반영
- dotnet build 검증 경고 0, 오류 0 확인
This commit is contained in:
2026-04-06 12:09:18 +09:00
parent 9aa99cdfe6
commit 3c3faab528
5 changed files with 139 additions and 149 deletions

View File

@@ -94,7 +94,7 @@ public partial class ChatWindow
count++;
var dirItem = new TreeViewItem
{
Header = CreateFileTreeHeader("\uED25", subDir.Name, null),
Header = CreateSurfaceFileTreeHeader("\uED25", subDir.Name, null),
Tag = subDir.FullName,
IsExpanded = depth < 1,
};
@@ -140,7 +140,7 @@ public partial class ChatWindow
var fileItem = new TreeViewItem
{
Header = CreateFileTreeHeader(icon, file.Name, size),
Header = CreateSurfaceFileTreeHeader(icon, file.Name, size),
Tag = file.FullName,
};
@@ -167,38 +167,6 @@ public partial class ChatWindow
}
}
private static StackPanel CreateFileTreeHeader(string icon, string name, string? sizeText)
{
var sp = new StackPanel { Orientation = Orientation.Horizontal };
sp.Children.Add(new TextBlock
{
Text = icon,
FontFamily = new FontFamily("Segoe MDL2 Assets"),
FontSize = 11,
Foreground = new SolidColorBrush(Color.FromRgb(0x9C, 0xA3, 0xAF)),
VerticalAlignment = VerticalAlignment.Center,
Margin = new Thickness(0, 0, 5, 0),
});
sp.Children.Add(new TextBlock
{
Text = name,
FontSize = 11.5,
VerticalAlignment = VerticalAlignment.Center,
});
if (sizeText != null)
{
sp.Children.Add(new TextBlock
{
Text = $" {sizeText}",
FontSize = 10,
Foreground = new SolidColorBrush(Color.FromRgb(0x6B, 0x72, 0x80)),
VerticalAlignment = VerticalAlignment.Center,
});
}
return sp;
}
private static string GetFileIcon(string ext) => ext switch
{
".html" or ".htm" => "\uEB41",
@@ -224,11 +192,8 @@ public partial class ChatWindow
private void ShowFileTreeContextMenu(string filePath)
{
var bg = TryFindResource("LauncherBackground") as Brush ?? new SolidColorBrush(Color.FromRgb(0x1E, 0x1E, 0x2E));
var borderBrush = TryFindResource("BorderColor") as Brush ?? Brushes.Gray;
var primaryText = TryFindResource("PrimaryText") as Brush ?? Brushes.White;
var secondaryText = TryFindResource("SecondaryText") as Brush ?? Brushes.Gray;
var hoverBg = TryFindResource("HintBackground") as Brush ?? new SolidColorBrush(Color.FromArgb(0x18, 0xFF, 0xFF, 0xFF));
var dangerBrush = new SolidColorBrush(Color.FromRgb(0xE7, 0x4C, 0x3C));
var popup = new Popup
@@ -239,73 +204,22 @@ public partial class ChatWindow
Placement = PlacementMode.MousePoint,
};
var panel = new StackPanel { Margin = new Thickness(2) };
var container = new Border
{
Background = bg,
BorderBrush = borderBrush,
BorderThickness = new Thickness(1),
CornerRadius = new CornerRadius(10),
Padding = new Thickness(6),
MinWidth = 200,
Effect = new System.Windows.Media.Effects.DropShadowEffect
{
BlurRadius = 16,
ShadowDepth = 4,
Opacity = 0.3,
Color = Colors.Black,
Direction = 270,
},
Child = panel,
};
var container = CreateSurfacePopupContainer(panel, 200, new Thickness(6));
popup.Child = container;
void AddItem(string icon, string label, Action action, Brush? labelColor = null, Brush? iconColor = null)
{
var sp = new StackPanel { Orientation = Orientation.Horizontal };
sp.Children.Add(new TextBlock
{
Text = icon,
FontFamily = new FontFamily("Segoe MDL2 Assets"),
FontSize = 13,
Foreground = iconColor ?? secondaryText,
VerticalAlignment = VerticalAlignment.Center,
Margin = new Thickness(0, 0, 10, 0),
});
sp.Children.Add(new TextBlock
{
Text = label,
FontSize = 12.5,
Foreground = labelColor ?? primaryText,
VerticalAlignment = VerticalAlignment.Center,
});
var item = new Border
{
Child = sp,
Background = Brushes.Transparent,
CornerRadius = new CornerRadius(7),
Cursor = Cursors.Hand,
Padding = new Thickness(10, 8, 14, 8),
Margin = new Thickness(0, 1, 0, 1),
};
item.MouseEnter += (s, _) => { if (s is Border b) b.Background = hoverBg; };
item.MouseLeave += (s, _) => { if (s is Border b) b.Background = Brushes.Transparent; };
item.MouseLeftButtonUp += (_, _) =>
var item = CreateSurfacePopupMenuItem(icon, iconColor ?? secondaryText, label, () =>
{
popup.IsOpen = false;
action();
};
}, labelColor ?? primaryText);
panel.Children.Add(item);
}
void AddSep()
{
panel.Children.Add(new Border
{
Height = 1,
Margin = new Thickness(10, 4, 10, 4),
Background = borderBrush,
Opacity = 0.3,
});
panel.Children.Add(CreateSurfacePopupSeparator());
}
var ext = Path.GetExtension(filePath).ToLowerInvariant();