mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-06-29 03:20:18 +12:00
Scroll Bar themified, start work on .mat video support
This commit is contained in:
parent
73ecc0590c
commit
ab3c39b26b
|
@ -28,6 +28,9 @@
|
||||||
<ResourceDictionary x:Name="ComboBoxItem_Style" Source="Styles/ComboBoxItem.xaml"/>
|
<ResourceDictionary x:Name="ComboBoxItem_Style" Source="Styles/ComboBoxItem.xaml"/>
|
||||||
<ResourceDictionary x:Name="ComboBox_Style" Source="Styles/ComboBox.xaml"/>
|
<ResourceDictionary x:Name="ComboBox_Style" Source="Styles/ComboBox.xaml"/>
|
||||||
<ResourceDictionary x:Name="ToggleButton_Style" Source="Styles/ToggleButton.xaml"/>
|
<ResourceDictionary x:Name="ToggleButton_Style" Source="Styles/ToggleButton.xaml"/>
|
||||||
|
<ResourceDictionary x:Name="ScrollBar_Style" Source="Styles/ScrollBar.xaml"/>
|
||||||
|
<ResourceDictionary x:Name="RepeatButton_Style" Source="Styles/RepeatButton.xaml"/>
|
||||||
|
<ResourceDictionary x:Name="Thumb_Style" Source="Styles/Thumb.xaml"/>
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
|
|
|
@ -149,6 +149,10 @@ namespace ModAssistant
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(ThemeDirectory);
|
Directory.CreateDirectory(ThemeDirectory);
|
||||||
}
|
}
|
||||||
|
if (!Directory.Exists($"{ThemeDirectory}\\{themeName}"))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory($"{ThemeDirectory}\\{themeName}");
|
||||||
|
}
|
||||||
|
|
||||||
if (!File.Exists($@"{ThemeDirectory}\\{themeName}.xaml"))
|
if (!File.Exists($@"{ThemeDirectory}\\{themeName}.xaml"))
|
||||||
{
|
{
|
||||||
|
@ -207,7 +211,7 @@ namespace ModAssistant
|
||||||
{
|
{
|
||||||
Theme theme = new Theme(name, null);
|
Theme theme = new Theme(name, null);
|
||||||
theme.Waifus = new Waifus();
|
theme.Waifus = new Waifus();
|
||||||
foreach (string file in Directory.EnumerateFiles(directory))
|
foreach (string file in Directory.EnumerateFiles(directory).OrderByDescending(x => x))
|
||||||
{
|
{
|
||||||
FileInfo info = new FileInfo(file);
|
FileInfo info = new FileInfo(file);
|
||||||
if (info.Name.EndsWith(".png", StringComparison.OrdinalIgnoreCase) &&
|
if (info.Name.EndsWith(".png", StringComparison.OrdinalIgnoreCase) &&
|
||||||
|
@ -278,6 +282,17 @@ namespace ModAssistant
|
||||||
{
|
{
|
||||||
waifus.Sidebar = GetImageFromStream(Utils.StreamToArray(file.Open()));
|
waifus.Sidebar = GetImageFromStream(Utils.StreamToArray(file.Open()));
|
||||||
}
|
}
|
||||||
|
if (file.Name.EndsWith(".mp4", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
if (!Directory.Exists($"{ThemeDirectory}\\{name}"))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory($"{ThemeDirectory}\\{name}");
|
||||||
|
}
|
||||||
|
if (!File.Exists($"{ThemeDirectory}\\{name}\\_{name}.mp4"))
|
||||||
|
{
|
||||||
|
file.ExtractToFile($"{ThemeDirectory}\\{name}\\_{name}.mp4", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (file.Name.EndsWith(".xaml", StringComparison.OrdinalIgnoreCase))
|
if (file.Name.EndsWith(".xaml", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
if (!loadedThemes.ContainsKey(name))
|
if (!loadedThemes.ContainsKey(name))
|
||||||
|
|
|
@ -169,10 +169,22 @@
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Styles\RepeatButton.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Styles\ScrollBar.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="Styles\TextBlock.xaml">
|
<Page Include="Styles\TextBlock.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Styles\Thumb.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="Styles\ToggleButton.xaml">
|
<Page Include="Styles\ToggleButton.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|
105
ModAssistant/Styles/RepeatButton.xaml
Normal file
105
ModAssistant/Styles/RepeatButton.xaml
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<Style
|
||||||
|
TargetType="{x:Type RepeatButton}"
|
||||||
|
x:Key="ModAssistantRepeatButton">
|
||||||
|
<Setter
|
||||||
|
Property="BorderThickness"
|
||||||
|
Value="1" />
|
||||||
|
<Setter
|
||||||
|
Property="HorizontalContentAlignment"
|
||||||
|
Value="Center" />
|
||||||
|
<Setter
|
||||||
|
Property="VerticalContentAlignment"
|
||||||
|
Value="Center" />
|
||||||
|
<Setter
|
||||||
|
Property="Padding"
|
||||||
|
Value="1" />
|
||||||
|
<Setter
|
||||||
|
Property="Focusable"
|
||||||
|
Value="False" />
|
||||||
|
<Setter
|
||||||
|
Property="IsTabStop"
|
||||||
|
Value="False" />
|
||||||
|
<Setter
|
||||||
|
Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate
|
||||||
|
TargetType="{x:Type RepeatButton}">
|
||||||
|
<Border
|
||||||
|
Name="border"
|
||||||
|
BorderThickness="1"
|
||||||
|
SnapsToDevicePixels="True"
|
||||||
|
Background="{DynamicResource ScrollBarBackground}"
|
||||||
|
BorderBrush="{StaticResource ScrollBarBorder}">
|
||||||
|
<ContentPresenter
|
||||||
|
Name="contentPresenter"
|
||||||
|
Margin="{TemplateBinding Padding}"
|
||||||
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||||
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
|
Focusable="False" />
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger
|
||||||
|
Property="UIElement.IsMouseOver"
|
||||||
|
Value="True">
|
||||||
|
<Setter
|
||||||
|
TargetName="border"
|
||||||
|
Property="Background"
|
||||||
|
Value="{DynamicResource ScrollBarArrowHovered}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger
|
||||||
|
Property="IsPressed"
|
||||||
|
Value="True">
|
||||||
|
<Setter
|
||||||
|
TargetName="border"
|
||||||
|
Property="Background"
|
||||||
|
Value="{DynamicResource ScrollBarArrowClicked}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger
|
||||||
|
Property="IsEnabled"
|
||||||
|
Value="False">
|
||||||
|
<Setter
|
||||||
|
TargetName="contentPresenter"
|
||||||
|
Property="UIElement.Opacity"
|
||||||
|
Value="0.56" />
|
||||||
|
<Setter
|
||||||
|
TargetName="border"
|
||||||
|
Property="Background"
|
||||||
|
Value="{DynamicResource ScrollBarDisabled}" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
TargetType="{x:Type RepeatButton}"
|
||||||
|
x:Key="ModAssistantSmallRepeatButton">
|
||||||
|
<Setter
|
||||||
|
Property="FrameworkElement.OverridesDefaultStyle"
|
||||||
|
Value="True" />
|
||||||
|
<Setter
|
||||||
|
Property="Background"
|
||||||
|
Value="{DynamicResource ScrollBarBackground}" />
|
||||||
|
<Setter
|
||||||
|
Property="Focusable"
|
||||||
|
Value="False" />
|
||||||
|
<Setter
|
||||||
|
Property="IsTabStop"
|
||||||
|
Value="False" />
|
||||||
|
<Setter
|
||||||
|
Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate
|
||||||
|
TargetType="{x:Type RepeatButton}">
|
||||||
|
<Rectangle
|
||||||
|
Fill="{TemplateBinding Background}"
|
||||||
|
Height="{TemplateBinding Height}"
|
||||||
|
Width="{TemplateBinding Width}" />
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</ResourceDictionary>
|
336
ModAssistant/Styles/ScrollBar.xaml
Normal file
336
ModAssistant/Styles/ScrollBar.xaml
Normal file
|
@ -0,0 +1,336 @@
|
||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<Style
|
||||||
|
TargetType="{x:Type ScrollBar}"
|
||||||
|
x:Key="{x:Type ScrollBar}">
|
||||||
|
<Setter
|
||||||
|
Property="Stylus.IsPressAndHoldEnabled"
|
||||||
|
Value="False" />
|
||||||
|
<Setter
|
||||||
|
Property="Stylus.IsFlicksEnabled"
|
||||||
|
Value="False" />
|
||||||
|
<Setter
|
||||||
|
Property="Background"
|
||||||
|
Value="{DynamicResource ScrollBarBackground}" />
|
||||||
|
<Setter
|
||||||
|
Property="BorderBrush"
|
||||||
|
Value="{DynamicResource ScrollBarBorder}" />
|
||||||
|
<Setter
|
||||||
|
Property="Foreground"
|
||||||
|
Value="{DynamicResource ScrollBarTextColor}" />
|
||||||
|
<Setter
|
||||||
|
Property="BorderThickness"
|
||||||
|
Value="1,0" />
|
||||||
|
<Setter
|
||||||
|
Property="Width"
|
||||||
|
Value="{DynamicResource SystemParameters.VerticalScrollBarWidthKey}" />
|
||||||
|
<Setter
|
||||||
|
Property="MinWidth"
|
||||||
|
Value="16" />
|
||||||
|
<Setter
|
||||||
|
Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate
|
||||||
|
TargetType="{x:Type ScrollBar}">
|
||||||
|
<Grid
|
||||||
|
Name="Bg"
|
||||||
|
SnapsToDevicePixels="True">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition
|
||||||
|
Height="{DynamicResource ResourceKey=ScrollBarButtonHeight}" />
|
||||||
|
<RowDefinition
|
||||||
|
Height="*" />
|
||||||
|
<RowDefinition
|
||||||
|
Height="{DynamicResource ResourceKey=ScrollBarButtonHeight}" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
Grid.Row="1"
|
||||||
|
Background="{TemplateBinding Background}" />
|
||||||
|
<RepeatButton
|
||||||
|
Name="PART_LineUpButton"
|
||||||
|
Command="{x:Static ScrollBar.LineUpCommand}"
|
||||||
|
IsEnabled="{TemplateBinding IsMouseOver}"
|
||||||
|
Style="{DynamicResource ResourceKey=ModAssistantRepeatButton}">
|
||||||
|
<Path
|
||||||
|
Name="ArrowTop"
|
||||||
|
Data="M0,4 C0,4 0,6 0,6 C0,6 3.5,2.5 3.5,2.5 C3.5,2.5 7,6 7,6 C7,6 7,4 7,4 C7,4 3.5,0.5 3.5,0.5 C3.5,0.5 0,4 0,4"
|
||||||
|
Stretch="Uniform"
|
||||||
|
Margin="3,4,3,3"
|
||||||
|
Fill="{DynamicResource ScrollBarArrowColor}" />
|
||||||
|
</RepeatButton>
|
||||||
|
<Track
|
||||||
|
Name="PART_Track"
|
||||||
|
IsDirectionReversed="True"
|
||||||
|
IsEnabled="{TemplateBinding IsMouseOver}"
|
||||||
|
Grid.Row="1">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton
|
||||||
|
Command="{x:Static ScrollBar.PageUpCommand}"
|
||||||
|
Background="{DynamicResource ScrollBarBackground}"
|
||||||
|
Style="{DynamicResource ResourceKey=ModAssistantSmallRepeatButton}"/>
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton
|
||||||
|
Command="{x:Static ScrollBar.PageDownCommand}"
|
||||||
|
Background="{DynamicResource ScrollBarBackground}"
|
||||||
|
Style="{DynamicResource ResourceKey=ModAssistantSmallRepeatButton}"/>
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb
|
||||||
|
Background="{DynamicResource ScrollBarHandle}"
|
||||||
|
Style="{DynamicResource ResourceKey=ModAssistantThumb}" />
|
||||||
|
</Track.Thumb>
|
||||||
|
</Track>
|
||||||
|
<RepeatButton
|
||||||
|
Name="PART_LineDownButton"
|
||||||
|
Command="{x:Static ScrollBar.LineDownCommand}"
|
||||||
|
IsEnabled="{TemplateBinding IsMouseOver}"
|
||||||
|
Grid.Row="2"
|
||||||
|
Style="{DynamicResource ResourceKey=ModAssistantRepeatButton}">
|
||||||
|
<Path
|
||||||
|
Name="ArrowBottom"
|
||||||
|
Data="M0,2.5 C0,2.5 0,0.5 0,0.5 C0,0.5 3.5,4 3.5,4 C3.5,4 7,0.5 7,0.5 C7,0.5 7,2.5 7,2.5 C7,2.5 3.5,6 3.5,6 C3.5,6 0,2.5 0,2.5"
|
||||||
|
Stretch="Uniform"
|
||||||
|
Margin="3,4,3,3"
|
||||||
|
Fill="{DynamicResource ScrollBarArrowColor}" />
|
||||||
|
</RepeatButton>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<MultiDataTrigger>
|
||||||
|
<MultiDataTrigger.Conditions>
|
||||||
|
<Condition
|
||||||
|
Value="true"
|
||||||
|
Binding="{Binding ElementName=PART_LineDownButton, Path=IsMouseOver}" />
|
||||||
|
<Condition
|
||||||
|
Value="true"
|
||||||
|
Binding="{Binding ElementName=PART_LineDownButton, Path=IsPressed}" />
|
||||||
|
</MultiDataTrigger.Conditions>
|
||||||
|
<Setter
|
||||||
|
TargetName="ArrowBottom"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarArrowClicked}" />
|
||||||
|
</MultiDataTrigger>
|
||||||
|
<MultiDataTrigger>
|
||||||
|
<MultiDataTrigger.Conditions>
|
||||||
|
<Condition
|
||||||
|
Value="true"
|
||||||
|
Binding="{Binding ElementName=PART_LineUpButton, Path=IsMouseOver}" />
|
||||||
|
<Condition
|
||||||
|
Value="true"
|
||||||
|
Binding="{Binding ElementName=PART_LineUpButton, Path=IsPressed}" />
|
||||||
|
</MultiDataTrigger.Conditions>
|
||||||
|
<Setter
|
||||||
|
TargetName="ArrowTop"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarArrowClicked}" />
|
||||||
|
</MultiDataTrigger>
|
||||||
|
<MultiDataTrigger>
|
||||||
|
<MultiDataTrigger.Conditions>
|
||||||
|
<Condition
|
||||||
|
Value="true"
|
||||||
|
Binding="{Binding ElementName=PART_LineDownButton, Path=IsMouseOver}" />
|
||||||
|
<Condition
|
||||||
|
Value="false"
|
||||||
|
Binding="{Binding ElementName=PART_LineDownButton, Path=IsPressed}" />
|
||||||
|
</MultiDataTrigger.Conditions>
|
||||||
|
<Setter
|
||||||
|
TargetName="ArrowBottom"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarArrowHovered}" />
|
||||||
|
</MultiDataTrigger>
|
||||||
|
<MultiDataTrigger>
|
||||||
|
<MultiDataTrigger.Conditions>
|
||||||
|
<Condition
|
||||||
|
Value="true"
|
||||||
|
Binding="{Binding ElementName=PART_LineUpButton, Path=IsMouseOver}" />
|
||||||
|
<Condition
|
||||||
|
Value="false"
|
||||||
|
Binding="{Binding ElementName=PART_LineUpButton, Path=IsPressed}" />
|
||||||
|
</MultiDataTrigger.Conditions>
|
||||||
|
<Setter
|
||||||
|
TargetName="ArrowTop"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarArrowHovered}" />
|
||||||
|
</MultiDataTrigger>
|
||||||
|
<Trigger
|
||||||
|
Property="IsEnabled"
|
||||||
|
Value="False">
|
||||||
|
<Setter
|
||||||
|
TargetName="ArrowTop"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarDisabled}" />
|
||||||
|
<Setter
|
||||||
|
TargetName="ArrowBottom"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarDisabled}" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger
|
||||||
|
Property="ScrollBar.Orientation"
|
||||||
|
Value="Horizontal">
|
||||||
|
<Setter
|
||||||
|
Property="Width"
|
||||||
|
Value="Auto" />
|
||||||
|
<Setter
|
||||||
|
Property="MinWidth"
|
||||||
|
Value="0" />
|
||||||
|
<Setter
|
||||||
|
Property="Height"
|
||||||
|
Value="{DynamicResource SystemParameters.HorizontalScrollBarHeightKey}" />
|
||||||
|
<Setter
|
||||||
|
Property="MinHeight"
|
||||||
|
Value="{DynamicResource SystemParameters.HorizontalScrollBarHeightKey}" />
|
||||||
|
<Setter
|
||||||
|
Property="BorderThickness"
|
||||||
|
Value="0,1" />
|
||||||
|
<Setter
|
||||||
|
Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate
|
||||||
|
TargetType="{x:Type ScrollBar}">
|
||||||
|
<Grid
|
||||||
|
Name="Bg"
|
||||||
|
SnapsToDevicePixels="True">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition
|
||||||
|
Width="{DynamicResource ResourceKey=ScrollBarButtonHeight}" />
|
||||||
|
<ColumnDefinition
|
||||||
|
Width="0.00001*" />
|
||||||
|
<ColumnDefinition
|
||||||
|
Width="{DynamicResource ResourceKey=ScrollBarButtonHeight}" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
Grid.Column="1"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}" />
|
||||||
|
<RepeatButton
|
||||||
|
Name="PART_LineLeftButton"
|
||||||
|
Command="{x:Static ScrollBar.LineLeftCommand}"
|
||||||
|
IsEnabled="{TemplateBinding IsMouseOver}"
|
||||||
|
Style="{DynamicResource ResourceKey=ModAssistantRepeatButton}">
|
||||||
|
<Path
|
||||||
|
Name="ArrowLeft"
|
||||||
|
Data="M3.18,7 C3.18,7 5,7 5,7 C5,7 1.81,3.5 1.81,3.5 C1.81,3.5 5,0 5,0 C5,0 3.18,0 3.18,0 C3.18,0 0,3.5 0,3.5 C0,3.5 3.18,7 3.18,7"
|
||||||
|
Stretch="Uniform"
|
||||||
|
Margin="3"
|
||||||
|
Fill="{DynamicResource ScrollBarArrowColor}" />
|
||||||
|
</RepeatButton>
|
||||||
|
<Track
|
||||||
|
Name="PART_Track"
|
||||||
|
Grid.Column="1"
|
||||||
|
IsEnabled="{TemplateBinding IsMouseOver}">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton
|
||||||
|
Command="{x:Static ScrollBar.PageLeftCommand}"
|
||||||
|
Background="{DynamicResource ScrollBarBackground}"
|
||||||
|
Style="{DynamicResource ResourceKey=ModAssistantSmallRepeatButton}" />
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton
|
||||||
|
Command="{x:Static ScrollBar.PageRightCommand}"
|
||||||
|
Background="{DynamicResource ScrollBarBackground}"
|
||||||
|
Style="{DynamicResource ResourceKey=ModAssistantSmallRepeatButton}" />
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb
|
||||||
|
Background="{DynamicResource ScrollBarHandle}"
|
||||||
|
Style="{DynamicResource ResourceKey=ModAssistantThumb}" />
|
||||||
|
</Track.Thumb>
|
||||||
|
</Track>
|
||||||
|
<RepeatButton
|
||||||
|
Name="PART_LineRightButton"
|
||||||
|
Grid.Column="2"
|
||||||
|
Command="{x:Static ScrollBar.LineRightCommand}"
|
||||||
|
IsEnabled="{TemplateBinding IsMouseOver}"
|
||||||
|
Style="{DynamicResource ResourceKey=ModAssistantRepeatButton}">
|
||||||
|
<Path
|
||||||
|
Name="ArrowRight"
|
||||||
|
Data="M1.81,7 C1.81,7 0,7 0,7 C0,7 3.18,3.5 3.18,3.5 C3.18,3.5 0,0 0,0 C0,0 1.81,0 1.81,0 C1.81,0 5,3.5 5,3.5 C5,3.5 1.81,7 1.81,7"
|
||||||
|
Stretch="Uniform"
|
||||||
|
Margin="3"
|
||||||
|
Fill="{DynamicResource ScrollBarArrowColor}" />
|
||||||
|
</RepeatButton>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<MultiDataTrigger>
|
||||||
|
<MultiDataTrigger.Conditions>
|
||||||
|
<Condition
|
||||||
|
Value="true"
|
||||||
|
Binding="{Binding ElementName=PART_LineRightButton, Path=IsMouseOver}" />
|
||||||
|
<Condition
|
||||||
|
Value="true"
|
||||||
|
Binding="{Binding ElementName=PART_LineRightButton, Path=IsPressed}" />
|
||||||
|
</MultiDataTrigger.Conditions>
|
||||||
|
<Setter
|
||||||
|
TargetName="ArrowRight"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarArrowClicked}" />
|
||||||
|
</MultiDataTrigger>
|
||||||
|
<MultiDataTrigger>
|
||||||
|
<MultiDataTrigger.Conditions>
|
||||||
|
<Condition
|
||||||
|
Value="true"
|
||||||
|
Binding="{Binding ElementName=PART_LineLeftButton, Path=IsMouseOver}" />
|
||||||
|
<Condition
|
||||||
|
Value="true"
|
||||||
|
Binding="{Binding ElementName=PART_LineLeftButton, Path=IsPressed}" />
|
||||||
|
</MultiDataTrigger.Conditions>
|
||||||
|
<Setter
|
||||||
|
TargetName="ArrowLeft"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarArrowClicked}" />
|
||||||
|
</MultiDataTrigger>
|
||||||
|
<MultiDataTrigger>
|
||||||
|
<MultiDataTrigger.Conditions>
|
||||||
|
<Condition
|
||||||
|
Value="true"
|
||||||
|
Binding="{Binding ElementName=PART_LineRightButton, Path=IsMouseOver}" />
|
||||||
|
<Condition
|
||||||
|
Value="false"
|
||||||
|
Binding="{Binding ElementName=PART_LineRightButton, Path=IsPressed}" />
|
||||||
|
</MultiDataTrigger.Conditions>
|
||||||
|
<Setter
|
||||||
|
TargetName="ArrowRight"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarArrowHovered}" />
|
||||||
|
</MultiDataTrigger>
|
||||||
|
<MultiDataTrigger>
|
||||||
|
<MultiDataTrigger.Conditions>
|
||||||
|
<Condition
|
||||||
|
Value="true"
|
||||||
|
Binding="{Binding ElementName=PART_LineLeftButton, Path=IsMouseOver}" />
|
||||||
|
<Condition
|
||||||
|
Value="false"
|
||||||
|
Binding="{Binding ElementName=PART_LineLeftButton, Path=IsPressed}" />
|
||||||
|
</MultiDataTrigger.Conditions>
|
||||||
|
<Setter
|
||||||
|
TargetName="ArrowLeft"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarArrowHovered}" />
|
||||||
|
</MultiDataTrigger>
|
||||||
|
<Trigger
|
||||||
|
Property="IsEnabled"
|
||||||
|
Value="False">
|
||||||
|
<Setter
|
||||||
|
TargetName="ArrowLeft"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarDisabled}" />
|
||||||
|
<Setter
|
||||||
|
TargetName="ArrowRight"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarDisabled}" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</ResourceDictionary>
|
45
ModAssistant/Styles/Thumb.xaml
Normal file
45
ModAssistant/Styles/Thumb.xaml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<Style
|
||||||
|
TargetType="{x:Type Thumb}"
|
||||||
|
x:Key="ModAssistantThumb">
|
||||||
|
<Setter
|
||||||
|
Property="FrameworkElement.OverridesDefaultStyle"
|
||||||
|
Value="True" />
|
||||||
|
<Setter
|
||||||
|
Property="IsTabStop"
|
||||||
|
Value="False" />
|
||||||
|
<Setter
|
||||||
|
Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate
|
||||||
|
TargetType="{x:Type Thumb}">
|
||||||
|
<Rectangle
|
||||||
|
Name="rectangle"
|
||||||
|
SnapsToDevicePixels="True"
|
||||||
|
Height="{TemplateBinding Height}"
|
||||||
|
Width="{TemplateBinding Width}"
|
||||||
|
Fill="{DynamicResource ScrollBarHandle}" />
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger
|
||||||
|
Property="UIElement.IsMouseOver"
|
||||||
|
Value="True">
|
||||||
|
<Setter
|
||||||
|
TargetName="rectangle"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarHandleHovered}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger
|
||||||
|
Property="Thumb.IsDragging"
|
||||||
|
Value="True">
|
||||||
|
<Setter
|
||||||
|
TargetName="rectangle"
|
||||||
|
Property="Fill"
|
||||||
|
Value="{DynamicResource ScrollBarHandleClick}" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</ResourceDictionary>
|
|
@ -13,7 +13,7 @@
|
||||||
<Color x:Key="StandardIcon">#AEAEAE</Color>
|
<Color x:Key="StandardIcon">#AEAEAE</Color>
|
||||||
|
|
||||||
<!-- Default Text -->
|
<!-- Default Text -->
|
||||||
<SolidColorBrush x:Key="TextColor" Color="{StaticResource ResourceKey=StandardContent}" />
|
<SolidColorBrush x:Key="TextColor" Color="{DynamicResource ResourceKey=StandardContent}" />
|
||||||
<SolidColorBrush x:Key="TextHighlighted" Color="White" />
|
<SolidColorBrush x:Key="TextHighlighted" Color="White" />
|
||||||
|
|
||||||
<!-- Buttons (Info/Mods/About/Options as well as More Info and Install/Update) -->
|
<!-- Buttons (Info/Mods/About/Options as well as More Info and Install/Update) -->
|
||||||
|
@ -56,9 +56,22 @@
|
||||||
<SolidColorBrush x:Key="CheckboxDisabledTickColor" Color="#66FFFFFF" />
|
<SolidColorBrush x:Key="CheckboxDisabledTickColor" Color="#66FFFFFF" />
|
||||||
<SolidColorBrush x:Key="CheckboxHoveredBackground" Color="#696969" />
|
<SolidColorBrush x:Key="CheckboxHoveredBackground" Color="#696969" />
|
||||||
<SolidColorBrush x:Key="CheckboxHoveredTickColor" Color="White" />
|
<SolidColorBrush x:Key="CheckboxHoveredTickColor" Color="White" />
|
||||||
<SolidColorBrush x:Key="CheckboxTickColor" Color="{StaticResource ResourceKey=StandardContent}" />
|
<SolidColorBrush x:Key="CheckboxTickColor" Color="{DynamicResource ResourceKey=StandardContent}" />
|
||||||
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="#FFBFBFBF" />
|
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="#FFBFBFBF" />
|
||||||
|
|
||||||
|
<!-- Scroll Bars -->
|
||||||
|
<SolidColorBrush x:Key="ScrollBarBackground" Color="{DynamicResource ResourceKey=StandardSecondary}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarBorder" Color="{DynamicResource ResourceKey=StandardBorder}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarTextColor" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarDisabled" Color="{DynamicResource ResourceKey=StandardSecondary}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarArrowColor" Color="{DynamicResource ResourceKey=StandardActive}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarArrowClicked" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarArrowHovered" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarHandle" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarHandleHovered" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarHandleClick" Color="{DynamicResource ResourceKey=StandardBorder}"/>
|
||||||
|
<GridLength x:Key="ScrollBarButtonHeight">0</GridLength>
|
||||||
|
|
||||||
<!-- Various important elements that need to be controlled independently -->
|
<!-- Various important elements that need to be controlled independently -->
|
||||||
<SolidColorBrush x:Key="ModAssistantBackground" Color="{DynamicResource ResourceKey=StandardSecondary}" />
|
<SolidColorBrush x:Key="ModAssistantBackground" Color="{DynamicResource ResourceKey=StandardSecondary}" />
|
||||||
<SolidColorBrush x:Key="FrameBackgroundColor" Color="#CC0F0F0F"/>
|
<SolidColorBrush x:Key="FrameBackgroundColor" Color="#CC0F0F0F"/>
|
||||||
|
|
|
@ -49,6 +49,19 @@
|
||||||
<SolidColorBrush x:Key="CheckboxTickColor" Color="White"/>
|
<SolidColorBrush x:Key="CheckboxTickColor" Color="White"/>
|
||||||
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="#FFFF80FF"/>
|
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="#FFFF80FF"/>
|
||||||
|
|
||||||
|
<!-- Scroll Bars -->
|
||||||
|
<SolidColorBrush x:Key="ScrollBarBackground" Color="#FFFFE9FF"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarBorder" Color="Black"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarTextColor" Color="Black"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarDisabled" Color="#FFBF95C5"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarArrowColor" Color="#FFF9AEF9"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarArrowClicked" Color="#FFEB6CFF"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarArrowHovered" Color="#FFFF91EB"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarHandle" Color="#FFF19AFF"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarHandleHovered" Color="#FFEC72FF"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarHandleClick" Color="#FFF744FF"/>
|
||||||
|
<GridLength x:Key="ScrollBarButtonHeight">0</GridLength>
|
||||||
|
|
||||||
<!-- Various important elements that need to be controlled independently -->
|
<!-- Various important elements that need to be controlled independently -->
|
||||||
<SolidColorBrush x:Key="ModAssistantBackground" Color="#FFFAE5FF"/>
|
<SolidColorBrush x:Key="ModAssistantBackground" Color="#FFFAE5FF"/>
|
||||||
<SolidColorBrush x:Key="FrameBackgroundColor" Color="#CCFAE5FF"/>
|
<SolidColorBrush x:Key="FrameBackgroundColor" Color="#CCFAE5FF"/>
|
||||||
|
|
|
@ -55,9 +55,22 @@
|
||||||
<SolidColorBrush x:Key="CheckboxDisabledTickColor" Color="#DDD" />
|
<SolidColorBrush x:Key="CheckboxDisabledTickColor" Color="#DDD" />
|
||||||
<SolidColorBrush x:Key="CheckboxHoveredBackground" Color="#909090" />
|
<SolidColorBrush x:Key="CheckboxHoveredBackground" Color="#909090" />
|
||||||
<SolidColorBrush x:Key="CheckboxHoveredTickColor" Color="White" />
|
<SolidColorBrush x:Key="CheckboxHoveredTickColor" Color="White" />
|
||||||
<SolidColorBrush x:Key="CheckboxTickColor" Color="{StaticResource ResourceKey=StandardContent}" />
|
<SolidColorBrush x:Key="CheckboxTickColor" Color="{DynamicResource ResourceKey=StandardContent}" />
|
||||||
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="#FFBFBFBF" />
|
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="#FFBFBFBF" />
|
||||||
|
|
||||||
|
<!-- Scroll Bars -->
|
||||||
|
<SolidColorBrush x:Key="ScrollBarBackground" Color="#FFD8D8D8"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarBorder" Color="{DynamicResource ResourceKey=StandardBorder}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarTextColor" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarDisabled" Color="{DynamicResource ResourceKey=StandardSecondary}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarArrowColor" Color="{DynamicResource ResourceKey=StandardActive}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarArrowClicked" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarArrowHovered" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarHandle" Color="#FF9B9B9B"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarHandleHovered" Color="#FFB9B9B9"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarHandleClick" Color="White"/>
|
||||||
|
<GridLength x:Key="ScrollBarButtonHeight">0</GridLength>
|
||||||
|
|
||||||
<!-- Various important elements that need to be controlled independently -->
|
<!-- Various important elements that need to be controlled independently -->
|
||||||
<SolidColorBrush x:Key="ModAssistantBackground" Color="{DynamicResource ResourceKey=StandardSecondary}" />
|
<SolidColorBrush x:Key="ModAssistantBackground" Color="{DynamicResource ResourceKey=StandardSecondary}" />
|
||||||
<SolidColorBrush x:Key="FrameBackgroundColor" Color="#CCF3F3F3"/>
|
<SolidColorBrush x:Key="FrameBackgroundColor" Color="#CCF3F3F3"/>
|
||||||
|
|
|
@ -73,6 +73,19 @@
|
||||||
<SolidColorBrush x:Key="CheckboxTickColor" Color="{DynamicResource ResourceKey=StandardIcon}"/>
|
<SolidColorBrush x:Key="CheckboxTickColor" Color="{DynamicResource ResourceKey=StandardIcon}"/>
|
||||||
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="{DynamicResource ResourceKey=StandardActive}"/>
|
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="{DynamicResource ResourceKey=StandardActive}"/>
|
||||||
|
|
||||||
|
<!-- Scroll Bars -->
|
||||||
|
<SolidColorBrush x:Key="ScrollBarBackground" Color="{DynamicResource ResourceKey=StandardSecondary}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarBorder" Color="{DynamicResource ResourceKey=StandardBorder}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarTextColor" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarDisabled" Color="{DynamicResource ResourceKey=StandardSecondary}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarArrowColor" Color="{DynamicResource ResourceKey=StandardActive}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarArrowClicked" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarArrowHovered" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarHandle" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarHandleHovered" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
|
||||||
|
<SolidColorBrush x:Key="ScrollBarHandleClick" Color="{DynamicResource ResourceKey=StandardBorder}"/>
|
||||||
|
<GridLength x:Key="ScrollBarButtonHeight">0</GridLength>
|
||||||
|
|
||||||
<!-- Various important elements that need to be controlled independently -->
|
<!-- Various important elements that need to be controlled independently -->
|
||||||
<SolidColorBrush x:Key="ModAssistantBackground" Color="{DynamicResource ResourceKey=StandardIcon}"/>
|
<SolidColorBrush x:Key="ModAssistantBackground" Color="{DynamicResource ResourceKey=StandardIcon}"/>
|
||||||
<SolidColorBrush x:Key="FrameBackgroundColor" Color="#CCFF51B6"/>
|
<SolidColorBrush x:Key="FrameBackgroundColor" Color="#CCFF51B6"/>
|
||||||
|
|
Loading…
Reference in a new issue