mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-18 02:37:43 -06:00
Layouted Checkboxes, redesigned Toggles & renamed RDCMan
- Removed text inside toggle as it can be confusing because it sais "enable" while enabled and "disable" if disabled. The coloring should be enough to know in what state that setting is. - without the text i could make it a little bit smaller while still letting it look good. - Renamed "Remote Desktop Connection Manager (RDCMan)" to "RDCMan" because that name is shorter and also mostly used by the linked site. - layouted checkboxes so they are not more left than the title and look tidy. - tested
This commit is contained in:
parent
ff1ecbd1e3
commit
b6ca69d93f
@ -114,7 +114,7 @@
|
||||
"WPFInstallrdcman": {
|
||||
"category": "Microsoft Tools",
|
||||
"choco": "rdcman",
|
||||
"content": "Remote Desktop Connection Manager (RDCMan)",
|
||||
"content": "RDCMan",
|
||||
"description": "RDCMan manages multiple remote desktop connections. It is useful for managing server labs where you need regular access to each machine such as automated checkin systems and data centers.",
|
||||
"link": "https://learn.microsoft.com/en-us/sysinternals/downloads/rdcman",
|
||||
"winget": "Microsoft.Sysinternals.RDCMan"
|
||||
|
@ -295,7 +295,7 @@
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="CheckBox">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<Grid Background="{TemplateBinding Background}" Margin="6,0,0,0">
|
||||
<BulletDecorator Background="Transparent">
|
||||
<BulletDecorator.Bullet>
|
||||
<Grid Width="16" Height="16">
|
||||
@ -403,14 +403,15 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ColorfulToggleSwitchStyle" TargetType="{x:Type CheckBox}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Grid x:Name="toggleSwitch">
|
||||
<Border x:Name="Border" CornerRadius="10"
|
||||
<Grid x:Name="toggleSwitch" Margin="10,0,0,0">
|
||||
<Border x:Name="Border" CornerRadius="11"
|
||||
Background="#FFFFFFFF"
|
||||
Width="70" Height="25">
|
||||
Width="50" Height="25">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect ShadowDepth="0.5" Direction="0" Opacity="0.3" />
|
||||
</Border.Effect>
|
||||
@ -423,17 +424,12 @@
|
||||
</Ellipse.Effect>
|
||||
</Ellipse>
|
||||
</Border>
|
||||
|
||||
<TextBlock x:Name="txtDisable" Text="Disable " VerticalAlignment="Center" FontWeight="DemiBold" HorizontalAlignment="Right" Foreground="White" FontSize="12" />
|
||||
<TextBlock x:Name="txtEnable" Text=" Enable" VerticalAlignment="Center" FontWeight="DemiBold" Foreground="White" HorizontalAlignment="Left" FontSize="12" />
|
||||
</Grid>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="ToggleButton.IsChecked" Value="False">
|
||||
<Setter TargetName="Border" Property="Background" Value="#C2283B" />
|
||||
<Setter TargetName="Ellipse" Property="Margin" Value="2 2 2 1" />
|
||||
<Setter TargetName="txtDisable" Property="Opacity" Value="1.0" />
|
||||
<Setter TargetName="txtEnable" Property="Opacity" Value="0.0" />
|
||||
</Trigger>
|
||||
|
||||
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||
@ -446,20 +442,10 @@
|
||||
|
||||
<ThicknessAnimation Storyboard.TargetName="Ellipse"
|
||||
Storyboard.TargetProperty="Margin"
|
||||
To="46 2 2 1" Duration="0:0:0.1" />
|
||||
|
||||
<DoubleAnimation Storyboard.TargetName="txtDisable"
|
||||
Storyboard.TargetProperty="(TextBlock.Opacity)"
|
||||
To="0.0" Duration="0:0:0:0.1" />
|
||||
|
||||
<DoubleAnimation Storyboard.TargetName="txtEnable"
|
||||
Storyboard.TargetProperty="(TextBlock.Opacity)"
|
||||
To="1.0" Duration="0:0:0:0.1" />
|
||||
To="26 2 2 1" Duration="0:0:0.1" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
|
||||
<!-- Some out fading -->
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
@ -470,18 +456,9 @@
|
||||
<ThicknessAnimation Storyboard.TargetName="Ellipse"
|
||||
Storyboard.TargetProperty="Margin"
|
||||
To="2 2 2 1" Duration="0:0:0.1" />
|
||||
|
||||
<DoubleAnimation Storyboard.TargetName="txtDisable"
|
||||
Storyboard.TargetProperty="(TextBlock.Opacity)"
|
||||
To="1.0" Duration="0:0:0:0.1" />
|
||||
|
||||
<DoubleAnimation Storyboard.TargetName="txtEnable"
|
||||
Storyboard.TargetProperty="(TextBlock.Opacity)"
|
||||
To="0.0" Duration="0:0:0:0.1" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
|
||||
<Setter Property="Foreground" Value="{DynamicResource IdealForegroundColorBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
@ -490,6 +467,7 @@
|
||||
</Setter>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="labelfortweaks" TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="{MainForegroundColor}" />
|
||||
<Setter Property="Background" Value="{MainBackgroundColor}" />
|
||||
|
Loading…
Reference in New Issue
Block a user