쿼리 편집기 — 치수 원복, 툴바 '포맷' 강조
■ 치수 원복
앞서 목업과 나란히 놓고 전체를 키웠는데(a4acfe4), 요청은 크기가 아니라 스타일이었다.
창 1440×960 → 1180×760 을 비롯해 글자·여백·행 높이를 모두 되돌린다.
직전 커밋의 스타일 수정(줄번호 홈통 회색 면 · 구분선 직선화 · 결과 표 가로선)은 유지한다.
■ 툴바 '포맷' 강조
목업에서 '포맷'만 파란 글자 + 밑줄로 그려져 있다. 셋 다 동작이라 '선택된 탭'은 아니지만
문서를 통째로 바꾸는 주 동작이라 그 자리를 늘 표시해 둔다(ToolBtnPrimary).
회귀: 테스트 230/230, 편집 스모크 실패 0, 팝업·정렬·결과표·단축키 점검 16/16.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
069d228de3
commit
c98e2413b5
@@ -2,7 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ctl="clr-namespace:SheetMe.Designer.Controls"
|
||||
Title="쿼리 편집" Width="1440" Height="960" MinWidth="1060" MinHeight="640"
|
||||
Title="쿼리 편집" Width="1180" Height="760" MinWidth="880" MinHeight="520"
|
||||
WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
Style="{StaticResource ThemedWindow}">
|
||||
<Window.Resources>
|
||||
@@ -11,23 +11,23 @@
|
||||
|
||||
<!-- 카드: 두 영역을 눈으로 갈라 준다 -->
|
||||
<Style x:Key="Card" TargetType="Border">
|
||||
<Setter Property="CornerRadius" Value="14"/>
|
||||
<Setter Property="CornerRadius" Value="10"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource B.InputBorder}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource B.Surface}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CardTitle" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="16"/>
|
||||
<Setter Property="FontSize" Value="13.5"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource B.Ink}"/>
|
||||
</Style>
|
||||
|
||||
<!-- 편집기 툴바 — 탭처럼 밑줄이 들어오는 글자 버튼 -->
|
||||
<Style x:Key="ToolBtn" TargetType="Button">
|
||||
<Setter Property="Padding" Value="4,8"/>
|
||||
<Setter Property="Margin" Value="0,0,32,0"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="Padding" Value="4,6"/>
|
||||
<Setter Property="Margin" Value="0,0,18,0"/>
|
||||
<Setter Property="FontSize" Value="12.5"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource B.Ink}"/>
|
||||
<Setter Property="Template">
|
||||
@@ -53,6 +53,23 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- 툴바의 주 동작 — 파란 글자 + 늘 그려진 밑줄 -->
|
||||
<Style x:Key="ToolBtnPrimary" TargetType="Button" BasedOn="{StaticResource ToolBtn}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource B.AccentText}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Grid Background="Transparent">
|
||||
<ContentPresenter Margin="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<Border Height="2" VerticalAlignment="Bottom" CornerRadius="1"
|
||||
Background="{DynamicResource B.Accent}"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- 오른쪽 끝의 글자 링크(전체 지우기·닫기) -->
|
||||
<Style x:Key="LinkBtn" TargetType="Button" BasedOn="{StaticResource ToolBtn}">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
@@ -67,9 +84,9 @@
|
||||
<!-- 목업의 표: 바깥 테두리는 감싸는 상자가 이미 그리므로 표 자체는 그리지 않는다.
|
||||
줄은 가로만 — 세로선까지 그으면 컬럼이 52개인 조회에서 화면이 격자로 가득 찬다. -->
|
||||
<Setter Property="GridLinesVisibility" Value="Horizontal"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
<Setter Property="RowHeight" Value="38"/>
|
||||
<Setter Property="ColumnHeaderHeight" Value="38"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="RowHeight" Value="30"/>
|
||||
<Setter Property="ColumnHeaderHeight" Value="30"/>
|
||||
<Setter Property="Background" Value="{DynamicResource B.Surface}"/>
|
||||
<Setter Property="RowBackground" Value="{DynamicResource B.Surface}"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
@@ -80,8 +97,8 @@
|
||||
<Setter Property="Background" Value="{DynamicResource B.Chip}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource B.Ink}"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="FontSize" Value="12.5"/>
|
||||
<Setter Property="Padding" Value="12,0"/>
|
||||
<Setter Property="FontSize" Value="11.5"/>
|
||||
<Setter Property="Padding" Value="10,0"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource B.Line2}"/>
|
||||
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
@@ -104,9 +121,9 @@
|
||||
|
||||
<!-- 갈래 칩 -->
|
||||
<Style x:Key="BucketChip" TargetType="ToggleButton">
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
<Setter Property="Padding" Value="14,6"/>
|
||||
<Setter Property="Margin" Value="0,0,8,0"/>
|
||||
<Setter Property="FontSize" Value="11.5"/>
|
||||
<Setter Property="Padding" Value="10,3"/>
|
||||
<Setter Property="Margin" Value="0,0,6,0"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource B.Ink}"/>
|
||||
<Setter Property="Template">
|
||||
@@ -140,16 +157,16 @@
|
||||
<KeyBinding Key="F5" Command="{Binding TrialCommand}"/>
|
||||
</Window.InputBindings>
|
||||
|
||||
<DockPanel Margin="26,20,26,22">
|
||||
<DockPanel Margin="16,14,16,14">
|
||||
<!-- ── 머리말 ── -->
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,0,0,18">
|
||||
<TextBlock x:Name="TitleTextBlock" Text="쿼리 편집" FontSize="25" FontWeight="Bold"
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,0,0,12">
|
||||
<TextBlock x:Name="TitleTextBlock" Text="쿼리 편집" FontSize="17" FontWeight="Bold"
|
||||
Foreground="{DynamicResource B.Ink}" VerticalAlignment="Center"/>
|
||||
<Border x:Name="TargetChip" CornerRadius="8" Padding="11,4" Margin="14,2,0,0"
|
||||
<Border x:Name="TargetChip" CornerRadius="6" Padding="8,2" Margin="10,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Background="{DynamicResource B.Input}" BorderBrush="{DynamicResource B.InputBorder}"
|
||||
BorderThickness="1">
|
||||
<TextBlock x:Name="TargetChipText" FontSize="13" FontFamily="D2Coding, 굴림체, Consolas"
|
||||
<TextBlock x:Name="TargetChipText" FontSize="11.5" FontFamily="D2Coding, 굴림체, Consolas"
|
||||
Foreground="{DynamicResource B.AccentText}"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
@@ -157,16 +174,16 @@
|
||||
<!-- ── 아래 버튼 줄 ── -->
|
||||
<DockPanel DockPanel.Dock="Bottom" Margin="0,14,0,0">
|
||||
<StackPanel DockPanel.Dock="Left" Orientation="Horizontal">
|
||||
<Button x:Name="TrialButton" Padding="22,11" Click="OnTrial"
|
||||
<Button x:Name="TrialButton" Padding="16,8" Click="OnTrial"
|
||||
ToolTip="DB 에서 실제로 돌려 봅니다 (Ctrl+Enter 또는 F5). 조회만 실행되며 표본 몇 행만 가져옵니다.">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="▶" FontSize="10" VerticalAlignment="Center" Margin="0,0,7,0"/>
|
||||
<TextBlock Text="검증 실행" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Content="확인" Padding="36,11" Margin="10,0,0,0"
|
||||
<Button Content="확인" Padding="30,8" Margin="10,0,0,0"
|
||||
Style="{StaticResource Primary}" Click="OnConfirm" IsDefault="True"/>
|
||||
<Button Content="취소" Padding="32,11" Margin="10,0,0,0" IsCancel="True"/>
|
||||
<Button Content="취소" Padding="26,8" Margin="10,0,0,0" IsCancel="True"/>
|
||||
</StackPanel>
|
||||
<TextBlock x:Name="ProblemText" VerticalAlignment="Center" Margin="16,0,0,0"
|
||||
Foreground="{DynamicResource B.Danger}" FontSize="11.5"
|
||||
@@ -176,22 +193,25 @@
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition x:Name="SplitterColumn" Width="18"/>
|
||||
<ColumnDefinition x:Name="VariableColumn" Width="500"/>
|
||||
<ColumnDefinition x:Name="SplitterColumn" Width="12"/>
|
||||
<ColumnDefinition x:Name="VariableColumn" Width="430"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- ══ SQL 편집기 카드 ══ -->
|
||||
<Border Grid.Column="0" Style="{StaticResource Card}">
|
||||
<DockPanel Margin="22,18,22,18">
|
||||
<DockPanel Margin="14,12,14,12">
|
||||
<TextBlock DockPanel.Dock="Top" Text="SQL 편집기" Style="{StaticResource CardTitle}"
|
||||
Margin="0,0,0,14"/>
|
||||
Margin="0,0,0,10"/>
|
||||
|
||||
<!-- 툴바 -->
|
||||
<DockPanel DockPanel.Dock="Top" Margin="0,0,0,10">
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource LinkBtn}" Click="OnClearAll"
|
||||
Content="전체 지우기" ToolTip="편집 내용을 모두 지웁니다"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Style="{StaticResource ToolBtn}" Content="포맷" Click="OnFormat"
|
||||
<!-- 목업에서 '포맷'만 파란 글자 + 밑줄로 강조돼 있다.
|
||||
셋 다 동작이라 '선택된 탭'은 아니지만, 문서를 통째로 바꾸는 주 동작이라
|
||||
그 자리를 늘 표시해 둔다. -->
|
||||
<Button Style="{StaticResource ToolBtnPrimary}" Content="포맷" Click="OnFormat"
|
||||
ToolTip="예약어를 대문자로 바꾸고 절마다 줄을 나눕니다. 문자열·치환 변수는 건드리지 않습니다."/>
|
||||
<Button Style="{StaticResource ToolBtn}" Content="주석" Click="OnToggleComment"
|
||||
ToolTip="선택한 줄에 -- 를 붙이거나 뗍니다 (Ctrl+/)"/>
|
||||
@@ -252,9 +272,9 @@
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- 줄 번호 홈통 — 회색 면 + 곧은 세로 구분선 -->
|
||||
<Border Grid.Column="0" Background="{DynamicResource B.Chip}" Padding="16,14,12,14"
|
||||
<Border Grid.Column="0" Background="{DynamicResource B.Chip}" Padding="12,10,10,10"
|
||||
BorderThickness="0,0,1,0" BorderBrush="{DynamicResource B.Line2}">
|
||||
<TextBlock x:Name="LineNumbers" FontFamily="D2Coding, 굴림체, Consolas" FontSize="14.5"
|
||||
<TextBlock x:Name="LineNumbers" FontFamily="D2Coding, 굴림체, Consolas" FontSize="13.5"
|
||||
Foreground="{DynamicResource B.Muted}" TextAlignment="Right" MinWidth="20"/>
|
||||
</Border>
|
||||
<Grid Grid.Column="1">
|
||||
@@ -283,9 +303,9 @@
|
||||
</Border>
|
||||
</Popup>
|
||||
<TextBox x:Name="SqlBox"
|
||||
FontFamily="D2Coding, 굴림체, Consolas" FontSize="14.5"
|
||||
FontFamily="D2Coding, 굴림체, Consolas" FontSize="13.5"
|
||||
AcceptsReturn="True" AcceptsTab="False"
|
||||
TextWrapping="NoWrap" Padding="14,14"
|
||||
TextWrapping="NoWrap" Padding="12,10"
|
||||
Background="Transparent" BorderThickness="0"
|
||||
Foreground="Transparent"
|
||||
CaretBrush="{DynamicResource B.Ink}"
|
||||
@@ -304,21 +324,21 @@
|
||||
|
||||
<!-- ══ 치환 변수 카드 ══ -->
|
||||
<Border x:Name="VariablePane" Grid.Column="2" Style="{StaticResource Card}">
|
||||
<DockPanel Margin="22,18,22,18">
|
||||
<DockPanel Margin="14,12,14,12">
|
||||
<TextBlock DockPanel.Dock="Top" Text="치환 변수" Style="{StaticResource CardTitle}"
|
||||
Margin="0,0,0,14"/>
|
||||
Margin="0,0,0,10"/>
|
||||
|
||||
<!-- 검색: 돋보기를 겹쳐 둔다 — 빈 상자만 있으면 무엇을 하는 칸인지 안 읽힌다 -->
|
||||
<Grid DockPanel.Dock="Top" Margin="0,0,0,8">
|
||||
<TextBox x:Name="VariableSearch" Padding="36,9,10,9"
|
||||
<TextBox x:Name="VariableSearch" Padding="28,4,8,4"
|
||||
VerticalContentAlignment="Center" TextChanged="OnVariableSearchChanged"
|
||||
AutomationProperties.Name="치환 변수 검색"
|
||||
ToolTip="변수명·설명·초성으로 찾습니다 (예: ㅊㅌㅂㅎ → 차트번호)"/>
|
||||
<TextBlock Text="🔍" FontSize="13" Margin="13,0,0,0" IsHitTestVisible="False"
|
||||
<TextBlock Text="🔍" FontSize="11" Margin="9,0,0,0" IsHitTestVisible="False"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource B.Muted}"/>
|
||||
<TextBlock x:Name="SearchPlaceholder" Text="변수명 또는 설명 검색" FontSize="13"
|
||||
Margin="38,0,0,0" IsHitTestVisible="False"
|
||||
<TextBlock x:Name="SearchPlaceholder" Text="변수명 또는 설명 검색" FontSize="11.5"
|
||||
Margin="30,0,0,0" IsHitTestVisible="False"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource B.Muted}"/>
|
||||
</Grid>
|
||||
@@ -344,7 +364,7 @@
|
||||
|
||||
<!-- 안내 -->
|
||||
|
||||
<ListBox x:Name="VariableList" FontSize="13" MouseDoubleClick="OnInsertVariable"
|
||||
<ListBox x:Name="VariableList" FontSize="11.5" MouseDoubleClick="OnInsertVariable"
|
||||
KeyDown="OnVariableListKeyDown"
|
||||
BorderThickness="0" Background="Transparent"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
@@ -352,21 +372,21 @@
|
||||
AutomationProperties.Name="치환 변수 목록">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<DockPanel Margin="0,6" ToolTip="{Binding Token}">
|
||||
<DockPanel Margin="0,3" ToolTip="{Binding Token}">
|
||||
<!-- ⊕ 로 바로 삽입 — 더블클릭을 모르는 사람도 넣을 수 있어야 한다 -->
|
||||
<Button DockPanel.Dock="Right" Width="26" Height="26" Padding="0"
|
||||
<Button DockPanel.Dock="Right" Width="22" Height="22" Padding="0"
|
||||
Margin="8,0,0,0" Style="{StaticResource ToolBtn}"
|
||||
Content="+" FontSize="17"
|
||||
Content="+" FontSize="13"
|
||||
Foreground="{DynamicResource B.AccentText}"
|
||||
Command="{Binding DataContext.InsertCommand,
|
||||
RelativeSource={RelativeSource AncestorType=ListBox}}"
|
||||
CommandParameter="{Binding}"
|
||||
ToolTip="커서 위치에 삽입"/>
|
||||
<TextBlock DockPanel.Dock="Right" Text="{Binding ShortForm}"
|
||||
Foreground="{DynamicResource B.Muted}" FontSize="12"
|
||||
Foreground="{DynamicResource B.Muted}" FontSize="10.5"
|
||||
FontFamily="D2Coding, 굴림체, Consolas"
|
||||
VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||||
<TextBlock Text="{Binding Description}" FontFamily="Segoe UI, 맑은 고딕" FontSize="14"
|
||||
<TextBlock Text="{Binding Description}" FontFamily="Segoe UI, 맑은 고딕" FontSize="12"
|
||||
TextTrimming="CharacterEllipsis" VerticalAlignment="Center"/>
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
@@ -386,11 +406,11 @@
|
||||
<Border DockPanel.Dock="Right" CornerRadius="9" Padding="6,1"
|
||||
VerticalAlignment="Center" Margin="6,0,0,0"
|
||||
Background="{DynamicResource B.Input}">
|
||||
<TextBlock Text="{Binding ItemCount}" FontSize="12"
|
||||
<TextBlock Text="{Binding ItemCount}" FontSize="10"
|
||||
Foreground="{DynamicResource B.Muted}"/>
|
||||
</Border>
|
||||
<TextBlock Text="{Binding Name}" FontWeight="SemiBold"
|
||||
FontFamily="Segoe UI, 맑은 고딕" FontSize="14"/>
|
||||
FontFamily="Segoe UI, 맑은 고딕" FontSize="12"/>
|
||||
</DockPanel>
|
||||
</Expander.Header>
|
||||
<ItemsPresenter Margin="8,2,0,6"/>
|
||||
|
||||
Reference in New Issue
Block a user