mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-06-29 03:20:18 +12:00
Merge pull request #8 from lolPants/feature/themes-rework
Themes Refactor
This commit is contained in:
commit
1f643e2a88
|
@ -1,4 +1,4 @@
|
||||||
<Application x:Class="ModAssistant.App"
|
<Application x:Class="ModAssistant.App"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
DispatcherUnhandledException="Application_DispatcherUnhandledException"
|
DispatcherUnhandledException="Application_DispatcherUnhandledException"
|
||||||
|
@ -11,7 +11,10 @@
|
||||||
<!-- Swapped i88n Definitions -->
|
<!-- Swapped i88n Definitions -->
|
||||||
<ResourceDictionary Source="Localisation/en-US.xaml" />
|
<ResourceDictionary Source="Localisation/en-US.xaml" />
|
||||||
|
|
||||||
<!-- Load default theme. Currently it's Dark, not sure if you want to change it to Light. -->
|
<!-- Load default Scrollbar theme, in case LoadedTheme doesn't have Scrollbar properties applied. -->
|
||||||
|
<ResourceDictionary x:Name="DefaultSidebarTheme" Source="Themes/Default Scrollbar.xaml"/>
|
||||||
|
|
||||||
|
<!-- Load theme to be modified via the Theme engine. -->
|
||||||
<ResourceDictionary x:Name="LoadedTheme" Source="Themes/Dark.xaml"/>
|
<ResourceDictionary x:Name="LoadedTheme" Source="Themes/Dark.xaml"/>
|
||||||
|
|
||||||
<!-- Load SVG icons, courtesy of lolPants. -->
|
<!-- Load SVG icons, courtesy of lolPants. -->
|
||||||
|
@ -28,6 +31,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>
|
||||||
|
|
|
@ -15,14 +15,22 @@ namespace ModAssistant
|
||||||
{
|
{
|
||||||
public class Themes
|
public class Themes
|
||||||
{
|
{
|
||||||
public static string LoadedTheme { get; private set; } //Currently loaded theme
|
public static string LoadedTheme { get; private set; }
|
||||||
public static List<string> LoadedThemes { get => loadedThemes.Keys.ToList(); } //String of themes that can be loaded
|
public static List<string> LoadedThemes { get => loadedThemes.Keys.ToList(); }
|
||||||
public static string ThemeDirectory => $"{Environment.CurrentDirectory}/Themes"; //Self explanatory.
|
public static string ThemeDirectory => $"{Environment.CurrentDirectory}/Themes";
|
||||||
|
|
||||||
//Local dictionary of ResourceDictionarys mapped by their names.
|
/// <summary>
|
||||||
private static Dictionary<string, ResourceDictionary> loadedThemes = new Dictionary<string, ResourceDictionary>();
|
/// Local dictionary of Resource Dictionaries mapped by their names.
|
||||||
private static Dictionary<string, Waifus> loadedWaifus = new Dictionary<string, Waifus>();
|
/// </summary>
|
||||||
private static List<string> preInstalledThemes = new List<string> { "Light", "Dark", "Light Pink" }; //These themes will always be available to use.
|
private static Dictionary<string, Theme> loadedThemes = new Dictionary<string, Theme>();
|
||||||
|
private static List<string> preInstalledThemes = new List<string> { "Light", "Dark", "Light Pink" };
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Index of "LoadedTheme" in App.xaml
|
||||||
|
/// </summary>
|
||||||
|
private static readonly int LOADED_THEME_INDEX = 3;
|
||||||
|
|
||||||
|
private static List<string> supportedVideoExtensions = new List<string>() { ".mp4", ".webm", ".mkv", ".avi", ".m2ts" };
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load all themes from local Themes subfolder and from embedded resources.
|
/// Load all themes from local Themes subfolder and from embedded resources.
|
||||||
|
@ -31,46 +39,53 @@ namespace ModAssistant
|
||||||
public static void LoadThemes()
|
public static void LoadThemes()
|
||||||
{
|
{
|
||||||
loadedThemes.Clear();
|
loadedThemes.Clear();
|
||||||
loadedWaifus.Clear();
|
|
||||||
if (Directory.Exists(ThemeDirectory)) //Load themes from Themes subfolder if it exists.
|
/*
|
||||||
|
* Begin by loading local themes. We should always load these first.
|
||||||
|
* I am doing loading here to prevent the LoadTheme function from becoming too crazy.
|
||||||
|
*/
|
||||||
|
foreach (string localTheme in preInstalledThemes)
|
||||||
|
{
|
||||||
|
string location = $"Themes/{localTheme}.xaml";
|
||||||
|
Uri local = new Uri(location, UriKind.Relative);
|
||||||
|
|
||||||
|
ResourceDictionary localDictionary = new ResourceDictionary();
|
||||||
|
localDictionary.Source = local;
|
||||||
|
|
||||||
|
Theme theme = new Theme(localTheme, localDictionary);
|
||||||
|
loadedThemes.Add(localTheme, theme);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load themes from Themes subfolder if it exists.
|
||||||
|
if (Directory.Exists(ThemeDirectory))
|
||||||
{
|
{
|
||||||
foreach (string file in Directory.EnumerateFiles(ThemeDirectory))
|
foreach (string file in Directory.EnumerateFiles(ThemeDirectory))
|
||||||
{
|
{
|
||||||
FileInfo info = new FileInfo(file);
|
FileInfo info = new FileInfo(file);
|
||||||
//FileInfo includes the extension in its Name field, so we have to select only the actual name.
|
|
||||||
string name = Path.GetFileNameWithoutExtension(info.Name);
|
string name = Path.GetFileNameWithoutExtension(info.Name);
|
||||||
//Ignore Themes without the xaml extension and ignore themes with the same names as others.
|
|
||||||
//If requests are made I can instead make a Theme class that splits the pre-installed themes from
|
if (info.Extension.ToLower().Equals(".mat"))
|
||||||
//user-made ones so that one more user-made Light/Dark theme can be added.
|
|
||||||
if (info.Extension.ToLower().Equals(".xaml") && !loadedThemes.ContainsKey(name))
|
|
||||||
{
|
{
|
||||||
ResourceDictionary theme = LoadTheme(name);
|
Theme theme = LoadZipTheme(ThemeDirectory, name, ".mat");
|
||||||
if (theme != null)
|
if (theme is null) continue;
|
||||||
{
|
|
||||||
loadedThemes.Add(name, theme);
|
AddOrModifyTheme(name, theme);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach (string file in Directory.EnumerateFiles(ThemeDirectory))
|
|
||||||
|
// Finally load any loose theme files in subfolders.
|
||||||
|
foreach (string directory in Directory.EnumerateDirectories(ThemeDirectory))
|
||||||
{
|
{
|
||||||
FileInfo info = new FileInfo(file);
|
string name = directory.Split('\\').Last();
|
||||||
string name = Path.GetFileNameWithoutExtension(info.Name);
|
Theme theme = LoadTheme(directory, name);
|
||||||
//Look for zip files with ".mat" extension.
|
|
||||||
if (info.Extension.ToLower().Equals(".mat") && !loadedThemes.ContainsKey(name))
|
if (theme is null) continue;
|
||||||
{
|
AddOrModifyTheme(name, theme);
|
||||||
LoadZipTheme(ThemeDirectory, name, ".mat");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach (string localTheme in preInstalledThemes) //Load local themes (Light and Dark)
|
|
||||||
{
|
// Refresh Themes dropdown in Options screen.
|
||||||
if (!loadedThemes.ContainsKey(localTheme))
|
if (Options.Instance != null && Options.Instance.ApplicationThemeComboBox != null)
|
||||||
{
|
|
||||||
ResourceDictionary theme = LoadTheme(localTheme, true);
|
|
||||||
loadedThemes.Add(localTheme, theme);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Options.Instance != null && Options.Instance.ApplicationThemeComboBox != null) //Refresh Themes dropdown in Options screen.
|
|
||||||
{
|
{
|
||||||
Options.Instance.ApplicationThemeComboBox.ItemsSource = LoadedThemes;
|
Options.Instance.ApplicationThemeComboBox.ItemsSource = LoadedThemes;
|
||||||
Options.Instance.ApplicationThemeComboBox.SelectedIndex = LoadedThemes.IndexOf(LoadedTheme);
|
Options.Instance.ApplicationThemeComboBox.SelectedIndex = LoadedThemes.IndexOf(LoadedTheme);
|
||||||
|
@ -88,6 +103,7 @@ namespace ModAssistant
|
||||||
Themes.ApplyWindowsTheme();
|
Themes.ApplyWindowsTheme();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Themes.ApplyTheme(savedTheme, false);
|
Themes.ApplyTheme(savedTheme, false);
|
||||||
|
@ -106,18 +122,44 @@ namespace ModAssistant
|
||||||
/// <param name="sendMessage">Send message to MainText (default: true).</param>
|
/// <param name="sendMessage">Send message to MainText (default: true).</param>
|
||||||
public static void ApplyTheme(string theme, bool sendMessage = true)
|
public static void ApplyTheme(string theme, bool sendMessage = true)
|
||||||
{
|
{
|
||||||
if (loadedThemes.TryGetValue(theme, out ResourceDictionary newTheme))
|
if (loadedThemes.TryGetValue(theme, out Theme newTheme))
|
||||||
{
|
{
|
||||||
Application.Current.Resources.MergedDictionaries.RemoveAt(2); //We might want to change this to a static integer or search by name.
|
|
||||||
LoadedTheme = theme;
|
LoadedTheme = theme;
|
||||||
Application.Current.Resources.MergedDictionaries.Insert(2, newTheme); //Insert our new theme into the same spot as last time.
|
MainWindow.Instance.BackgroundVideo.Pause();
|
||||||
|
MainWindow.Instance.BackgroundVideo.Visibility = Visibility.Hidden;
|
||||||
|
|
||||||
|
if (newTheme.ThemeDictionary != null)
|
||||||
|
{
|
||||||
|
// TODO: Search by name
|
||||||
|
Application.Current.Resources.MergedDictionaries.RemoveAt(LOADED_THEME_INDEX);
|
||||||
|
Application.Current.Resources.MergedDictionaries.Insert(LOADED_THEME_INDEX, newTheme.ThemeDictionary);
|
||||||
|
}
|
||||||
|
|
||||||
Properties.Settings.Default.SelectedTheme = theme;
|
Properties.Settings.Default.SelectedTheme = theme;
|
||||||
Properties.Settings.Default.Save();
|
Properties.Settings.Default.Save();
|
||||||
|
|
||||||
if (sendMessage)
|
if (sendMessage)
|
||||||
{
|
{
|
||||||
MainWindow.Instance.MainText = string.Format((string)Application.Current.FindResource("Themes:ThemeSet"), theme);
|
MainWindow.Instance.MainText = string.Format((string)Application.Current.FindResource("Themes:ThemeSet"), theme);
|
||||||
}
|
}
|
||||||
LoadWaifus(theme);
|
|
||||||
|
ApplyWaifus();
|
||||||
|
|
||||||
|
if (File.Exists(newTheme.VideoLocation))
|
||||||
|
{
|
||||||
|
Uri videoUri = new Uri(newTheme.VideoLocation, UriKind.Absolute);
|
||||||
|
MainWindow.Instance.BackgroundVideo.Visibility = Visibility.Visible;
|
||||||
|
|
||||||
|
// Load the source video if it's not the same as what's playing, or if the theme is loading for the first time.
|
||||||
|
if (!sendMessage || MainWindow.Instance.BackgroundVideo.Source?.AbsoluteUri != videoUri.AbsoluteUri)
|
||||||
|
{
|
||||||
|
MainWindow.Instance.BackgroundVideo.Stop();
|
||||||
|
MainWindow.Instance.BackgroundVideo.Source = videoUri;
|
||||||
|
}
|
||||||
|
|
||||||
|
MainWindow.Instance.BackgroundVideo.Play();
|
||||||
|
}
|
||||||
|
|
||||||
ReloadIcons();
|
ReloadIcons();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -127,26 +169,24 @@ namespace ModAssistant
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes a local theme to disk. You cannot write a theme loaded from the Themes subfolder to disk.
|
/// Writes an Embedded Resource theme to disk. You cannot write an outside theme to disk.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="themeName">Name of local theme.</param>
|
/// <param name="themeName">Name of local theme.</param>
|
||||||
public static void WriteThemeToDisk(string themeName)
|
public static void WriteThemeToDisk(string themeName)
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(ThemeDirectory))
|
Directory.CreateDirectory(ThemeDirectory);
|
||||||
{
|
Directory.CreateDirectory($"{ThemeDirectory}\\{themeName}");
|
||||||
Directory.CreateDirectory(ThemeDirectory);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!File.Exists($@"{ThemeDirectory}\\{themeName}.xaml"))
|
if (File.Exists($@"{ThemeDirectory}\\{themeName}.xaml") == false)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Light Pink theme is set to build as an Embedded Resource instead of the default Page.
|
* Any theme that you want to write must be set as an Embedded Resource instead of the default Page.
|
||||||
* This is so that we can grab its exact content from Manifest, shown below.
|
* This is so that we can grab its exact content from Manifest, shown below.
|
||||||
* Writing it as is instead of using XAMLWriter keeps the source as is with comments, spacing, and organization.
|
* Writing it as is instead of using XAMLWriter keeps the source as is with comments, spacing, and organization.
|
||||||
* Using XAMLWriter would compress it into an unorganized mess.
|
* Using XAMLWriter would compress it into an unorganized mess.
|
||||||
*/
|
*/
|
||||||
using (Stream s = Assembly.GetExecutingAssembly().GetManifestResourceStream($"ModAssistant.Themes.{themeName}.xaml"))
|
using (Stream s = Assembly.GetExecutingAssembly().GetManifestResourceStream($"ModAssistant.Themes.{themeName}.xaml"))
|
||||||
using (FileStream writer = new FileStream($@"{ThemeDirectory}\\{themeName}.xaml", FileMode.Create))
|
using (FileStream writer = new FileStream($@"{ThemeDirectory}\\{themeName}\\{themeName}.xaml", FileMode.Create))
|
||||||
{
|
{
|
||||||
byte[] buffer = new byte[s.Length];
|
byte[] buffer = new byte[s.Length];
|
||||||
int read = s.Read(buffer, 0, (int)s.Length);
|
int read = s.Read(buffer, 0, (int)s.Length);
|
||||||
|
@ -180,39 +220,102 @@ namespace ModAssistant
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplyTheme("Light", false);
|
ApplyTheme("Light", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Loads a ResourceDictionary from either Embedded Resources or from a file location.
|
/// Loads a Theme from a directory location.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">ResourceDictionary file name.</param>
|
/// <param name="directory">The full directory path to the theme.</param>
|
||||||
/// <param name="localUri">Specifies whether or not to search locally or in the Themes subfolder.</param>
|
/// <param name="name">Name of the containing folder.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private static ResourceDictionary LoadTheme(string name, bool localUri = false)
|
private static Theme LoadTheme(string directory, string name)
|
||||||
{
|
{
|
||||||
string location = $"{Environment.CurrentDirectory}/Themes/{name}.xaml";
|
Theme theme = new Theme(name, null);
|
||||||
if (!File.Exists(location) && !localUri) //Return null if we're looking for an item in the Themes subfolder that doesn't exist.
|
theme.Waifus = new Waifus();
|
||||||
|
|
||||||
|
foreach (string file in Directory.EnumerateFiles(directory).OrderBy(x => x))
|
||||||
{
|
{
|
||||||
return null;
|
FileInfo info = new FileInfo(file);
|
||||||
|
bool isPng = info.Name.EndsWith(".png", StringComparison.OrdinalIgnoreCase);
|
||||||
|
bool isSidePng = info.Name.EndsWith(".side.png", StringComparison.OrdinalIgnoreCase);
|
||||||
|
bool isXaml = info.Name.EndsWith(".xaml", StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
|
if (isPng && !isSidePng)
|
||||||
|
{
|
||||||
|
theme.Waifus.Background = new BitmapImage(new Uri(info.FullName));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isSidePng)
|
||||||
|
{
|
||||||
|
theme.Waifus.Sidebar = new BitmapImage(new Uri(info.FullName));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isXaml)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Uri resourceSource = new Uri(info.FullName);
|
||||||
|
ResourceDictionary dictionary = new ResourceDictionary();
|
||||||
|
dictionary.Source = resourceSource;
|
||||||
|
theme.ThemeDictionary = dictionary;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
string message = string.Format((string)Application.Current.FindResource("Themes:FailedToLoadXaml"), name, ex.Message);
|
||||||
|
MessageBox.Show(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportedVideoExtensions.Contains(info.Extension))
|
||||||
|
{
|
||||||
|
if (info.Name != $"_{name}{info.Extension}" || theme.VideoLocation is null)
|
||||||
|
{
|
||||||
|
theme.VideoLocation = info.FullName;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (localUri) //Change the location of the theme since we're not looking in a directory but rather in ModAssistant itself.
|
|
||||||
|
return theme;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Modifies an already existing theme, or adds the theme if it doesn't exist
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">Name of the theme.</param>
|
||||||
|
/// <param name="theme">Theme to modify/apply</param>
|
||||||
|
private static void AddOrModifyTheme(string name, Theme theme)
|
||||||
|
{
|
||||||
|
if (loadedThemes.TryGetValue(name, out _))
|
||||||
{
|
{
|
||||||
location = $"Themes/{name}.xaml";
|
if (theme.ThemeDictionary != null)
|
||||||
|
{
|
||||||
|
loadedThemes[name].ThemeDictionary = theme.ThemeDictionary;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (theme.Waifus?.Background != null)
|
||||||
|
{
|
||||||
|
if (loadedThemes[name].Waifus is null) loadedThemes[name].Waifus = new Waifus();
|
||||||
|
loadedThemes[name].Waifus.Background = theme.Waifus.Background;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (theme.Waifus?.Sidebar != null)
|
||||||
|
{
|
||||||
|
if (loadedThemes[name].Waifus is null) loadedThemes[name].Waifus = new Waifus();
|
||||||
|
loadedThemes[name].Waifus.Sidebar = theme.Waifus.Sidebar;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(theme.VideoLocation))
|
||||||
|
{
|
||||||
|
loadedThemes[name].VideoLocation = theme.VideoLocation;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Uri uri = new Uri(location, localUri ? UriKind.Relative : UriKind.Absolute);
|
else
|
||||||
ResourceDictionary dictionary = new ResourceDictionary();
|
{
|
||||||
try
|
loadedThemes.Add(name, theme);
|
||||||
{
|
|
||||||
dictionary.Source = uri;
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
MessageBox.Show($"Could not load {name}.\n\n{ex.Message}\n\nIgnoring...");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return dictionary;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -221,46 +324,74 @@ namespace ModAssistant
|
||||||
/// <param name="directory">Theme directory</param>
|
/// <param name="directory">Theme directory</param>
|
||||||
/// <param name="name">Theme name</param>
|
/// <param name="name">Theme name</param>
|
||||||
/// <param name="extension">Theme extension</param>
|
/// <param name="extension">Theme extension</param>
|
||||||
private static void LoadZipTheme(string directory, string name, string extension)
|
private static Theme LoadZipTheme(string directory, string name, string extension)
|
||||||
{
|
{
|
||||||
if (!loadedWaifus.TryGetValue(name, out Waifus waifus))
|
Waifus waifus = new Waifus();
|
||||||
{
|
ResourceDictionary dictionary = null;
|
||||||
waifus = new Waifus();
|
|
||||||
loadedWaifus.Add(name, waifus);
|
|
||||||
}
|
|
||||||
|
|
||||||
using (FileStream stream = new FileStream(Path.Combine(directory, name + extension), FileMode.Open))
|
using (FileStream stream = new FileStream(Path.Combine(directory, name + extension), FileMode.Open))
|
||||||
using (ZipArchive archive = new ZipArchive(stream))
|
using (ZipArchive archive = new ZipArchive(stream))
|
||||||
{
|
{
|
||||||
foreach (ZipArchiveEntry file in archive.Entries)
|
foreach (ZipArchiveEntry file in archive.Entries)
|
||||||
{
|
{
|
||||||
if (file.Name.EndsWith(".png", StringComparison.OrdinalIgnoreCase) &&
|
bool isPng = file.Name.EndsWith(".png", StringComparison.OrdinalIgnoreCase);
|
||||||
!file.Name.EndsWith(".side.png", StringComparison.OrdinalIgnoreCase))
|
bool isSidePng = file.Name.EndsWith(".side.png", StringComparison.OrdinalIgnoreCase);
|
||||||
|
bool isXaml = file.Name.EndsWith(".xaml", StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
|
if (isPng && !isSidePng)
|
||||||
{
|
{
|
||||||
waifus.Background = GetImageFromStream(Utils.StreamToArray(file.Open()));
|
waifus.Background = GetImageFromStream(Utils.StreamToArray(file.Open()));
|
||||||
}
|
}
|
||||||
if (file.Name.EndsWith(".side.png", StringComparison.OrdinalIgnoreCase))
|
|
||||||
|
if (isSidePng)
|
||||||
{
|
{
|
||||||
waifus.Sidebar = GetImageFromStream(Utils.StreamToArray(file.Open()));
|
waifus.Sidebar = GetImageFromStream(Utils.StreamToArray(file.Open()));
|
||||||
}
|
}
|
||||||
if (file.Name.EndsWith(".xaml", StringComparison.OrdinalIgnoreCase))
|
|
||||||
|
string videoExtension = $".{file.Name.Split('.').Last()}";
|
||||||
|
if (supportedVideoExtensions.Contains(videoExtension))
|
||||||
{
|
{
|
||||||
if (!loadedThemes.ContainsKey(name))
|
string videoName = $"{ThemeDirectory}\\{name}\\_{name}{videoExtension}";
|
||||||
|
Directory.CreateDirectory($"{ThemeDirectory}\\{name}");
|
||||||
|
|
||||||
|
if (File.Exists(videoName) == false)
|
||||||
{
|
{
|
||||||
try
|
file.ExtractToFile(videoName, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Check to see if the lengths of each file are different. If they are, overwrite what currently exists.
|
||||||
|
* The reason we are also checking LoadedTheme against the name variable is to prevent overwriting a file that's
|
||||||
|
* already being used by ModAssistant and causing a System.IO.IOException.
|
||||||
|
*/
|
||||||
|
FileInfo existingInfo = new FileInfo(videoName);
|
||||||
|
if (existingInfo.Length != file.Length && LoadedTheme != name)
|
||||||
{
|
{
|
||||||
ResourceDictionary dictionary = (ResourceDictionary)XamlReader.Load(file.Open());
|
file.ExtractToFile(videoName, true);
|
||||||
loadedThemes.Add(name, dictionary);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
MessageBox.Show($"Could not load {name}.\n\n{ex.Message}\n\nIgnoring...");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isXaml && loadedThemes.ContainsKey(name) == false)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
dictionary = (ResourceDictionary)XamlReader.Load(file.Open());
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
string message = string.Format((string)Application.Current.FindResource("Themes:FailedToLoadXaml"), name, ex.Message);
|
||||||
|
MessageBox.Show(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadedWaifus[name] = waifus;
|
|
||||||
|
Theme theme = new Theme(name, dictionary);
|
||||||
|
theme.Waifus = waifus;
|
||||||
|
|
||||||
|
return theme;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -277,48 +408,38 @@ namespace ModAssistant
|
||||||
image.CacheOption = BitmapCacheOption.OnLoad;
|
image.CacheOption = BitmapCacheOption.OnLoad;
|
||||||
image.StreamSource = mStream;
|
image.StreamSource = mStream;
|
||||||
image.EndInit();
|
image.EndInit();
|
||||||
if (image.CanFreeze)
|
if (image.CanFreeze) image.Freeze();
|
||||||
image.Freeze();
|
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Applies waifus from Dictionary.
|
/// Applies waifus from currently loaded Theme.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="theme"></param>
|
private static void ApplyWaifus()
|
||||||
private static void ApplyWaifus(string theme)
|
|
||||||
{
|
{
|
||||||
loadedWaifus.TryGetValue(theme, out Waifus waifus);
|
Waifus waifus = loadedThemes[LoadedTheme].Waifus;
|
||||||
MainWindow.Instance.BackgroundImage.ImageSource = waifus.Background;
|
|
||||||
MainWindow.Instance.SideImage.Source = waifus.Sidebar;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
if (waifus?.Background is null)
|
||||||
/// Loads the waifus from the Themes folder or theme files if they exist.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="name">Theme's name.</param>
|
|
||||||
private static void LoadWaifus(string name)
|
|
||||||
{
|
|
||||||
string location = Path.Combine(Environment.CurrentDirectory, "Themes");
|
|
||||||
if (!loadedWaifus.TryGetValue(name, out Waifus waifus))
|
|
||||||
{
|
{
|
||||||
waifus = new Waifus();
|
MainWindow.Instance.BackgroundImage.Opacity = 0;
|
||||||
loadedWaifus.Add(name, waifus);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MainWindow.Instance.BackgroundImage.Opacity = 1;
|
||||||
|
MainWindow.Instance.BackgroundImage.ImageSource = waifus.Background;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (File.Exists(Path.Combine(location, name + ".png")))
|
if (waifus?.Sidebar is null)
|
||||||
{
|
{
|
||||||
waifus.Background = new BitmapImage(new Uri(Path.Combine(location, name + ".png")));
|
MainWindow.Instance.SideImage.Visibility = Visibility.Hidden;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (File.Exists(Path.Combine(location, name + ".side.png")))
|
|
||||||
{
|
{
|
||||||
waifus.Sidebar = new BitmapImage(new Uri(Path.Combine(location, name + ".side.png")));
|
MainWindow.Instance.SideImage.Visibility = Visibility.Visible;
|
||||||
|
MainWindow.Instance.SideImage.Source = waifus.Sidebar;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadedWaifus[name] = waifus;
|
|
||||||
ApplyWaifus(name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -342,7 +463,7 @@ namespace ModAssistant
|
||||||
/// <param name="DrawingGroupName">DrawingGroup name for the image.</param>
|
/// <param name="DrawingGroupName">DrawingGroup name for the image.</param>
|
||||||
private static void ChangeColor(ResourceDictionary icons, string ResourceColorName, string DrawingGroupName)
|
private static void ChangeColor(ResourceDictionary icons, string ResourceColorName, string DrawingGroupName)
|
||||||
{
|
{
|
||||||
Application.Current.Resources[ResourceColorName] = loadedThemes[LoadedTheme][ResourceColorName];
|
Application.Current.Resources[ResourceColorName] = loadedThemes[LoadedTheme].ThemeDictionary[ResourceColorName];
|
||||||
((GeometryDrawing)((DrawingGroup)icons[DrawingGroupName]).Children[0]).Brush = (Brush)Application.Current.Resources[ResourceColorName];
|
((GeometryDrawing)((DrawingGroup)icons[DrawingGroupName]).Children[0]).Brush = (Brush)Application.Current.Resources[ResourceColorName];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,5 +472,19 @@ namespace ModAssistant
|
||||||
public BitmapImage Background = null;
|
public BitmapImage Background = null;
|
||||||
public BitmapImage Sidebar = null;
|
public BitmapImage Sidebar = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class Theme
|
||||||
|
{
|
||||||
|
public string Name;
|
||||||
|
public ResourceDictionary ThemeDictionary;
|
||||||
|
public Waifus Waifus = null;
|
||||||
|
public string VideoLocation = null;
|
||||||
|
|
||||||
|
public Theme(string name, ResourceDictionary dictionary)
|
||||||
|
{
|
||||||
|
Name = name;
|
||||||
|
ThemeDictionary = dictionary;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,6 +150,7 @@
|
||||||
<sys:String x:Key="Themes:ThemeMissing">{0} Themes:ThemeMissing</sys:String>
|
<sys:String x:Key="Themes:ThemeMissing">{0} Themes:ThemeMissing</sys:String>
|
||||||
<sys:String x:Key="Themes:SavedTemplateTheme">Themes:SavedTemplateTheme {0}</sys:String>
|
<sys:String x:Key="Themes:SavedTemplateTheme">Themes:SavedTemplateTheme {0}</sys:String>
|
||||||
<sys:String x:Key="Themes:TemplateThemeExists">Themes:TemplateThemeExists</sys:String>
|
<sys:String x:Key="Themes:TemplateThemeExists">Themes:TemplateThemeExists</sys:String>
|
||||||
|
<sys:String x:Key="Themes:FailedToLoadXaml">Themes:FailedToLoadXaml {0} {1}</sys:String>
|
||||||
|
|
||||||
<!-- Updater Class -->
|
<!-- Updater Class -->
|
||||||
<sys:String x:Key="Updater:CheckFailed">Updater:CheckFailed</sys:String>
|
<sys:String x:Key="Updater:CheckFailed">Updater:CheckFailed</sys:String>
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
Please read the Beginners Guide on the
|
Please read the Beginners Guide on the
|
||||||
<Hyperlink NavigateUri="https://bsmg.wiki/beginners-guide" local:HyperlinkExtensions.IsExternal="True">
|
<Hyperlink NavigateUri="https://bsmg.wiki/beginners-guide" local:HyperlinkExtensions.IsExternal="True">
|
||||||
Wiki
|
Wiki
|
||||||
</Hyperlink>.
|
</Hyperlink> .
|
||||||
</Span>
|
</Span>
|
||||||
<sys:String x:Key="Intro:AgreeButton">I Agree</sys:String>
|
<sys:String x:Key="Intro:AgreeButton">I Agree</sys:String>
|
||||||
<sys:String x:Key="Intro:DisagreeButton">Disagree</sys:String>
|
<sys:String x:Key="Intro:DisagreeButton">Disagree</sys:String>
|
||||||
|
@ -170,8 +170,8 @@
|
||||||
<Bold>please purchase the game
|
<Bold>please purchase the game
|
||||||
<Hyperlink NavigateUri="https://beatgames.com/" local:HyperlinkExtensions.IsExternal="True">
|
<Hyperlink NavigateUri="https://beatgames.com/" local:HyperlinkExtensions.IsExternal="True">
|
||||||
HERE
|
HERE
|
||||||
</Hyperlink>.
|
</Hyperlink>
|
||||||
</Bold>
|
</Bold>.
|
||||||
</Span>
|
</Span>
|
||||||
<Span x:Key="Invalid:List:Line2">
|
<Span x:Key="Invalid:List:Line2">
|
||||||
If your copy of the game is
|
If your copy of the game is
|
||||||
|
@ -209,6 +209,7 @@
|
||||||
<sys:String x:Key="Themes:ThemeMissing">{0} does not exist.</sys:String>
|
<sys:String x:Key="Themes:ThemeMissing">{0} does not exist.</sys:String>
|
||||||
<sys:String x:Key="Themes:SavedTemplateTheme">Template theme "{0}" saved to Themes folder.</sys:String>
|
<sys:String x:Key="Themes:SavedTemplateTheme">Template theme "{0}" saved to Themes folder.</sys:String>
|
||||||
<sys:String x:Key="Themes:TemplateThemeExists">Template theme already exists!</sys:String>
|
<sys:String x:Key="Themes:TemplateThemeExists">Template theme already exists!</sys:String>
|
||||||
|
<sys:String x:Key="Themes:FailedToLoadXaml">Failed to load .xaml file for theme {0}: {1}</sys:String>
|
||||||
|
|
||||||
<!-- Updater Class -->
|
<!-- Updater Class -->
|
||||||
<sys:String x:Key="Updater:CheckFailed">Couldn't check for updates.</sys:String>
|
<sys:String x:Key="Updater:CheckFailed">Couldn't check for updates.</sys:String>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
xmlns:local="clr-namespace:ModAssistant"
|
xmlns:local="clr-namespace:ModAssistant"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Icon="Resources/icon.ico"
|
Icon="Resources/icon.ico"
|
||||||
Title="{DynamicResource MainWindow:WindowTitle}" Width="1280" Height="720"
|
Title="{DynamicResource MainWindow:WindowTitle}"
|
||||||
SizeChanged="Window_SizeChanged"
|
SizeChanged="Window_SizeChanged"
|
||||||
UIElement.PreviewMouseDown="Window_PreviewMouseDown">
|
UIElement.PreviewMouseDown="Window_PreviewMouseDown">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
@ -16,6 +16,7 @@
|
||||||
<ImageBrush x:Name="BackgroundImage" Stretch="{DynamicResource BackgroundImageStretch}"/>
|
<ImageBrush x:Name="BackgroundImage" Stretch="{DynamicResource BackgroundImageStretch}"/>
|
||||||
</Rectangle.Fill>
|
</Rectangle.Fill>
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
|
<MediaElement Visibility="Hidden" LoadedBehavior="Manual" Name="BackgroundVideo" MediaEnded="BackgroundVideo_MediaEnded"/>
|
||||||
<Image x:Name="SideImage" UseLayoutRounding="True" SnapsToDevicePixels="True" HorizontalAlignment="Left" VerticalAlignment="{DynamicResource SideImageYPosition}" Width="{Binding RelativeSource={RelativeSource Self}, Path=Source.PixelWidth}" Height="{Binding RelativeSource={RelativeSource Self}, Path=Source.PixelHeight}" Stretch="Fill"/>
|
<Image x:Name="SideImage" UseLayoutRounding="True" SnapsToDevicePixels="True" HorizontalAlignment="Left" VerticalAlignment="{DynamicResource SideImageYPosition}" Width="{Binding RelativeSource={RelativeSource Self}, Path=Source.PixelWidth}" Height="{Binding RelativeSource={RelativeSource Self}, Path=Source.PixelHeight}" Stretch="Fill"/>
|
||||||
<Grid Margin="10">
|
<Grid Margin="10">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
|
|
@ -39,6 +39,16 @@ namespace ModAssistant
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Instance = this;
|
Instance = this;
|
||||||
|
|
||||||
|
const int ContentWidth = 1280;
|
||||||
|
const int ContentHeight = 720;
|
||||||
|
|
||||||
|
double ChromeWidth = SystemParameters.WindowNonClientFrameThickness.Left + SystemParameters.WindowNonClientFrameThickness.Right;
|
||||||
|
double ChromeHeight = SystemParameters.WindowNonClientFrameThickness.Top + SystemParameters.WindowNonClientFrameThickness.Bottom;
|
||||||
|
double ResizeBorder = SystemParameters.ResizeFrameVerticalBorderWidth;
|
||||||
|
|
||||||
|
Width = ChromeWidth + ContentWidth + 2 * ResizeBorder;
|
||||||
|
Height = ChromeHeight + ContentHeight + 2 * ResizeBorder;
|
||||||
|
|
||||||
VersionText.Text = App.Version;
|
VersionText.Text = App.Version;
|
||||||
|
|
||||||
if (Utils.IsVoid())
|
if (Utils.IsVoid())
|
||||||
|
@ -303,5 +313,11 @@ namespace ModAssistant
|
||||||
Mods.Instance.RefreshColumns();
|
Mods.Instance.RefreshColumns();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void BackgroundVideo_MediaEnded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
BackgroundVideo.Position = TimeSpan.Zero;
|
||||||
|
BackgroundVideo.Play();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,230 +1,246 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProjectGuid>{6A224B82-40DA-40B3-94DC-EFBEC2BDDA39}</ProjectGuid>
|
<ProjectGuid>{6A224B82-40DA-40B3-94DC-EFBEC2BDDA39}</ProjectGuid>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<RootNamespace>ModAssistant</RootNamespace>
|
<RootNamespace>ModAssistant</RootNamespace>
|
||||||
<AssemblyName>ModAssistant</AssemblyName>
|
<AssemblyName>ModAssistant</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
|
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.IO.Compression" />
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.IO.Compression.FileSystem" />
|
<Reference Include="System.IO.Compression.FileSystem" />
|
||||||
<Reference Include="System.Management" />
|
<Reference Include="System.Management" />
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.Extensions" />
|
<Reference Include="System.Web.Extensions" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Xaml">
|
<Reference Include="System.Xaml">
|
||||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
<Reference Include="WindowsFormsIntegration" />
|
<Reference Include="WindowsFormsIntegration" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ApplicationDefinition Include="App.xaml">
|
<ApplicationDefinition Include="App.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
<Compile Include="Classes\Http.cs" />
|
<Compile Include="Classes\Http.cs" />
|
||||||
<Compile Include="Classes\HyperlinkExtensions.cs" />
|
<Compile Include="Classes\HyperlinkExtensions.cs" />
|
||||||
<Compile Include="Classes\Promotions.cs" />
|
<Compile Include="Classes\Promotions.cs" />
|
||||||
<Compile Include="Classes\Diagnostics.cs" />
|
<Compile Include="Classes\Diagnostics.cs" />
|
||||||
<Compile Include="Classes\Themes.cs" />
|
<Compile Include="Classes\Themes.cs" />
|
||||||
<Compile Include="Classes\Updater.cs" />
|
<Compile Include="Classes\Updater.cs" />
|
||||||
<Compile Include="Pages\Intro.xaml.cs">
|
<Compile Include="Pages\Intro.xaml.cs">
|
||||||
<DependentUpon>Intro.xaml</DependentUpon>
|
<DependentUpon>Intro.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Classes\Mod.cs" />
|
<Compile Include="Classes\Mod.cs" />
|
||||||
<Page Include="Localisation\en-US.xaml">
|
<Page Include="Localisation\en-US.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Localisation\en-DEBUG.xaml">
|
<Page Include="Localisation\en-DEBUG.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Compile Include="Pages\Invalid.xaml.cs">
|
<Compile Include="Pages\Invalid.xaml.cs">
|
||||||
<DependentUpon>Invalid.xaml</DependentUpon>
|
<DependentUpon>Invalid.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Pages\Loading.xaml.cs">
|
<Compile Include="Pages\Loading.xaml.cs">
|
||||||
<DependentUpon>Loading.xaml</DependentUpon>
|
<DependentUpon>Loading.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Pages\Mods.xaml.cs">
|
<Compile Include="Pages\Mods.xaml.cs">
|
||||||
<DependentUpon>Mods.xaml</DependentUpon>
|
<DependentUpon>Mods.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Pages\About.xaml.cs">
|
<Compile Include="Pages\About.xaml.cs">
|
||||||
<DependentUpon>About.xaml</DependentUpon>
|
<DependentUpon>About.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Classes\Utils.cs" />
|
<Compile Include="Classes\Utils.cs" />
|
||||||
<Page Include="Pages\Intro.xaml">
|
<Page Include="Pages\Intro.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="MainWindow.xaml">
|
<Page Include="MainWindow.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
<Compile Include="App.xaml.cs">
|
<Compile Include="App.xaml.cs">
|
||||||
<DependentUpon>App.xaml</DependentUpon>
|
<DependentUpon>App.xaml</DependentUpon>
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Classes\OneClickInstaller.cs" />
|
<Compile Include="Classes\OneClickInstaller.cs" />
|
||||||
<Compile Include="MainWindow.xaml.cs">
|
<Compile Include="MainWindow.xaml.cs">
|
||||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Page Include="Pages\Loading.xaml">
|
<Page Include="Pages\Loading.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Pages\Invalid.xaml">
|
<Page Include="Pages\Invalid.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Pages\Mods.xaml">
|
<Page Include="Pages\Mods.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Pages\About.xaml">
|
<Page Include="Pages\About.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Pages\Options.xaml">
|
<Page Include="Pages\Options.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Resources\Icons.xaml">
|
<Page Include="Resources\Icons.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Styles\Button.xaml">
|
<Page Include="Styles\Button.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Styles\CheckBox.xaml">
|
<Page Include="Styles\CheckBox.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Styles\ComboBox.xaml">
|
<Page Include="Styles\ComboBox.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Styles\ComboBoxItem.xaml">
|
<Page Include="Styles\ComboBoxItem.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Styles\GridViewColumnHeader.xaml">
|
<Page Include="Styles\GridViewColumnHeader.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Styles\Label.xaml">
|
<Page Include="Styles\Label.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Styles\ListView.xaml">
|
<Page Include="Styles\ListView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Styles\ListViewItem.xaml">
|
<Page Include="Styles\ListViewItem.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Styles\TextBlock.xaml">
|
<Page Include="Styles\RepeatButton.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Styles\ToggleButton.xaml">
|
<Page Include="Styles\ScrollBar.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Themes\Dark.xaml">
|
<Page Include="Styles\TextBlock.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Themes\Light.xaml">
|
<Page Include="Styles\Thumb.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Themes\Light Pink.xaml">
|
<Page Include="Styles\ToggleButton.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<EmbeddedResource Include="Themes\Ugly Kulu-Ya-Ku.xaml">
|
<Page Include="Themes\Dark.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</EmbeddedResource>
|
</Page>
|
||||||
</ItemGroup>
|
<Page Include="Themes\Default Scrollbar.xaml">
|
||||||
<ItemGroup>
|
<SubType>Designer</SubType>
|
||||||
<Compile Include="Pages\Options.xaml.cs">
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<DependentUpon>Options.xaml</DependentUpon>
|
</Page>
|
||||||
</Compile>
|
<Page Include="Themes\Light.xaml">
|
||||||
<Compile Include="Properties\AssemblyInfo.cs">
|
<SubType>Designer</SubType>
|
||||||
<SubType>Code</SubType>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Compile>
|
</Page>
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
<Page Include="Themes\Light Pink.xaml">
|
||||||
<AutoGen>True</AutoGen>
|
<SubType>Designer</SubType>
|
||||||
<DesignTime>True</DesignTime>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
</Page>
|
||||||
</Compile>
|
<EmbeddedResource Include="Themes\Ugly Kulu-Ya-Ku.xaml">
|
||||||
<Compile Include="Properties\Settings.Designer.cs">
|
<SubType>Designer</SubType>
|
||||||
<AutoGen>True</AutoGen>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
</EmbeddedResource>
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
</ItemGroup>
|
||||||
</Compile>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<Compile Include="Pages\Options.xaml.cs">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<DependentUpon>Options.xaml</DependentUpon>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
</Compile>
|
||||||
</EmbeddedResource>
|
<Compile Include="Properties\AssemblyInfo.cs">
|
||||||
<None Include="Properties\Settings.settings">
|
<SubType>Code</SubType>
|
||||||
<Generator>PublicSettingsSingleFileGenerator</Generator>
|
</Compile>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
</None>
|
<AutoGen>True</AutoGen>
|
||||||
</ItemGroup>
|
<DesignTime>True</DesignTime>
|
||||||
<ItemGroup>
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
<None Include="App.config" />
|
</Compile>
|
||||||
</ItemGroup>
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
<ItemGroup>
|
<AutoGen>True</AutoGen>
|
||||||
<Resource Include="Resources\icon.ico" />
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
</ItemGroup>
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
</Compile>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>PublicSettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\icon.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
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="#55FFFFFF"/>
|
||||||
|
<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"/>
|
||||||
|
@ -74,7 +87,9 @@
|
||||||
<SolidColorBrush x:Key="OptionsIconColor" Color="{DynamicResource ResourceKey=StandardIcon}" />
|
<SolidColorBrush x:Key="OptionsIconColor" Color="{DynamicResource ResourceKey=StandardIcon}" />
|
||||||
|
|
||||||
<!--Background and Side image settings.-->
|
<!--Background and Side image settings.-->
|
||||||
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch> <!-- Fill, None, Uniform, UniformToFill -->
|
<!-- Fill, None, Uniform, UniformToFill -->
|
||||||
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment> <!-- Bottom, Center, Top, Stretch -->
|
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch>
|
||||||
|
<!-- Bottom, Center, Top, Stretch -->
|
||||||
|
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
17
ModAssistant/Themes/Default Scrollbar.xaml
Normal file
17
ModAssistant/Themes/Default Scrollbar.xaml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<!-- This is a default theme for the Scrollbars, in case the provided Theme doesn't have them -->
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
</ResourceDictionary>
|
|
@ -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"/>
|
||||||
|
@ -62,7 +75,9 @@
|
||||||
<SolidColorBrush x:Key="OptionsIconColor" Color="White"/>
|
<SolidColorBrush x:Key="OptionsIconColor" Color="White"/>
|
||||||
|
|
||||||
<!-- Background and Side image settings. -->
|
<!-- Background and Side image settings. -->
|
||||||
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch> <!-- Fill, None, Uniform, UniformToFill -->
|
<!-- Fill, None, Uniform, UniformToFill -->
|
||||||
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment> <!-- Bottom, Center, Top, Stretch -->
|
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch>
|
||||||
|
<!-- Bottom, Center, Top, Stretch -->
|
||||||
|
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
|
@ -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="#55000000"/>
|
||||||
|
<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"/>
|
||||||
|
@ -72,8 +85,10 @@
|
||||||
<SolidColorBrush x:Key="AboutIconColor" Color="#FF0000" />
|
<SolidColorBrush x:Key="AboutIconColor" Color="#FF0000" />
|
||||||
<SolidColorBrush x:Key="OptionsIconColor" Color="#4E3BCE" />
|
<SolidColorBrush x:Key="OptionsIconColor" Color="#4E3BCE" />
|
||||||
|
|
||||||
<!--Background and Side image settings.-->
|
<!-- Background and Side image settings. -->
|
||||||
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch> <!-- Fill, None, Uniform, UniformToFill -->
|
<!-- Fill, None, Uniform, UniformToFill -->
|
||||||
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment> <!-- Bottom, Center, Top, Stretch -->
|
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch>
|
||||||
|
<!-- Bottom, Center, Top, Stretch -->
|
||||||
|
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
<SolidColorBrush x:Key="ModColumnBorderBrush" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
|
<SolidColorBrush x:Key="ModColumnBorderBrush" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
|
||||||
<SolidColorBrush x:Key="ModColumnHeaderHighlighted" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
|
<SolidColorBrush x:Key="ModColumnHeaderHighlighted" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
|
||||||
<SolidColorBrush x:Key="ModListBackground" Color="{DynamicResource ResourceKey=StandardPrimary}" />
|
<SolidColorBrush x:Key="ModListBackground" Color="{DynamicResource ResourceKey=StandardPrimary}" />
|
||||||
|
<SolidColorBrush x:Key="ModListBorderBrush" Color="{DynamicResource ResourceKey=StandardBorder}" />
|
||||||
<SolidColorBrush x:Key="ModListItemHighlighted" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
|
<SolidColorBrush x:Key="ModListItemHighlighted" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
|
||||||
<SolidColorBrush x:Key="ModListItemSelected" Color="{DynamicResource ResourceKey=StandardActive}"/>
|
<SolidColorBrush x:Key="ModListItemSelected" Color="{DynamicResource ResourceKey=StandardActive}"/>
|
||||||
|
|
||||||
|
@ -73,11 +74,26 @@
|
||||||
<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"/>
|
||||||
<SolidColorBrush x:Key="BottomStatusBarBackground" Color="#BF489A"/>
|
<SolidColorBrush x:Key="BottomStatusBarBackground" Color="#BF489A"/>
|
||||||
|
<SolidColorBrush x:Key="BottomStatusBarOutline" Color="{DynamicResource ResourceKey=StandardBorder}" />
|
||||||
<SolidColorBrush x:Key="DirectoryBackground" Color="#BF489A"/>
|
<SolidColorBrush x:Key="DirectoryBackground" Color="#BF489A"/>
|
||||||
|
<SolidColorBrush x:Key="DirectoryOutline" Color="{DynamicResource ResourceKey=StandardBorder}" />
|
||||||
|
|
||||||
<!-- Colors for the corresponding icons. -->
|
<!-- Colors for the corresponding icons. -->
|
||||||
<!-- Info Default: #0DCAC8 -->
|
<!-- Info Default: #0DCAC8 -->
|
||||||
|
@ -89,7 +105,10 @@
|
||||||
<!-- Options Default: #4E3BCE -->
|
<!-- Options Default: #4E3BCE -->
|
||||||
<SolidColorBrush x:Key="OptionsIconColor" Color="{DynamicResource ResourceKey=StandardIcon}"/>
|
<SolidColorBrush x:Key="OptionsIconColor" Color="{DynamicResource ResourceKey=StandardIcon}"/>
|
||||||
|
|
||||||
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch> <!-- Fill, None, Uniform, UniformToFill -->
|
<!-- Background and Side image settings. -->
|
||||||
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment> <!-- Bottom, Center, Top, Stretch -->
|
<!-- Fill, None, Uniform, UniformToFill -->
|
||||||
|
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch>
|
||||||
|
<!-- Bottom, Center, Top, Stretch -->
|
||||||
|
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
Loading…
Reference in a new issue