fix: improve contrast and visibility for DataGrid, ColumnHeaders, RowSelection, and ComboBoxes
This commit is contained in:
+122
-4
@@ -31,6 +31,12 @@
|
||||
<FontFamily x:Key="ModernFont">Segoe UI, Apple SD Gothic Neo, Malgun Gothic</FontFamily>
|
||||
<FontFamily x:Key="IconFont">Segoe MDL2 Assets, Segoe Fluent Icons</FontFamily>
|
||||
|
||||
<!-- Global System Brushes Override (WPF DataGrid 기본 선택색 덮어쓰기) -->
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#2563EB" />
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#1E3A8A" />
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="#FFFFFF" />
|
||||
|
||||
<!-- Nav Button Style -->
|
||||
<Style x:Key="NavButtonStyle" TargetType="RadioButton">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
@@ -152,7 +158,7 @@
|
||||
<!-- Modern TextBox Style -->
|
||||
<Style x:Key="ModernTextBoxStyle" TargetType="TextBox">
|
||||
<Setter Property="Background" Value="#0F172A" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}" />
|
||||
<Setter Property="Foreground" Value="#FFFFFF" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource CardBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Padding" Value="10,6" />
|
||||
@@ -194,13 +200,117 @@
|
||||
<Setter Property="Margin" Value="6" />
|
||||
</Style>
|
||||
|
||||
<!-- Modern DataGrid Style -->
|
||||
<!-- ============================================================================== -->
|
||||
<!-- Modern ComboBox & ComboBoxItem Style (선택칸 고대비 가독성 강화) -->
|
||||
<!-- ============================================================================== -->
|
||||
|
||||
<Style TargetType="ComboBoxItem">
|
||||
<Setter Property="Background" Value="#1E293B" />
|
||||
<Setter Property="Foreground" Value="#F8FAFC" />
|
||||
<Setter Property="Padding" Value="10,8" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="FontFamily" Value="{StaticResource ModernFont}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ComboBoxItem">
|
||||
<Border x:Name="itemBorder"
|
||||
Background="{TemplateBinding Background}"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="Left" VerticalAlignment="Center" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="itemBorder" Property="Background" Value="#2563EB" />
|
||||
<Setter Property="Foreground" Value="#FFFFFF" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="itemBorder" Property="Background" Value="#1D4ED8" />
|
||||
<Setter Property="Foreground" Value="#FFFFFF" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="ComboBox">
|
||||
<Setter Property="Background" Value="#0F172A" />
|
||||
<Setter Property="Foreground" Value="#F8FAFC" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource CardBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Padding" Value="8,4" />
|
||||
<Setter Property="FontFamily" Value="{StaticResource ModernFont}" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
</Style>
|
||||
|
||||
<!-- ============================================================================== -->
|
||||
<!-- Modern DataGrid, ColumnHeader, Row, Cell Styles (그리드 선택칸 고대비 가독성 보장) -->
|
||||
<!-- ============================================================================== -->
|
||||
|
||||
<!-- 1. DataGrid Column Header (어두운 배경 + 밝고 선명한 텍스트) -->
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
<Setter Property="Background" Value="#090D16" />
|
||||
<Setter Property="Foreground" Value="#E2E8F0" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="Padding" Value="12,10" />
|
||||
<Setter Property="BorderBrush" Value="#334155" />
|
||||
<Setter Property="BorderThickness" Value="0,0,1,1" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
</Style>
|
||||
|
||||
<!-- 2. DataGrid Cell (선택 시 텍스트 명확화) -->
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="Padding" Value="10,8" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridCell">
|
||||
<Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter VerticalAlignment="Center" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="#2563EB" />
|
||||
<Setter Property="Foreground" Value="#FFFFFF" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!-- 3. DataGrid Row (호버 및 선택 시 진한 파란색 배경 + 순백색 글자 강제) -->
|
||||
<Style TargetType="DataGridRow">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Foreground" Value="#F8FAFC" />
|
||||
<Setter Property="FontFamily" Value="{StaticResource ModernFont}" />
|
||||
<Setter Property="FontSize" Value="12.5" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#1E3A8A" />
|
||||
<Setter Property="Foreground" Value="#FFFFFF" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="#2563EB" />
|
||||
<Setter Property="Foreground" Value="#FFFFFF" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!-- 4. Global Modern DataGrid Style -->
|
||||
<Style x:Key="ModernDataGridStyle" TargetType="DataGrid">
|
||||
<Setter Property="Background" Value="{StaticResource CardBgBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource CardBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}" />
|
||||
<Setter Property="RowBackground" Value="Transparent" />
|
||||
<Setter Property="Foreground" Value="#F8FAFC" />
|
||||
<Setter Property="RowBackground" Value="#1E293B" />
|
||||
<Setter Property="AlternatingRowBackground" Value="#162032" />
|
||||
<Setter Property="GridLinesVisibility" Value="Horizontal" />
|
||||
<Setter Property="HorizontalGridLinesBrush" Value="#2D3748" />
|
||||
@@ -214,4 +324,12 @@
|
||||
<Setter Property="FontSize" Value="12.5" />
|
||||
</Style>
|
||||
|
||||
<!-- CheckBox Style for DataGrid Selection -->
|
||||
<Style TargetType="CheckBox">
|
||||
<Setter Property="Foreground" Value="#F8FAFC" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
+35
-35
@@ -1,35 +1,35 @@
|
||||
{
|
||||
"Application": {
|
||||
"LiveMode": false,
|
||||
"Theme": "Dark",
|
||||
"AutoRefreshSeconds": 60
|
||||
},
|
||||
"ActiveDirectory": {
|
||||
"UseLive": false,
|
||||
"DomainController": "dc01.corp.local",
|
||||
"Domain": "corp.local",
|
||||
"BaseOU": "DC=corp,DC=local",
|
||||
"UseLdaps": false,
|
||||
"Username": "",
|
||||
"Password": ""
|
||||
},
|
||||
"NetApp": {
|
||||
"UseLive": false,
|
||||
"ClusterEndpoint": "https://10.200.10.50",
|
||||
"Port": 443,
|
||||
"DefaultSvm": "svm_cifs_prod01",
|
||||
"Username": "admin",
|
||||
"Password": "",
|
||||
"IgnoreSslErrors": true
|
||||
},
|
||||
"MsSql": {
|
||||
"UseLive": false,
|
||||
"Server": "localhost",
|
||||
"AuthType": "Integrated",
|
||||
"Username": "sa",
|
||||
"Password": "",
|
||||
"DefaultDatabase": "master",
|
||||
"ConnectionTimeout": 10,
|
||||
"BackupDirectory": "C:\\Backups"
|
||||
}
|
||||
}
|
||||
{
|
||||
"ActiveDirectory": {
|
||||
"UseLive": true,
|
||||
"DomainController": "dc01.corp.local",
|
||||
"Domain": "corp.local",
|
||||
"UseLdaps": false,
|
||||
"BaseOU": "DC=corp,DC=local",
|
||||
"Username": "",
|
||||
"Password": ""
|
||||
},
|
||||
"NetApp": {
|
||||
"UseLive": true,
|
||||
"Password": "",
|
||||
"IgnoreSslErrors": true,
|
||||
"ClusterEndpoint": "https://10.200.10.50",
|
||||
"DefaultSvm": "svm_cifs_prod01",
|
||||
"Port": 443,
|
||||
"Username": "admin"
|
||||
},
|
||||
"MsSql": {
|
||||
"AuthType": "Integrated",
|
||||
"Username": "sa",
|
||||
"BackupDirectory": "C:\\Backups",
|
||||
"DefaultDatabase": "master",
|
||||
"Password": "",
|
||||
"ConnectionTimeout": 10,
|
||||
"UseLive": true,
|
||||
"Server": "localhost"
|
||||
},
|
||||
"Application": {
|
||||
"LiveMode": true,
|
||||
"AutoRefreshSeconds": 60,
|
||||
"Theme": "Dark"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user