-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove ripple animation from Material themes, fixes #484
- Loading branch information
Showing
4 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
src/IronyModManager/Controls/Themes/MaterialDark/ListBoxItem.axaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<Styles xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:converters="clr-namespace:Material.Styles.Converters;assembly=Material.Styles" | ||
xmlns:animations="clr-namespace:Material.Styles.Additional.Animations;assembly=Material.Styles" | ||
xmlns:ripple="clr-namespace:Material.Ripple;assembly=Material.Ripple;assembly=Material.Styles"> | ||
|
||
<Style Selector="ListBoxItem"> | ||
<Setter Property="Foreground" Value="{TemplateBinding Foreground}" /> | ||
<Setter Property="Background" Value="Transparent" /> | ||
<Setter Property="BorderThickness" Value="0" /> | ||
<Setter Property="Padding" Value="8" /> | ||
<Setter Property="Template"> | ||
<ControlTemplate> | ||
<Border Background="{TemplateBinding Background}" | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}" | ||
Margin="{TemplateBinding Margin}" | ||
ClipToBounds="{TemplateBinding ClipToBounds}"> | ||
<Grid> | ||
<Border Name="selectedBorder" | ||
Background="{TemplateBinding Foreground}"/> | ||
<Border Name="pointerOverBorder" | ||
Background="{TemplateBinding Foreground}"/> | ||
<!--<ripple:RippleEffect Name="Ripple" | ||
RippleFill="{TemplateBinding Foreground}" | ||
Focusable="False" | ||
ContentTemplate="{TemplateBinding ContentTemplate}" | ||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" | ||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" | ||
Padding="{TemplateBinding Padding}">--> | ||
<ContentPresenter Name="PART_ContentPresenter" | ||
Background="{TemplateBinding Background}" | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}" | ||
ContentTemplate="{TemplateBinding ContentTemplate}" | ||
Content="{TemplateBinding Content}" | ||
Padding="{TemplateBinding Padding}" | ||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" | ||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" /> | ||
<!--</ripple:RippleEffect>--> | ||
</Grid> | ||
</Border> | ||
</ControlTemplate> | ||
</Setter> | ||
</Style> | ||
|
||
<!-- Transitions --> | ||
<Style Selector="ListBoxItem:not(.notransitions) /template/ Border#selectedBorder, | ||
ListBoxItem:not(.notransitions) /template/ Border#pointerOverBorder"> | ||
<Setter Property="Transitions"> | ||
<Transitions> | ||
<DoubleTransition Duration="0:0:0.25" Property="Opacity" Easing="LinearEasing" /> | ||
</Transitions> | ||
</Setter> | ||
</Style> | ||
|
||
|
||
<Style Selector="ListBoxItem:disabled"> | ||
<Setter Property="Opacity" Value="0.56" /> | ||
</Style> | ||
<Style Selector="ListBoxItem:not(:disabled):pointerover /template/ Border#pointerOverBorder"> | ||
<Setter Property="Opacity" Value="0.06" /> | ||
</Style> | ||
<Style Selector="ListBoxItem:selected /template/ Border#selectedBorder"> | ||
<Setter Property="Opacity" Value="0.12" /> | ||
</Style> | ||
<Style | ||
Selector="ListBoxItem:not(:pointerover) /template/ Border#pointerOverBorder, | ||
ListBoxItem:not(:selected) /template/ Border#selectedBorder"> | ||
<Setter Property="Opacity" Value="0" /> | ||
</Style> | ||
</Styles> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
src/IronyModManager/Controls/Themes/MaterialLight/ListBoxItem.axaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<Styles xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:converters="clr-namespace:Material.Styles.Converters;assembly=Material.Styles" | ||
xmlns:animations="clr-namespace:Material.Styles.Additional.Animations;assembly=Material.Styles" | ||
xmlns:ripple="clr-namespace:Material.Ripple;assembly=Material.Ripple;assembly=Material.Styles"> | ||
|
||
<Style Selector="ListBoxItem"> | ||
<Setter Property="Foreground" Value="{TemplateBinding Foreground}" /> | ||
<Setter Property="Background" Value="Transparent" /> | ||
<Setter Property="BorderThickness" Value="0" /> | ||
<Setter Property="Padding" Value="8" /> | ||
<Setter Property="Template"> | ||
<ControlTemplate> | ||
<Border Background="{TemplateBinding Background}" | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}" | ||
Margin="{TemplateBinding Margin}" | ||
ClipToBounds="{TemplateBinding ClipToBounds}"> | ||
<Grid> | ||
<Border Name="selectedBorder" | ||
Background="{TemplateBinding Foreground}"/> | ||
<Border Name="pointerOverBorder" | ||
Background="{TemplateBinding Foreground}"/> | ||
<!--<ripple:RippleEffect Name="Ripple" | ||
RippleFill="{TemplateBinding Foreground}" | ||
Focusable="False" | ||
ContentTemplate="{TemplateBinding ContentTemplate}" | ||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" | ||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" | ||
Padding="{TemplateBinding Padding}">--> | ||
<ContentPresenter Name="PART_ContentPresenter" | ||
Background="{TemplateBinding Background}" | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}" | ||
ContentTemplate="{TemplateBinding ContentTemplate}" | ||
Content="{TemplateBinding Content}" | ||
Padding="{TemplateBinding Padding}" | ||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" | ||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" /> | ||
<!--</ripple:RippleEffect>--> | ||
</Grid> | ||
</Border> | ||
</ControlTemplate> | ||
</Setter> | ||
</Style> | ||
|
||
<!-- Transitions --> | ||
<Style Selector="ListBoxItem:not(.notransitions) /template/ Border#selectedBorder, | ||
ListBoxItem:not(.notransitions) /template/ Border#pointerOverBorder"> | ||
<Setter Property="Transitions"> | ||
<Transitions> | ||
<DoubleTransition Duration="0:0:0.25" Property="Opacity" Easing="LinearEasing" /> | ||
</Transitions> | ||
</Setter> | ||
</Style> | ||
|
||
|
||
<Style Selector="ListBoxItem:disabled"> | ||
<Setter Property="Opacity" Value="0.56" /> | ||
</Style> | ||
<Style Selector="ListBoxItem:not(:disabled):pointerover /template/ Border#pointerOverBorder"> | ||
<Setter Property="Opacity" Value="0.06" /> | ||
</Style> | ||
<Style Selector="ListBoxItem:selected /template/ Border#selectedBorder"> | ||
<Setter Property="Opacity" Value="0.12" /> | ||
</Style> | ||
<Style | ||
Selector="ListBoxItem:not(:pointerover) /template/ Border#pointerOverBorder, | ||
ListBoxItem:not(:selected) /template/ Border#selectedBorder"> | ||
<Setter Property="Opacity" Value="0" /> | ||
</Style> | ||
</Styles> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters