mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-06-28 00:54:47 -05:00
Re-Redesign of the Install Tab (#3350)
* Initial Remove Expanded View * more cleanup * Add word wrapping for Tooltips * Update tooltip colors in themes and XAML styles * Rename Properties for consistency * More Cleanup, and simplification. Also added support for screenreaders * Remove unused variables and shorten window naming * Rename Invoke-WPFUIApps to Initialize-WPFUI and update function calls for consistency * Rename Invoke-WPFUIApps.ps1 to Initialize-WPFUI.ps1 * Add TODO comments for sidebar UI generation in Initialize-WPFUI function
This commit is contained in:
@ -12,19 +12,34 @@
|
||||
Height="Auto"
|
||||
MaxWidth="1380"
|
||||
MaxHeight="800"
|
||||
Title="Chris Titus Tech's Windows Utility">
|
||||
Title="WinUtil">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="0" CornerRadius="10"/>
|
||||
</WindowChrome.WindowChrome>
|
||||
<Window.Resources>
|
||||
<Style TargetType="ToolTip">
|
||||
<Setter Property="Background" Value="{DynamicResource MainBackgroundColor}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource ToolTipBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBackgroundSelectedColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
|
||||
<Setter Property="MaxWidth" Value="{DynamicResource ToolTipWidth}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="5"/>
|
||||
<Setter Property="FontSize" Value="{DynamicResource FontSize}"/>
|
||||
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
||||
<!-- This ContentTemplate ensures that the content of the ToolTip wraps text properly for better readability -->
|
||||
<Setter Property="ContentTemplate">
|
||||
<Setter.Value>
|
||||
<DataTemplate>
|
||||
<ContentPresenter Content="{TemplateBinding Content}">
|
||||
<ContentPresenter.Resources>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
</Style>
|
||||
</ContentPresenter.Resources>
|
||||
</ContentPresenter>
|
||||
</DataTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type MenuItem}">
|
||||
@ -67,22 +82,22 @@
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="AppTileBorderStyle" TargetType="Border">
|
||||
<Style x:Key="AppEntryBorderStyle" TargetType="Border">
|
||||
<Setter Property="BorderBrush" Value="Gray"/>
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource AppTileBorderThickness}"/>
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource AppEntryBorderThickness}"/>
|
||||
<Setter Property="CornerRadius" Value="5"/>
|
||||
<Setter Property="Padding" Value="{DynamicResource AppTileMargins}"/>
|
||||
<Setter Property="Width" Value="{DynamicResource AppTileWidth}"/>
|
||||
<Setter Property="Padding" Value="{DynamicResource AppEntryMargin}"/>
|
||||
<Setter Property="Width" Value="{DynamicResource AppEntryWidth}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="Margin" Value="{DynamicResource AppTileMargins}"/>
|
||||
<Setter Property="Margin" Value="{DynamicResource AppEntryMargin}"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Background" Value="{DynamicResource AppInstallUnselectedColor}"/>
|
||||
</Style>
|
||||
<Style x:Key="AppTileCheckboxStyle" TargetType="CheckBox">
|
||||
<Style x:Key="AppEntryCheckboxStyle" TargetType="CheckBox">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="{DynamicResource AppTileMargins}"/>
|
||||
<Setter Property="Margin" Value="{DynamicResource AppEntryMargin}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="CheckBox">
|
||||
@ -94,55 +109,14 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="AppTileImageStyle" TargetType="Image">
|
||||
<Setter Property="Width" Value="{DynamicResource AppTileImageSize}"/>
|
||||
<Setter Property="Height" Value="{DynamicResource AppTileImageSize}"/>
|
||||
<Setter Property="Margin">
|
||||
<Setter.Value>
|
||||
<Thickness Left="0" Top="0" Right="10" Bottom="0"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Clip">
|
||||
<Setter.Value>
|
||||
<RectangleGeometry Rect="0,0,40,40" RadiusX="5" RadiusY="5"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Visibility" Value="{DynamicResource AppTileCompactVisibility}"/>
|
||||
</Style>
|
||||
<Style x:Key="AppTileNameStyle" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="{DynamicResource AppTileFontSize}"/>
|
||||
<Style x:Key="AppEntryNameStyle" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="{DynamicResource AppEntryFontSize}"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="{DynamicResource AppTileMargins}"/>
|
||||
<Setter Property="Margin" Value="{DynamicResource AppEntryMargin}"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
</Style>
|
||||
<Style x:Key="AppTileButtonPanelStyle" TargetType="StackPanel">
|
||||
<Setter Property="Orientation" Value="Horizontal"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="{DynamicResource AppTileMargins}"/>
|
||||
<Setter Property="Visibility" Value="{DynamicResource AppTileCompactVisibility}"/>
|
||||
</Style>
|
||||
<Style x:Key="AppTileButtonStyle" TargetType="Button">
|
||||
<Setter Property="Width" Value="45"/>
|
||||
<Setter Property="Height" Value="35"/>
|
||||
<Setter Property="Margin" Value="0,0,10,0"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundColor}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundColor}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="ContentTemplate">
|
||||
<Setter.Value>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontFamily="Segoe MDL2 Assets" FontSize="20"
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
Background="Transparent" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</DataTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Button" x:Key="HoverButtonStyle">
|
||||
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}" />
|
||||
@ -273,45 +247,6 @@
|
||||
<Setter Property="Background" Value="{DynamicResource LabelBackgroundColor}"/>
|
||||
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
||||
</Style>
|
||||
<!-- Category Toggle Button Style for the Apps Window-->
|
||||
<Style x:Key="CategoryToggleButtonStyle" TargetType="ToggleButton">
|
||||
<Setter Property="Foreground" Value="{DynamicResource LabelboxForegroundColor}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource MainBackgroundColor}"/>
|
||||
<Setter Property="FontFamily" Value="{DynamicResource HeaderFontFamily}"/>
|
||||
<Setter Property="FontSize" Value="{DynamicResource HeaderFontSize}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="10,2,10,2"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{DynamicResource BorderColor}"
|
||||
BorderThickness="0"
|
||||
CornerRadius="{DynamicResource ButtonCornerRadius}">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
|
||||
<TextBlock x:Name="PrefixTextBlock"/>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="PrefixTextBlock" Property="Text" Value="[-] "/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="False">
|
||||
<Setter TargetName="PrefixTextBlock" Property="Text" Value="[+] "/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundMouseoverColor}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!-- TextBlock template -->
|
||||
<Style TargetType="TextBlock">
|
||||
|
Reference in New Issue
Block a user