Skip to content

Commit

Permalink
row selection style #1
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandUI committed Nov 13, 2023
1 parent 0cfdaa1 commit 252b914
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
21 changes: 7 additions & 14 deletions WalletWasabi.Fluent/Controls/TreeDataGrid.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<Setter Property="Template">
<ControlTemplate>
<Border Name="PART_SelectionIndicator"
BorderThickness="0"
BorderThickness="1"
CornerRadius="30"
x:CompileBindings="True" x:DataType="historyItems:HistoryItemViewModelBase"
Background="{DynamicResource Layer1BackgroundBrush}">
Expand Down Expand Up @@ -160,7 +160,8 @@
<ControlTemplate>
<DockPanel LastChildFill="True">
<Border Name="PART_SelectionIndicator"
BorderThickness="2 0 0 0"
BorderThickness="1"
BorderBrush="{DynamicResource Layer1BackgroundBrush}"
DockPanel.Dock="Left"
VerticalAlignment="Stretch" />
<Panel>
Expand All @@ -177,23 +178,15 @@
<Style Selector="^/template/ Rectangle#BackgroundRectangle">
<Setter Property="Fill" Value="{DynamicResource SystemControlTransparentBrush}" />
</Style>
<Style Selector="^:pointerover /template/ Rectangle#BackgroundRectangle">
<Setter Property="Fill" Value="{DynamicResource DataGridRowSelectedBackgroundBrush}" />
</Style>
<Style Selector="^:selected /template/ Rectangle#BackgroundRectangle">
<Setter Property="Fill" Value="{DynamicResource DataGridRowSelectedUnfocusedBackgroundBrush}" />
<Setter Property="Opacity" Value="{DynamicResource DataGridRowSelectedUnfocusedBackgroundOpacity}" />
<Style Selector="^/template/ Border#PART_SelectionIndicator">
<Setter Property="BorderBrush" Value="{DynamicResource Layer1BackgroundBrush}" />
</Style>
<Style Selector="^:selected:focus /template/ Rectangle#BackgroundRectangle">
<Setter Property="Fill" Value="{DynamicResource DataGridRowSelectedBackgroundBrush}" />
<Setter Property="Opacity" Value="{DynamicResource DataGridRowSelectedBackgroundOpacity}" />
<Style Selector="^:pointerover /template/ Border#PART_SelectionIndicator">
<Setter Property="BorderBrush" Value="{DynamicResource DataGridRowIndicatorFadedBrush}" />
</Style>
<Style Selector="^:selected /template/ Border#PART_SelectionIndicator">
<Setter Property="BorderBrush" Value="{DynamicResource DataGridRowIndicatorBrush}" />
</Style>
<Style Selector="^/template/ Border#PART_SelectionIndicator">
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:selected /template/ TreeDataGridCellsPresenter#PART_CellsPresenter">
<Setter Property="Background" Value="Transparent" />
</Style>
Expand Down
3 changes: 2 additions & 1 deletion WalletWasabi.Fluent/Styles/Themes/Dark.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@
<SolidColorBrush x:Key="SystemControlErrorTextForegroundBrush" Color="{StaticResource SystemErrorTextColor}" />
<SolidColorBrush x:Key="HyperLinkForeground">#00A2E8</SolidColorBrush>

<SolidColorBrush x:Key="DataGridRowIndicatorBrush" Color="{StaticResource SystemAccentColor}" />
<SolidColorBrush x:Key="DataGridRowIndicatorBrush" Color="{StaticResource SystemAccentColor}" Opacity="0.6" />
<SolidColorBrush x:Key="DataGridRowIndicatorFadedBrush" Color="{StaticResource SystemAccentColor}" Opacity="0.2" />
<SolidColorBrush x:Key="DataGridColumnHeaderBackgroundBrush" Color="Transparent" />
<SolidColorBrush x:Key="DataGridCellFocusVisualPrimaryBrush" Color="Transparent" />
<SolidColorBrush x:Key="DataGridCellFocusVisualSecondaryBrush" Color="Transparent" />
Expand Down
1 change: 1 addition & 0 deletions WalletWasabi.Fluent/Styles/Themes/Light.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
<SolidColorBrush x:Key="HyperLinkForeground">#00A2E8</SolidColorBrush>

<SolidColorBrush x:Key="DataGridRowIndicatorBrush" Color="{StaticResource SystemAccentColor}" />
<SolidColorBrush x:Key="DataGridRowIndicatorFadedBrush" Color="{StaticResource SystemAccentColor}" Opacity="0.1" />
<SolidColorBrush x:Key="DataGridColumnHeaderBackgroundBrush" Color="Transparent" />
<SolidColorBrush x:Key="DataGridCellFocusVisualPrimaryBrush" Color="Transparent" />
<SolidColorBrush x:Key="DataGridCellFocusVisualSecondaryBrush" Color="Transparent" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
x:Class="WalletWasabi.Fluent.Views.Wallets.Home.History.Columns.ActionsColumnView"
x:CompileBindings="True"
x:DataType="viewmodel:HistoryItemViewModelBase">
<Border CornerRadius="30" Background="{DynamicResource Layer2BackgroundBrush}">
<Border CornerRadius="30" Background="{DynamicResource Layer2BackgroundBrush}" HorizontalAlignment="Right">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="15" Margin="15 0">

<!-- SpeedUp -->
Expand Down

0 comments on commit 252b914

Please sign in to comment.