Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Improving Neumorphic ToggleSwitch #1044

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -688,13 +688,17 @@
<StackPanel Spacing="20"
Orientation="Vertical">
<!-- Enabled -->
<TextBlock Text="Enabled"
Style="{StaticResource BodyMedium}" />

<ToggleSwitch Style="{StaticResource NeumorphicToggleSwitchStyle}"
IsOn="True" />
<ToggleSwitch Style="{StaticResource NeumorphicToggleSwitchStyle}" />
<ToggleSwitch Style="{StaticResource NeumorphicToggleSwitchStyle}">
<ToggleSwitch Style="{StaticResource NeumorphicToggleSwitchStyle}"
IsOn="True">
<ToggleSwitch.OnContent>
<PathIcon Data="M0.166992 3.99997L1.50033 5.3333C4.81366 2.01997 10.187 2.01997 13.5003 5.3333L14.8337 3.99997C10.787 -0.0467007 4.22033 -0.0467007 0.166992 3.99997ZM5.50033 9.3333L7.50033 11.3333L9.50032 9.3333C8.40033 8.22663 6.60699 8.22663 5.50033 9.3333ZM2.83366 6.66663L4.16699 7.99997C6.00699 6.15997 8.99366 6.15997 10.8337 7.99997L12.167 6.66663C9.59366 4.0933 5.41366 4.0933 2.83366 6.66663Z" />
</ToggleSwitch.OnContent>
</ToggleSwitch>
<ToggleSwitch Style="{StaticResource NeumorphicToggleSwitchStyle}">
<ToggleSwitch.OffContent>
<PathIcon Data="M14.827 5.00003C12.267 2.44003 8.70033 1.50669 5.39366 2.18669L7.07366 3.86669C9.38699 3.75336 11.7337 4.56669 13.4937 6.33336L14.827 5.00003V5.00003ZM12.1603 7.66669C11.3003 6.80669 10.267 6.24669 9.16699 5.96003L11.5203 8.31336L12.1603 7.66669V7.66669ZM0.833659 1.03336L2.88033 3.06669C1.90033 3.54669 0.980326 4.18669 0.166992 5.00003L1.49366 6.33336C2.32033 5.50669 3.27366 4.89336 4.29366 4.48669L5.78699 5.98003C4.70699 6.26003 3.68033 6.82003 2.83366 7.66669V7.67336L4.16033 9.00003C5.06699 8.09336 6.25366 7.64003 7.44033 7.62669L12.1537 12.3334L13.0003 11.4934L1.69366 0.193359L0.833659 1.03336ZM5.50033 10.3334L7.50033 12.3334L9.50033 10.3334C8.40033 9.22669 6.60699 9.22669 5.50033 10.3334Z" />
</ToggleSwitch.OffContent>
Expand All @@ -711,6 +715,9 @@
<StackPanel Spacing="20"
Orientation="Vertical">
<!-- Disabled -->
<TextBlock Text="Disabled"
Style="{StaticResource BodyMedium}" />

<ToggleSwitch Style="{StaticResource NeumorphicToggleSwitchStyle}"
IsEnabled="False"
IsOn="True" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3196,7 +3196,8 @@
<Setter Property="ManipulationMode" Value="System,TranslateX" />
<Setter Property="FocusVisualMargin" Value="0" />
<Setter Property="UseSystemFocusVisuals" Value="False" />

<Setter Property="MinWidth" Value="0" />
agneszitte marked this conversation as resolved.
Show resolved Hide resolved

<Setter Property="OnContent" Value="{x:Null}" />
<Setter Property="OffContent" Value="{x:Null}" />

Expand Down
Loading