mirror of
https://github.com/SpaceTimee/Sheas-Cealer.git
synced 2025-07-14 05:12:09 +08:00
1.1.3 -> 1.1.4 第93次更新
This commit is contained in:
parent
1a08c65c0d
commit
bd73327fc0
@ -1,9 +1,13 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace Sheas_Cealer.Consts;
|
namespace Sheas_Cealer.Consts;
|
||||||
|
|
||||||
internal abstract class AboutConst : AboutMultilangConst
|
internal abstract class AboutConst : AboutMultilangConst
|
||||||
{
|
{
|
||||||
|
public static Color AccentBlueColor => (Color)ColorConverter.ConvertFromString("#2196F3");
|
||||||
|
public static Color AccentRedColor => (Color)ColorConverter.ConvertFromString("#F44336");
|
||||||
|
|
||||||
public static string DeveloperButtonUrl => "https://www.spacetimee.xyz";
|
public static string DeveloperButtonUrl => "https://www.spacetimee.xyz";
|
||||||
public static string VersionButtonVersionContent => Assembly.GetExecutingAssembly().GetName().Version!.ToString()[..^2];
|
public static string VersionButtonVersionContent => Assembly.GetExecutingAssembly().GetName().Version!.ToString()[..^2];
|
||||||
public static string VersionButtonUrl => "https://spacetime.lanzouu.com/b017hp0lc";
|
public static string VersionButtonUrl => "https://spacetime.lanzouu.com/b017hp0lc";
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using MaterialDesignThemes.Wpf;
|
using MaterialDesignThemes.Wpf;
|
||||||
|
using Sheas_Cealer.Consts;
|
||||||
using Sheas_Cealer.Props;
|
using Sheas_Cealer.Props;
|
||||||
using Sheas_Cealer.Utils;
|
using Sheas_Cealer.Utils;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
@ -39,5 +40,5 @@ internal partial class GlobalPres : ObservableObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private static Color accentForegroundColor = (Color)ColorConverter.ConvertFromString("#2196F3");
|
private static Color accentForegroundColor = AboutConst.AccentBlueColor;
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using Sheas_Cealer.Consts;
|
||||||
|
using System;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace Sheas_Cealer.Utils;
|
namespace Sheas_Cealer.Utils;
|
||||||
@ -23,7 +24,7 @@ internal static class ForegroundGenerator
|
|||||||
|
|
||||||
return (blackContrast >= 5.5 && whiteContrast >= 2.5 ? null :
|
return (blackContrast >= 5.5 && whiteContrast >= 2.5 ? null :
|
||||||
blackContrast >= whiteContrast ? Colors.Black : Colors.White,
|
blackContrast >= whiteContrast ? Colors.Black : Colors.White,
|
||||||
(Color)ColorConverter.ConvertFromString(blueContrast >= redContrast ? "#2196F3" : "#F44336"));
|
blueContrast >= redContrast ? AboutConst.AccentBlueColor : AboutConst.AccentRedColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static double GammaCorrect(double component) => component <= 0.03928 ? component / 12.92 : Math.Pow((component + 0.055) / 1.055, 2.4);
|
private static double GammaCorrect(double component) => component <= 0.03928 ? component / 12.92 : Math.Pow((component + 0.055) / 1.055, 2.4);
|
||||||
|
@ -23,13 +23,13 @@
|
|||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5" d:Foreground="#2196F3"
|
<Button Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5" d:Foreground="{x:Static consts:AboutConst.AccentBlueColor}"
|
||||||
Foreground="{Binding AccentForegroundColor, Converter={x:Static convs:AboutConv.AboutAccentButtonForegroundConv}}"
|
Foreground="{Binding AccentForegroundColor, Converter={x:Static convs:AboutConv.AboutAccentButtonForegroundConv}}"
|
||||||
Content="{x:Static consts:AboutConst.DeveloperButtonContent}"
|
Content="{x:Static consts:AboutConst.DeveloperButtonContent}"
|
||||||
ToolTip="{x:Static consts:AboutConst.DeveloperButtonUrl}"
|
ToolTip="{x:Static consts:AboutConst.DeveloperButtonUrl}"
|
||||||
Click="AboutButton_Click" />
|
Click="AboutButton_Click" />
|
||||||
<Button x:Name="VersionButton"
|
<Button x:Name="VersionButton"
|
||||||
Grid.Row="1" Grid.Column="0" Margin="5" d:Foreground="#2196F3" d:Content="# # #: #.#.#"
|
Grid.Row="1" Grid.Column="0" Margin="5" d:Foreground="{x:Static consts:AboutConst.AccentBlueColor}" d:Content="# # #: #.#.#"
|
||||||
Foreground="{Binding AccentForegroundColor, Converter={x:Static convs:AboutConv.AboutAccentButtonForegroundConv}}"
|
Foreground="{Binding AccentForegroundColor, Converter={x:Static convs:AboutConv.AboutAccentButtonForegroundConv}}"
|
||||||
ToolTip="{x:Static consts:AboutConst.VersionButtonUrl}"
|
ToolTip="{x:Static consts:AboutConst.VersionButtonUrl}"
|
||||||
Click="AboutButton_Click">
|
Click="AboutButton_Click">
|
||||||
|
Loading…
Reference in New Issue
Block a user