mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
view style
This commit is contained in:
@@ -5,15 +5,19 @@
|
|||||||
xmlns:cwcont="using:CommunityToolkit.WinUI.Controls"
|
xmlns:cwcont="using:CommunityToolkit.WinUI.Controls"
|
||||||
xmlns:cwconv="using:CommunityToolkit.WinUI.Converters"
|
xmlns:cwconv="using:CommunityToolkit.WinUI.Converters"
|
||||||
xmlns:cwm="using:CommunityToolkit.WinUI.Media"
|
xmlns:cwm="using:CommunityToolkit.WinUI.Media"
|
||||||
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
|
||||||
xmlns:shci="using:Snap.Hutao.Control.Image"
|
xmlns:shci="using:Snap.Hutao.Control.Image"
|
||||||
xmlns:shmmc="using:Snap.Hutao.Model.Metadata.Converter"
|
xmlns:shmmc="using:Snap.Hutao.Model.Metadata.Converter"
|
||||||
xmlns:shvc="using:Snap.Hutao.View.Converter">
|
xmlns:shvc="using:Snap.Hutao.View.Converter">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<muxc:XamlControlsResources/>
|
<XamlControlsResources/>
|
||||||
<ResourceDictionary Source="Control/Theme/FontStyle.xaml"/>
|
<ResourceDictionary Source="Control/Theme/FontStyle.xaml"/>
|
||||||
|
<ResourceDictionary Source="Control/Theme/InfoBarOverride.xaml"/>
|
||||||
|
<ResourceDictionary Source="Control/Theme/PageOverride.xaml"/>
|
||||||
|
<ResourceDictionary Source="Control/Theme/PivotOverride.xaml"/>
|
||||||
|
<ResourceDictionary Source="Control/Theme/SettingsStyle.xaml"/>
|
||||||
|
<ResourceDictionary Source="Control/Theme/WindowOverride.xaml"/>
|
||||||
<ResourceDictionary Source="Control/Loading.xaml"/>
|
<ResourceDictionary Source="Control/Loading.xaml"/>
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
@@ -30,20 +34,9 @@
|
|||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
|
|
||||||
<!-- Modify Window title bar color -->
|
|
||||||
<StaticResource x:Key="WindowCaptionBackground" ResourceKey="ControlFillColorTransparentBrush"/>
|
|
||||||
<StaticResource x:Key="WindowCaptionBackgroundDisabled" ResourceKey="ControlFillColorTransparentBrush"/>
|
|
||||||
<!-- Page Transparent Background -->
|
|
||||||
<StaticResource x:Key="ApplicationPageBackgroundThemeBrush" ResourceKey="ControlFillColorTransparentBrush"/>
|
|
||||||
<!-- InfoBar Resource -->
|
|
||||||
<Thickness x:Key="InfoBarIconMargin">19,16,19,16</Thickness>
|
|
||||||
<Thickness x:Key="InfoBarContentRootPadding">0,0,0,0</Thickness>
|
|
||||||
<x:Double x:Key="InfoBarIconFontSize">20</x:Double>
|
|
||||||
<!-- Pivot Resource -->
|
|
||||||
<x:Double x:Key="PivotHeaderItemFontSize">16</x:Double>
|
|
||||||
<Thickness x:Key="PivotHeaderItemMargin">16,0,0,0</Thickness>
|
|
||||||
<Thickness x:Key="PivotItemMargin">0</Thickness>
|
|
||||||
<!-- CornerRadius -->
|
<!-- CornerRadius -->
|
||||||
|
<CornerRadius x:Key="ControlCornerRadiusTop">4,4,0,0</CornerRadius>
|
||||||
|
<CornerRadius x:Key="ControlCornerRadiusBottom">0,0,4,4</CornerRadius>
|
||||||
<CornerRadius x:Key="CompatCornerRadius">6</CornerRadius>
|
<CornerRadius x:Key="CompatCornerRadius">6</CornerRadius>
|
||||||
<CornerRadius x:Key="CompatCornerRadiusTop">6,6,0,0</CornerRadius>
|
<CornerRadius x:Key="CompatCornerRadiusTop">6,6,0,0</CornerRadius>
|
||||||
<CornerRadius x:Key="CompatCornerRadiusRight">0,6,6,0</CornerRadius>
|
<CornerRadius x:Key="CompatCornerRadiusRight">0,6,6,0</CornerRadius>
|
||||||
@@ -59,8 +52,6 @@
|
|||||||
<x:Double x:Key="LargeAppBarButtonWidth">100</x:Double>
|
<x:Double x:Key="LargeAppBarButtonWidth">100</x:Double>
|
||||||
<!-- ProgressBar -->
|
<!-- ProgressBar -->
|
||||||
<x:Double x:Key="LargeBackgroundProgressBarOpacity">0.2</x:Double>
|
<x:Double x:Key="LargeBackgroundProgressBarOpacity">0.2</x:Double>
|
||||||
|
|
||||||
<ThemeShadow x:Key="CompatShadow"/>
|
|
||||||
<!-- Brushes -->
|
<!-- Brushes -->
|
||||||
<SolidColorBrush x:Key="AvatarPropertyAddValueBrush" Color="{ThemeResource AvatarPropertyAddValueColor}"/>
|
<SolidColorBrush x:Key="AvatarPropertyAddValueBrush" Color="{ThemeResource AvatarPropertyAddValueColor}"/>
|
||||||
<SolidColorBrush x:Key="BlueBrush" Color="#FF5180CB"/>
|
<SolidColorBrush x:Key="BlueBrush" Color="#FF5180CB"/>
|
||||||
@@ -68,25 +59,7 @@
|
|||||||
<SolidColorBrush x:Key="OrangeBrush" Color="#FFBC6932"/>
|
<SolidColorBrush x:Key="OrangeBrush" Color="#FFBC6932"/>
|
||||||
<SolidColorBrush x:Key="GuaranteePullBrush" Color="#FF0063FF"/>
|
<SolidColorBrush x:Key="GuaranteePullBrush" Color="#FF0063FF"/>
|
||||||
<SolidColorBrush x:Key="UpPullBrush" Color="#FFFFA400"/>
|
<SolidColorBrush x:Key="UpPullBrush" Color="#FFFFA400"/>
|
||||||
<!-- Settings -->
|
|
||||||
<x:Double x:Key="SettingsCardSpacing">3</x:Double>
|
|
||||||
<x:Double x:Key="SettingsCardMinHeight">0</x:Double>
|
|
||||||
<x:Double x:Key="SettingsCardWrapThreshold">0</x:Double>
|
|
||||||
<x:Double x:Key="SettingsCardWrapNoIconThreshold">0</x:Double>
|
|
||||||
<Style
|
|
||||||
x:Key="SettingsSectionHeaderTextBlockStyle"
|
|
||||||
BasedOn="{StaticResource BodyStrongTextBlockStyle}"
|
|
||||||
TargetType="TextBlock">
|
|
||||||
<Style.Setters>
|
|
||||||
<Setter Property="Margin" Value="1,29,0,5"/>
|
|
||||||
</Style.Setters>
|
|
||||||
</Style>
|
|
||||||
<Style
|
|
||||||
x:Key="SettingsContentComboBoxStyle"
|
|
||||||
BasedOn="{StaticResource DefaultComboBoxStyle}"
|
|
||||||
TargetType="ComboBox">
|
|
||||||
<Setter Property="MinWidth" Value="120"/>
|
|
||||||
</Style>
|
|
||||||
<!-- Uris -->
|
<!-- Uris -->
|
||||||
<x:String x:Key="DocumentLink_MhyAccountSwitch">https://hut.ao/features/mhy-account-switch.html</x:String>
|
<x:String x:Key="DocumentLink_MhyAccountSwitch">https://hut.ao/features/mhy-account-switch.html</x:String>
|
||||||
<x:String x:Key="DocumentLink_BugReport">https://hut.ao/statements/bug-report.html</x:String>
|
<x:String x:Key="DocumentLink_BugReport">https://hut.ao/statements/bug-report.html</x:String>
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
// Copyright (c) DGP Studio. All rights reserved.
|
|
||||||
// Licensed under the MIT license.
|
|
||||||
|
|
||||||
using Windows.Foundation;
|
|
||||||
|
|
||||||
namespace Snap.Hutao.Control.Panel;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 纵横比控件
|
|
||||||
/// </summary>
|
|
||||||
[HighQuality]
|
|
||||||
[DependencyProperty("TargetWidth", typeof(double), 1.0D)]
|
|
||||||
[DependencyProperty("TargetHeight", typeof(double), 1.0D)]
|
|
||||||
internal sealed partial class AspectRatio : Microsoft.UI.Xaml.Controls.Control
|
|
||||||
{
|
|
||||||
private const double Epsilon = 2.2204460492503131e-016;
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
protected override Size MeasureOverride(Size availableSize)
|
|
||||||
{
|
|
||||||
double ratio = TargetWidth / TargetHeight;
|
|
||||||
double ratioAvailable = availableSize.Width / availableSize.Height;
|
|
||||||
|
|
||||||
if (Math.Abs(ratioAvailable - ratio) < Epsilon)
|
|
||||||
{
|
|
||||||
return availableSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更宽
|
|
||||||
if (ratioAvailable > ratio)
|
|
||||||
{
|
|
||||||
double newWidth = ratio * availableSize.Height;
|
|
||||||
return new Size(newWidth, availableSize.Height);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更高
|
|
||||||
if (ratioAvailable < ratio)
|
|
||||||
{
|
|
||||||
double newHeight = availableSize.Width / ratio;
|
|
||||||
return new Size(availableSize.Width, newHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
return availableSize;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -82,13 +82,6 @@
|
|||||||
<Setter Property="OpticalMarginAlignment" Value="TrimSideBearings"/>
|
<Setter Property="OpticalMarginAlignment" Value="TrimSideBearings"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<x:Double x:Key="SecondaryTextFontSize">12</x:Double>
|
|
||||||
|
|
||||||
<Style x:Key="SecondaryTextStyle" TargetType="TextBlock">
|
|
||||||
<Setter Property="FontSize" Value="{StaticResource SecondaryTextFontSize}"/>
|
|
||||||
<Setter Property="Foreground" Value="{ThemeResource TextFillColorSecondaryBrush}"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style BasedOn="{StaticResource DefaultMenuFlyoutItemStyle}" TargetType="MenuFlyoutItem">
|
<Style BasedOn="{StaticResource DefaultMenuFlyoutItemStyle}" TargetType="MenuFlyoutItem">
|
||||||
<Setter Property="FontFamily" Value="{StaticResource MiSans}"/>
|
<Setter Property="FontFamily" Value="{StaticResource MiSans}"/>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -100,276 +93,4 @@
|
|||||||
<Style BasedOn="{StaticResource DefaultScrollViewerStyle}" TargetType="ScrollViewer">
|
<Style BasedOn="{StaticResource DefaultScrollViewerStyle}" TargetType="ScrollViewer">
|
||||||
<Setter Property="FontFamily" Value="{StaticResource MiSans}"/>
|
<Setter Property="FontFamily" Value="{StaticResource MiSans}"/>
|
||||||
</Style>
|
</Style>
|
||||||
<!-- TODO: When will DefaultInfoBarStyle added -->
|
|
||||||
<Style TargetType="InfoBar">
|
|
||||||
<Setter Property="shch:InfoBarHelper.IsTextSelectionEnabled" Value="False"/>
|
|
||||||
<Setter Property="FontFamily" Value="{StaticResource MiSans}"/>
|
|
||||||
<Setter Property="IsTabStop" Value="False"/>
|
|
||||||
<Setter Property="CloseButtonStyle" Value="{StaticResource InfoBarCloseButtonStyle}"/>
|
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
|
||||||
<Setter Property="BorderBrush" Value="{ThemeResource InfoBarBorderBrush}"/>
|
|
||||||
<Setter Property="BorderThickness" Value="{ThemeResource InfoBarBorderThickness}"/>
|
|
||||||
<Setter Property="AutomationProperties.LandmarkType" Value="Custom"/>
|
|
||||||
<Setter Property="AutomationProperties.IsDialog" Value="True"/>
|
|
||||||
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}"/>
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="InfoBar">
|
|
||||||
<Border
|
|
||||||
x:Name="ContentRoot"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Background="{ThemeResource InfoBarInformationalSeverityBackgroundBrush}"
|
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
|
||||||
<!-- Background is used here so that it overrides the severity status color if set. -->
|
|
||||||
<Grid
|
|
||||||
MinHeight="{ThemeResource InfoBarMinHeight}"
|
|
||||||
Padding="{StaticResource InfoBarContentRootPadding}"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
Background="{TemplateBinding Background}"
|
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
|
||||||
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<!-- Icon -->
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<!-- Title, message, and action -->
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<!-- Close button -->
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid x:Name="StandardIconArea" Visibility="Collapsed">
|
|
||||||
<TextBlock
|
|
||||||
x:Name="IconBackground"
|
|
||||||
Grid.Column="0"
|
|
||||||
Margin="{StaticResource InfoBarIconMargin}"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
AutomationProperties.AccessibilityView="Raw"
|
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
|
||||||
FontSize="{StaticResource InfoBarIconFontSize}"
|
|
||||||
Foreground="{ThemeResource InfoBarInformationalSeverityIconBackground}"
|
|
||||||
Text="{StaticResource InfoBarIconBackgroundGlyph}"/>
|
|
||||||
<TextBlock
|
|
||||||
x:Name="StandardIcon"
|
|
||||||
Grid.Column="0"
|
|
||||||
Margin="{StaticResource InfoBarIconMargin}"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
|
||||||
FontSize="{StaticResource InfoBarIconFontSize}"
|
|
||||||
Foreground="{ThemeResource InfoBarInformationalSeverityIconForeground}"
|
|
||||||
Text="{StaticResource InfoBarInformationalIconGlyph}"/>
|
|
||||||
</Grid>
|
|
||||||
<Viewbox
|
|
||||||
x:Name="UserIconBox"
|
|
||||||
Grid.Column="0"
|
|
||||||
MaxWidth="{ThemeResource InfoBarIconFontSize}"
|
|
||||||
MaxHeight="{ThemeResource InfoBarIconFontSize}"
|
|
||||||
Margin="{ThemeResource InfoBarIconMargin}"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Child="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.IconElement}"
|
|
||||||
Visibility="Collapsed"/>
|
|
||||||
<InfoBarPanel
|
|
||||||
Grid.Column="1"
|
|
||||||
Margin="{StaticResource InfoBarPanelMargin}"
|
|
||||||
HorizontalOrientationPadding="{StaticResource InfoBarPanelHorizontalOrientationPadding}"
|
|
||||||
VerticalOrientationPadding="{StaticResource InfoBarPanelVerticalOrientationPadding}">
|
|
||||||
<TextBlock
|
|
||||||
x:Name="Title"
|
|
||||||
FontSize="{StaticResource InfoBarTitleFontSize}"
|
|
||||||
FontWeight="{StaticResource InfoBarTitleFontWeight}"
|
|
||||||
Foreground="{ThemeResource InfoBarTitleForeground}"
|
|
||||||
InfoBarPanel.HorizontalOrientationMargin="{StaticResource InfoBarTitleHorizontalOrientationMargin}"
|
|
||||||
InfoBarPanel.VerticalOrientationMargin="{StaticResource InfoBarTitleVerticalOrientationMargin}"
|
|
||||||
IsTextSelectionEnabled="{TemplateBinding shch:InfoBarHelper.IsTextSelectionEnabled}"
|
|
||||||
Text="{TemplateBinding Title}"
|
|
||||||
TextWrapping="WrapWholeWords"/>
|
|
||||||
<TextBlock
|
|
||||||
x:Name="Message"
|
|
||||||
FontSize="{StaticResource InfoBarMessageFontSize}"
|
|
||||||
FontWeight="{StaticResource InfoBarMessageFontWeight}"
|
|
||||||
Foreground="{ThemeResource InfoBarMessageForeground}"
|
|
||||||
InfoBarPanel.HorizontalOrientationMargin="{StaticResource InfoBarMessageHorizontalOrientationMargin}"
|
|
||||||
InfoBarPanel.VerticalOrientationMargin="{StaticResource InfoBarMessageVerticalOrientationMargin}"
|
|
||||||
IsTextSelectionEnabled="{TemplateBinding shch:InfoBarHelper.IsTextSelectionEnabled}"
|
|
||||||
Text="{TemplateBinding Message}"
|
|
||||||
TextWrapping="WrapWholeWords"/>
|
|
||||||
<ContentPresenter
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Content="{TemplateBinding ActionButton}"
|
|
||||||
InfoBarPanel.HorizontalOrientationMargin="{StaticResource InfoBarActionHorizontalOrientationMargin}"
|
|
||||||
InfoBarPanel.VerticalOrientationMargin="{StaticResource InfoBarActionVerticalOrientationMargin}">
|
|
||||||
<ContentPresenter.Resources>
|
|
||||||
<Style BasedOn="{StaticResource DefaultHyperlinkButtonStyle}" TargetType="HyperlinkButton">
|
|
||||||
<Style.Setters>
|
|
||||||
<Setter Property="Margin" Value="{StaticResource InfoBarHyperlinkButtonMargin}"/>
|
|
||||||
<Setter Property="Foreground" Value="{ThemeResource InfoBarHyperlinkButtonForeground}"/>
|
|
||||||
</Style.Setters>
|
|
||||||
</Style>
|
|
||||||
</ContentPresenter.Resources>
|
|
||||||
</ContentPresenter>
|
|
||||||
</InfoBarPanel>
|
|
||||||
<ContentPresenter
|
|
||||||
Grid.Row="1"
|
|
||||||
Grid.Column="1"
|
|
||||||
Content="{TemplateBinding Content}"
|
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"/>
|
|
||||||
<Button
|
|
||||||
Name="CloseButton"
|
|
||||||
Grid.Column="2"
|
|
||||||
Command="{TemplateBinding CloseButtonCommand}"
|
|
||||||
CommandParameter="{TemplateBinding CloseButtonCommandParameter}"
|
|
||||||
Style="{TemplateBinding CloseButtonStyle}">
|
|
||||||
<Button.Resources>
|
|
||||||
<ResourceDictionary>
|
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
|
||||||
<ResourceDictionary x:Key="Default">
|
|
||||||
<StaticResource x:Key="ButtonBackground" ResourceKey="AppBarButtonBackground"/>
|
|
||||||
<StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="AppBarButtonBackgroundPointerOver"/>
|
|
||||||
<StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="AppBarButtonBackgroundPressed"/>
|
|
||||||
<StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="AppBarButtonBackgroundDisabled"/>
|
|
||||||
<StaticResource x:Key="ButtonForeground" ResourceKey="AppBarButtonForeground"/>
|
|
||||||
<StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="AppBarButtonForegroundPointerOver"/>
|
|
||||||
<StaticResource x:Key="ButtonForegroundPressed" ResourceKey="AppBarButtonForegroundPressed"/>
|
|
||||||
<StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="AppBarButtonForegroundDisabled"/>
|
|
||||||
<StaticResource x:Key="ButtonBorderBrush" ResourceKey="AppBarButtonBorderBrush"/>
|
|
||||||
<StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="AppBarButtonBorderBrushPointerOver"/>
|
|
||||||
<StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="AppBarButtonBorderBrushPressed"/>
|
|
||||||
<StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="AppBarButtonBorderBrushDisabled"/>
|
|
||||||
</ResourceDictionary>
|
|
||||||
<ResourceDictionary x:Key="HighContrast">
|
|
||||||
<StaticResource x:Key="ButtonBackground" ResourceKey="AppBarButtonBackground"/>
|
|
||||||
<StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="AppBarButtonBackgroundPointerOver"/>
|
|
||||||
<StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="AppBarButtonBackgroundPressed"/>
|
|
||||||
<StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="AppBarButtonBackgroundDisabled"/>
|
|
||||||
<StaticResource x:Key="ButtonForeground" ResourceKey="AppBarButtonForeground"/>
|
|
||||||
<StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="AppBarButtonForegroundPointerOver"/>
|
|
||||||
<StaticResource x:Key="ButtonForegroundPressed" ResourceKey="AppBarButtonForegroundPressed"/>
|
|
||||||
<StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="AppBarButtonForegroundDisabled"/>
|
|
||||||
<StaticResource x:Key="ButtonBorderBrush" ResourceKey="AppBarButtonBorderBrush"/>
|
|
||||||
<StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="AppBarButtonBorderBrushPointerOver"/>
|
|
||||||
<StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="AppBarButtonBorderBrushPressed"/>
|
|
||||||
<StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="AppBarButtonBorderBrushDisabled"/>
|
|
||||||
</ResourceDictionary>
|
|
||||||
<ResourceDictionary x:Key="Light">
|
|
||||||
<StaticResource x:Key="ButtonBackground" ResourceKey="AppBarButtonBackground"/>
|
|
||||||
<StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="AppBarButtonBackgroundPointerOver"/>
|
|
||||||
<StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="AppBarButtonBackgroundPressed"/>
|
|
||||||
<StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="AppBarButtonBackgroundDisabled"/>
|
|
||||||
<StaticResource x:Key="ButtonForeground" ResourceKey="AppBarButtonForeground"/>
|
|
||||||
<StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="AppBarButtonForegroundPointerOver"/>
|
|
||||||
<StaticResource x:Key="ButtonForegroundPressed" ResourceKey="AppBarButtonForegroundPressed"/>
|
|
||||||
<StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="AppBarButtonForegroundDisabled"/>
|
|
||||||
<StaticResource x:Key="ButtonBorderBrush" ResourceKey="AppBarButtonBorderBrush"/>
|
|
||||||
<StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="AppBarButtonBorderBrushPointerOver"/>
|
|
||||||
<StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="AppBarButtonBorderBrushPressed"/>
|
|
||||||
<StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="AppBarButtonBorderBrushDisabled"/>
|
|
||||||
</ResourceDictionary>
|
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
|
||||||
</ResourceDictionary>
|
|
||||||
</Button.Resources>
|
|
||||||
<Viewbox
|
|
||||||
Width="{StaticResource InfoBarCloseButtonGlyphSize}"
|
|
||||||
Height="{StaticResource InfoBarCloseButtonGlyphSize}"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center">
|
|
||||||
<SymbolIcon Symbol="{StaticResource InfoBarCloseButtonSymbol}"/>
|
|
||||||
</Viewbox>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<VisualStateManager.VisualStateGroups>
|
|
||||||
<VisualStateGroup x:Name="SeverityLevels">
|
|
||||||
<VisualState x:Name="Informational"/>
|
|
||||||
<VisualState x:Name="Error">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarErrorSeverityBackgroundBrush}"/>
|
|
||||||
<Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarErrorSeverityIconBackground}"/>
|
|
||||||
<Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarErrorIconGlyph}"/>
|
|
||||||
<Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarErrorSeverityIconForeground}"/>
|
|
||||||
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
<VisualState x:Name="Warning">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarWarningSeverityBackgroundBrush}"/>
|
|
||||||
<Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarWarningSeverityIconBackground}"/>
|
|
||||||
<Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarWarningIconGlyph}"/>
|
|
||||||
<Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarWarningSeverityIconForeground}"/>
|
|
||||||
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
<VisualState x:Name="Success">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarSuccessSeverityBackgroundBrush}"/>
|
|
||||||
<Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarSuccessSeverityIconBackground}"/>
|
|
||||||
<Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarSuccessIconGlyph}"/>
|
|
||||||
<Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarSuccessSeverityIconForeground}"/>
|
|
||||||
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
|
|
||||||
</VisualStateGroup>
|
|
||||||
<VisualStateGroup x:Name="IconStates">
|
|
||||||
<VisualState x:Name="StandardIconVisible">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="UserIconBox.Visibility" Value="Collapsed"/>
|
|
||||||
<Setter Target="StandardIconArea.Visibility" Value="Visible"/>
|
|
||||||
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
<VisualState x:Name="UserIconVisible">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="UserIconBox.Visibility" Value="Visible"/>
|
|
||||||
<Setter Target="StandardIconArea.Visibility" Value="Collapsed"/>
|
|
||||||
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
<VisualState x:Name="NoIconVisible"/>
|
|
||||||
|
|
||||||
</VisualStateGroup>
|
|
||||||
<VisualStateGroup>
|
|
||||||
<VisualState x:Name="CloseButtonVisible"/>
|
|
||||||
<VisualState x:Name="CloseButtonCollapsed">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="CloseButton.Visibility" Value="Collapsed"/>
|
|
||||||
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
|
|
||||||
</VisualStateGroup>
|
|
||||||
<VisualStateGroup x:Name="InfoBarVisibility">
|
|
||||||
<VisualState x:Name="InfoBarVisible"/>
|
|
||||||
<VisualState x:Name="InfoBarCollapsed">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="ContentRoot.Visibility" Value="Collapsed"/>
|
|
||||||
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
|
|
||||||
</VisualStateGroup>
|
|
||||||
<VisualStateGroup>
|
|
||||||
<VisualState x:Name="ForegroundNotSet"/>
|
|
||||||
<VisualState x:Name="ForegroundSet">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="Title.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}"/>
|
|
||||||
<Setter Target="Message.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}"/>
|
|
||||||
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
|
|
||||||
</VisualStateGroup>
|
|
||||||
|
|
||||||
</VisualStateManager.VisualStateGroups>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
265
src/Snap.Hutao/Snap.Hutao/Control/Theme/InfoBarOverride.xaml
Normal file
265
src/Snap.Hutao/Snap.Hutao/Control/Theme/InfoBarOverride.xaml
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
<ResourceDictionary
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:shch="using:Snap.Hutao.Control.Helper">
|
||||||
|
<Thickness x:Key="InfoBarIconMargin">19,16,19,16</Thickness>
|
||||||
|
<Thickness x:Key="InfoBarContentRootPadding">0,0,0,0</Thickness>
|
||||||
|
<x:Double x:Key="InfoBarIconFontSize">20</x:Double>
|
||||||
|
<!-- TODO: When will DefaultInfoBarStyle added -->
|
||||||
|
<Style TargetType="InfoBar">
|
||||||
|
<Setter Property="shch:InfoBarHelper.IsTextSelectionEnabled" Value="False"/>
|
||||||
|
<Setter Property="FontFamily" Value="{StaticResource MiSans}"/>
|
||||||
|
<Setter Property="IsTabStop" Value="False"/>
|
||||||
|
<Setter Property="CloseButtonStyle" Value="{StaticResource InfoBarCloseButtonStyle}"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{ThemeResource InfoBarBorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="{ThemeResource InfoBarBorderThickness}"/>
|
||||||
|
<Setter Property="AutomationProperties.LandmarkType" Value="Custom"/>
|
||||||
|
<Setter Property="AutomationProperties.IsDialog" Value="True"/>
|
||||||
|
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="InfoBar">
|
||||||
|
<Border
|
||||||
|
x:Name="ContentRoot"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Background="{ThemeResource InfoBarInformationalSeverityBackgroundBrush}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
|
<!-- Background is used here so that it overrides the severity status color if set. -->
|
||||||
|
<Grid
|
||||||
|
MinHeight="{ThemeResource InfoBarMinHeight}"
|
||||||
|
Padding="{StaticResource InfoBarContentRootPadding}"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
|
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<!-- Icon -->
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<!-- Title, message, and action -->
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<!-- Close button -->
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid x:Name="StandardIconArea" Visibility="Collapsed">
|
||||||
|
<TextBlock
|
||||||
|
x:Name="IconBackground"
|
||||||
|
Grid.Column="0"
|
||||||
|
Margin="{StaticResource InfoBarIconMargin}"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
AutomationProperties.AccessibilityView="Raw"
|
||||||
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
|
FontSize="{StaticResource InfoBarIconFontSize}"
|
||||||
|
Foreground="{ThemeResource InfoBarInformationalSeverityIconBackground}"
|
||||||
|
Text="{StaticResource InfoBarIconBackgroundGlyph}"/>
|
||||||
|
<TextBlock
|
||||||
|
x:Name="StandardIcon"
|
||||||
|
Grid.Column="0"
|
||||||
|
Margin="{StaticResource InfoBarIconMargin}"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
|
FontSize="{StaticResource InfoBarIconFontSize}"
|
||||||
|
Foreground="{ThemeResource InfoBarInformationalSeverityIconForeground}"
|
||||||
|
Text="{StaticResource InfoBarInformationalIconGlyph}"/>
|
||||||
|
</Grid>
|
||||||
|
<Viewbox
|
||||||
|
x:Name="UserIconBox"
|
||||||
|
Grid.Column="0"
|
||||||
|
MaxWidth="{ThemeResource InfoBarIconFontSize}"
|
||||||
|
MaxHeight="{ThemeResource InfoBarIconFontSize}"
|
||||||
|
Margin="{ThemeResource InfoBarIconMargin}"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Child="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.IconElement}"
|
||||||
|
Visibility="Collapsed"/>
|
||||||
|
<InfoBarPanel
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="{StaticResource InfoBarPanelMargin}"
|
||||||
|
HorizontalOrientationPadding="{StaticResource InfoBarPanelHorizontalOrientationPadding}"
|
||||||
|
VerticalOrientationPadding="{StaticResource InfoBarPanelVerticalOrientationPadding}">
|
||||||
|
<TextBlock
|
||||||
|
x:Name="Title"
|
||||||
|
FontSize="{StaticResource InfoBarTitleFontSize}"
|
||||||
|
FontWeight="{StaticResource InfoBarTitleFontWeight}"
|
||||||
|
Foreground="{ThemeResource InfoBarTitleForeground}"
|
||||||
|
InfoBarPanel.HorizontalOrientationMargin="{StaticResource InfoBarTitleHorizontalOrientationMargin}"
|
||||||
|
InfoBarPanel.VerticalOrientationMargin="{StaticResource InfoBarTitleVerticalOrientationMargin}"
|
||||||
|
IsTextSelectionEnabled="{TemplateBinding shch:InfoBarHelper.IsTextSelectionEnabled}"
|
||||||
|
Text="{TemplateBinding Title}"
|
||||||
|
TextWrapping="WrapWholeWords"/>
|
||||||
|
<TextBlock
|
||||||
|
x:Name="Message"
|
||||||
|
FontSize="{StaticResource InfoBarMessageFontSize}"
|
||||||
|
FontWeight="{StaticResource InfoBarMessageFontWeight}"
|
||||||
|
Foreground="{ThemeResource InfoBarMessageForeground}"
|
||||||
|
InfoBarPanel.HorizontalOrientationMargin="{StaticResource InfoBarMessageHorizontalOrientationMargin}"
|
||||||
|
InfoBarPanel.VerticalOrientationMargin="{StaticResource InfoBarMessageVerticalOrientationMargin}"
|
||||||
|
IsTextSelectionEnabled="{TemplateBinding shch:InfoBarHelper.IsTextSelectionEnabled}"
|
||||||
|
Text="{TemplateBinding Message}"
|
||||||
|
TextWrapping="WrapWholeWords"/>
|
||||||
|
<ContentPresenter
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Content="{TemplateBinding ActionButton}"
|
||||||
|
InfoBarPanel.HorizontalOrientationMargin="{StaticResource InfoBarActionHorizontalOrientationMargin}"
|
||||||
|
InfoBarPanel.VerticalOrientationMargin="{StaticResource InfoBarActionVerticalOrientationMargin}">
|
||||||
|
<ContentPresenter.Resources>
|
||||||
|
<Style BasedOn="{StaticResource DefaultHyperlinkButtonStyle}" TargetType="HyperlinkButton">
|
||||||
|
<Style.Setters>
|
||||||
|
<Setter Property="Margin" Value="{StaticResource InfoBarHyperlinkButtonMargin}"/>
|
||||||
|
<Setter Property="Foreground" Value="{ThemeResource InfoBarHyperlinkButtonForeground}"/>
|
||||||
|
</Style.Setters>
|
||||||
|
</Style>
|
||||||
|
</ContentPresenter.Resources>
|
||||||
|
</ContentPresenter>
|
||||||
|
</InfoBarPanel>
|
||||||
|
<ContentPresenter
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.Column="1"
|
||||||
|
Content="{TemplateBinding Content}"
|
||||||
|
ContentTemplate="{TemplateBinding ContentTemplate}"/>
|
||||||
|
<Button
|
||||||
|
Name="CloseButton"
|
||||||
|
Grid.Column="2"
|
||||||
|
Command="{TemplateBinding CloseButtonCommand}"
|
||||||
|
CommandParameter="{TemplateBinding CloseButtonCommandParameter}"
|
||||||
|
Style="{TemplateBinding CloseButtonStyle}">
|
||||||
|
<Button.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
|
<ResourceDictionary x:Key="Default">
|
||||||
|
<StaticResource x:Key="ButtonBackground" ResourceKey="AppBarButtonBackground"/>
|
||||||
|
<StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="AppBarButtonBackgroundPointerOver"/>
|
||||||
|
<StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="AppBarButtonBackgroundPressed"/>
|
||||||
|
<StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="AppBarButtonBackgroundDisabled"/>
|
||||||
|
<StaticResource x:Key="ButtonForeground" ResourceKey="AppBarButtonForeground"/>
|
||||||
|
<StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="AppBarButtonForegroundPointerOver"/>
|
||||||
|
<StaticResource x:Key="ButtonForegroundPressed" ResourceKey="AppBarButtonForegroundPressed"/>
|
||||||
|
<StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="AppBarButtonForegroundDisabled"/>
|
||||||
|
<StaticResource x:Key="ButtonBorderBrush" ResourceKey="AppBarButtonBorderBrush"/>
|
||||||
|
<StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="AppBarButtonBorderBrushPointerOver"/>
|
||||||
|
<StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="AppBarButtonBorderBrushPressed"/>
|
||||||
|
<StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="AppBarButtonBorderBrushDisabled"/>
|
||||||
|
</ResourceDictionary>
|
||||||
|
<ResourceDictionary x:Key="HighContrast">
|
||||||
|
<StaticResource x:Key="ButtonBackground" ResourceKey="AppBarButtonBackground"/>
|
||||||
|
<StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="AppBarButtonBackgroundPointerOver"/>
|
||||||
|
<StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="AppBarButtonBackgroundPressed"/>
|
||||||
|
<StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="AppBarButtonBackgroundDisabled"/>
|
||||||
|
<StaticResource x:Key="ButtonForeground" ResourceKey="AppBarButtonForeground"/>
|
||||||
|
<StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="AppBarButtonForegroundPointerOver"/>
|
||||||
|
<StaticResource x:Key="ButtonForegroundPressed" ResourceKey="AppBarButtonForegroundPressed"/>
|
||||||
|
<StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="AppBarButtonForegroundDisabled"/>
|
||||||
|
<StaticResource x:Key="ButtonBorderBrush" ResourceKey="AppBarButtonBorderBrush"/>
|
||||||
|
<StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="AppBarButtonBorderBrushPointerOver"/>
|
||||||
|
<StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="AppBarButtonBorderBrushPressed"/>
|
||||||
|
<StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="AppBarButtonBorderBrushDisabled"/>
|
||||||
|
</ResourceDictionary>
|
||||||
|
<ResourceDictionary x:Key="Light">
|
||||||
|
<StaticResource x:Key="ButtonBackground" ResourceKey="AppBarButtonBackground"/>
|
||||||
|
<StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="AppBarButtonBackgroundPointerOver"/>
|
||||||
|
<StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="AppBarButtonBackgroundPressed"/>
|
||||||
|
<StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="AppBarButtonBackgroundDisabled"/>
|
||||||
|
<StaticResource x:Key="ButtonForeground" ResourceKey="AppBarButtonForeground"/>
|
||||||
|
<StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="AppBarButtonForegroundPointerOver"/>
|
||||||
|
<StaticResource x:Key="ButtonForegroundPressed" ResourceKey="AppBarButtonForegroundPressed"/>
|
||||||
|
<StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="AppBarButtonForegroundDisabled"/>
|
||||||
|
<StaticResource x:Key="ButtonBorderBrush" ResourceKey="AppBarButtonBorderBrush"/>
|
||||||
|
<StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="AppBarButtonBorderBrushPointerOver"/>
|
||||||
|
<StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="AppBarButtonBorderBrushPressed"/>
|
||||||
|
<StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="AppBarButtonBorderBrushDisabled"/>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</Button.Resources>
|
||||||
|
<Viewbox
|
||||||
|
Width="{StaticResource InfoBarCloseButtonGlyphSize}"
|
||||||
|
Height="{StaticResource InfoBarCloseButtonGlyphSize}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
<SymbolIcon Symbol="{StaticResource InfoBarCloseButtonSymbol}"/>
|
||||||
|
</Viewbox>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<VisualStateManager.VisualStateGroups>
|
||||||
|
<VisualStateGroup x:Name="SeverityLevels">
|
||||||
|
<VisualState x:Name="Informational"/>
|
||||||
|
<VisualState x:Name="Error">
|
||||||
|
<VisualState.Setters>
|
||||||
|
<Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarErrorSeverityBackgroundBrush}"/>
|
||||||
|
<Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarErrorSeverityIconBackground}"/>
|
||||||
|
<Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarErrorIconGlyph}"/>
|
||||||
|
<Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarErrorSeverityIconForeground}"/>
|
||||||
|
</VisualState.Setters>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Warning">
|
||||||
|
<VisualState.Setters>
|
||||||
|
<Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarWarningSeverityBackgroundBrush}"/>
|
||||||
|
<Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarWarningSeverityIconBackground}"/>
|
||||||
|
<Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarWarningIconGlyph}"/>
|
||||||
|
<Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarWarningSeverityIconForeground}"/>
|
||||||
|
</VisualState.Setters>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Success">
|
||||||
|
<VisualState.Setters>
|
||||||
|
<Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarSuccessSeverityBackgroundBrush}"/>
|
||||||
|
<Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarSuccessSeverityIconBackground}"/>
|
||||||
|
<Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarSuccessIconGlyph}"/>
|
||||||
|
<Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarSuccessSeverityIconForeground}"/>
|
||||||
|
</VisualState.Setters>
|
||||||
|
</VisualState>
|
||||||
|
</VisualStateGroup>
|
||||||
|
<VisualStateGroup x:Name="IconStates">
|
||||||
|
<VisualState x:Name="StandardIconVisible">
|
||||||
|
<VisualState.Setters>
|
||||||
|
<Setter Target="UserIconBox.Visibility" Value="Collapsed"/>
|
||||||
|
<Setter Target="StandardIconArea.Visibility" Value="Visible"/>
|
||||||
|
</VisualState.Setters>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="UserIconVisible">
|
||||||
|
<VisualState.Setters>
|
||||||
|
<Setter Target="UserIconBox.Visibility" Value="Visible"/>
|
||||||
|
<Setter Target="StandardIconArea.Visibility" Value="Collapsed"/>
|
||||||
|
</VisualState.Setters>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="NoIconVisible"/>
|
||||||
|
</VisualStateGroup>
|
||||||
|
<VisualStateGroup>
|
||||||
|
<VisualState x:Name="CloseButtonVisible"/>
|
||||||
|
<VisualState x:Name="CloseButtonCollapsed">
|
||||||
|
<VisualState.Setters>
|
||||||
|
<Setter Target="CloseButton.Visibility" Value="Collapsed"/>
|
||||||
|
</VisualState.Setters>
|
||||||
|
</VisualState>
|
||||||
|
</VisualStateGroup>
|
||||||
|
<VisualStateGroup x:Name="InfoBarVisibility">
|
||||||
|
<VisualState x:Name="InfoBarVisible"/>
|
||||||
|
<VisualState x:Name="InfoBarCollapsed">
|
||||||
|
<VisualState.Setters>
|
||||||
|
<Setter Target="ContentRoot.Visibility" Value="Collapsed"/>
|
||||||
|
</VisualState.Setters>
|
||||||
|
</VisualState>
|
||||||
|
</VisualStateGroup>
|
||||||
|
<VisualStateGroup>
|
||||||
|
<VisualState x:Name="ForegroundNotSet"/>
|
||||||
|
<VisualState x:Name="ForegroundSet">
|
||||||
|
<VisualState.Setters>
|
||||||
|
<Setter Target="Title.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}"/>
|
||||||
|
<Setter Target="Message.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}"/>
|
||||||
|
</VisualState.Setters>
|
||||||
|
</VisualState>
|
||||||
|
</VisualStateGroup>
|
||||||
|
</VisualStateManager.VisualStateGroups>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<!-- Page Transparent Background -->
|
||||||
|
<StaticResource x:Key="ApplicationPageBackgroundThemeBrush" ResourceKey="ControlFillColorTransparentBrush"/>
|
||||||
|
<!-- https://github.com/microsoft/microsoft-ui-xaml/issues/4811 -->
|
||||||
|
<x:Int32 x:Key="__Discard">0</x:Int32>
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<x:Double x:Key="PivotHeaderItemFontSize">16</x:Double>
|
||||||
|
<Thickness x:Key="PivotHeaderItemMargin">16,0,0,0</Thickness>
|
||||||
|
<Thickness x:Key="PivotItemMargin">0</Thickness>
|
||||||
|
</ResourceDictionary>
|
||||||
21
src/Snap.Hutao/Snap.Hutao/Control/Theme/SettingsStyle.xaml
Normal file
21
src/Snap.Hutao/Snap.Hutao/Control/Theme/SettingsStyle.xaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<!-- Settings -->
|
||||||
|
<x:Double x:Key="SettingsCardSpacing">3</x:Double>
|
||||||
|
<x:Double x:Key="SettingsCardMinHeight">0</x:Double>
|
||||||
|
<x:Double x:Key="SettingsCardWrapThreshold">0</x:Double>
|
||||||
|
<x:Double x:Key="SettingsCardWrapNoIconThreshold">0</x:Double>
|
||||||
|
<Style
|
||||||
|
x:Key="SettingsSectionHeaderTextBlockStyle"
|
||||||
|
BasedOn="{StaticResource BodyStrongTextBlockStyle}"
|
||||||
|
TargetType="TextBlock">
|
||||||
|
<Style.Setters>
|
||||||
|
<Setter Property="Margin" Value="1,29,0,5"/>
|
||||||
|
</Style.Setters>
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="SettingsContentComboBoxStyle"
|
||||||
|
BasedOn="{StaticResource DefaultComboBoxStyle}"
|
||||||
|
TargetType="ComboBox">
|
||||||
|
<Setter Property="MinWidth" Value="120"/>
|
||||||
|
</Style>
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<!-- Modify Window title bar color -->
|
||||||
|
<StaticResource x:Key="WindowCaptionBackground" ResourceKey="ControlFillColorTransparentBrush"/>
|
||||||
|
<StaticResource x:Key="WindowCaptionBackgroundDisabled" ResourceKey="ControlFillColorTransparentBrush"/>
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -75,6 +75,11 @@
|
|||||||
<None Remove="Control\Loading.xaml" />
|
<None Remove="Control\Loading.xaml" />
|
||||||
<None Remove="Control\Panel\PanelSelector.xaml" />
|
<None Remove="Control\Panel\PanelSelector.xaml" />
|
||||||
<None Remove="Control\Theme\FontStyle.xaml" />
|
<None Remove="Control\Theme\FontStyle.xaml" />
|
||||||
|
<None Remove="Control\Theme\InfoBarOverride.xaml" />
|
||||||
|
<None Remove="Control\Theme\PageOverride.xaml" />
|
||||||
|
<None Remove="Control\Theme\PivotOverride.xaml" />
|
||||||
|
<None Remove="Control\Theme\SettingsStyle.xaml" />
|
||||||
|
<None Remove="Control\Theme\WindowOverride.xaml" />
|
||||||
<None Remove="GuideWindow.xaml" />
|
<None Remove="GuideWindow.xaml" />
|
||||||
<None Remove="IdentityStructs.json" />
|
<None Remove="IdentityStructs.json" />
|
||||||
<None Remove="LaunchGameWindow.xaml" />
|
<None Remove="LaunchGameWindow.xaml" />
|
||||||
@@ -298,6 +303,36 @@
|
|||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Update="Control\Theme\SettingsStyle.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Update="Control\Theme\PivotOverride.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Update="Control\Theme\PageOverride.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Update="Control\Theme\WindowOverride.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Update="Control\Theme\InfoBarOverride.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Update="View\Card\Primitive\CardProgressBar.xaml">
|
<Page Update="View\Card\Primitive\CardProgressBar.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
MinHeight="{x:Bind MinHeight, Mode=OneWay}"
|
MinHeight="{x:Bind MinHeight, Mode=OneWay}"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
CornerRadius="{StaticResource CompatCornerRadius}"
|
CornerRadius="{StaticResource ControlCornerRadius}"
|
||||||
Foreground="{x:Bind ProgressForeground, Mode=OneWay}"
|
Foreground="{x:Bind ProgressForeground, Mode=OneWay}"
|
||||||
Maximum="{x:Bind Maximum, Mode=OneWay}"
|
Maximum="{x:Bind Maximum, Mode=OneWay}"
|
||||||
Opacity="{StaticResource LargeBackgroundProgressBarOpacity}"
|
Opacity="{StaticResource LargeBackgroundProgressBarOpacity}"
|
||||||
|
|||||||
@@ -2,14 +2,16 @@
|
|||||||
x:Class="Snap.Hutao.View.Control.HutaoStatisticsCard"
|
x:Class="Snap.Hutao.View.Control.HutaoStatisticsCard"
|
||||||
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"
|
||||||
|
xmlns:cw="using:CommunityToolkit.WinUI"
|
||||||
|
xmlns:cwc="using:CommunityToolkit.WinUI.Controls"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:shch="using:Snap.Hutao.Control.Helper"
|
xmlns:shch="using:Snap.Hutao.Control.Helper"
|
||||||
xmlns:shci="using:Snap.Hutao.Control.Image"
|
xmlns:shci="using:Snap.Hutao.Control.Image"
|
||||||
xmlns:shcm="using:Snap.Hutao.Control.Markup"
|
xmlns:shcm="using:Snap.Hutao.Control.Markup"
|
||||||
xmlns:shcp="using:Snap.Hutao.Control.Panel"
|
|
||||||
xmlns:shvcont="using:Snap.Hutao.View.Control"
|
xmlns:shvcont="using:Snap.Hutao.View.Control"
|
||||||
xmlns:shvg="using:Snap.Hutao.ViewModel.GachaLog"
|
xmlns:shvg="using:Snap.Hutao.ViewModel.GachaLog"
|
||||||
|
cw:Effects.Shadow="{ThemeResource CompatCardShadow}"
|
||||||
d:DataContext="{d:DesignInstance shvg:HutaoWishSummary}"
|
d:DataContext="{d:DesignInstance shvg:HutaoWishSummary}"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
@@ -32,10 +34,11 @@
|
|||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
CornerRadius="{StaticResource CompatCornerRadiusTop}"
|
CornerRadius="{StaticResource ControlCornerRadiusTop}"
|
||||||
Style="{StaticResource BorderGridStyle}">
|
Style="{StaticResource BorderGridStyle}">
|
||||||
<shcp:AspectRatio TargetHeight="320" TargetWidth="690"/>
|
<cwc:ConstrainedBox AspectRatio="1080:533">
|
||||||
<shci:CachedImage Source="{Binding Event.Banner}"/>
|
<shci:CachedImage Source="{Binding Event.Banner}"/>
|
||||||
|
</cwc:ConstrainedBox>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ScrollViewer Grid.Row="1">
|
<ScrollViewer Grid.Row="1">
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<shmmc:QualityConverter x:Key="QualityConverter"/>
|
<shmmc:QualityConverter x:Key="QualityConverter"/>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid CornerRadius="{StaticResource CompatCornerRadius}">
|
<Grid CornerRadius="{StaticResource ControlCornerRadius}">
|
||||||
<!-- Disable some CachedImage's LazyLoading function here can increase response speed -->
|
<!-- Disable some CachedImage's LazyLoading function here can increase response speed -->
|
||||||
<shci:CachedImage EnableLazyLoading="False" Source="{x:Bind Quality, Converter={StaticResource QualityConverter}, Mode=OneWay}"/>
|
<shci:CachedImage EnableLazyLoading="False" Source="{x:Bind Quality, Converter={StaticResource QualityConverter}, Mode=OneWay}"/>
|
||||||
<shci:CachedImage EnableLazyLoading="False" Source="{StaticResource UI_ImgSign_ItemIcon}"/>
|
<shci:CachedImage EnableLazyLoading="False" Source="{StaticResource UI_ImgSign_ItemIcon}"/>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
x:Class="Snap.Hutao.View.Control.StatisticsCard"
|
x:Class="Snap.Hutao.View.Control.StatisticsCard"
|
||||||
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"
|
||||||
|
xmlns:cw="using:CommunityToolkit.WinUI"
|
||||||
xmlns:cwcont="using:CommunityToolkit.WinUI.Controls"
|
xmlns:cwcont="using:CommunityToolkit.WinUI.Controls"
|
||||||
xmlns:cwconv="using:CommunityToolkit.WinUI.Converters"
|
xmlns:cwconv="using:CommunityToolkit.WinUI.Converters"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
@@ -14,6 +15,7 @@
|
|||||||
xmlns:shvconv="using:Snap.Hutao.View.Converter"
|
xmlns:shvconv="using:Snap.Hutao.View.Converter"
|
||||||
xmlns:shvcp="using:Snap.Hutao.View.Card.Primitive"
|
xmlns:shvcp="using:Snap.Hutao.View.Card.Primitive"
|
||||||
xmlns:shvg="using:Snap.Hutao.ViewModel.GachaLog"
|
xmlns:shvg="using:Snap.Hutao.ViewModel.GachaLog"
|
||||||
|
cw:Effects.Shadow="{ThemeResource CompatCardShadow}"
|
||||||
d:DataContext="{d:DesignInstance shvg:TypedWishSummary}"
|
d:DataContext="{d:DesignInstance shvg:TypedWishSummary}"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,7 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
CornerRadius="2">
|
CornerRadius="2">
|
||||||
<Border.Background>
|
<Border.Background>
|
||||||
<SolidColorBrush Opacity="0.6" Color="{ThemeResource SystemAccentColor}"/>
|
<SolidColorBrush Opacity="0.3" Color="{ThemeResource SystemAccentColor}"/>
|
||||||
</Border.Background>
|
</Border.Background>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
FontSize="10"
|
FontSize="10"
|
||||||
@@ -140,7 +140,8 @@
|
|||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,2,0,0"
|
Margin="0,2,0,0"
|
||||||
Style="{StaticResource SecondaryTextStyle}"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
|
Style="{StaticResource CaptionTextBlockStyle}"
|
||||||
Text="{Binding Inner.Description}"
|
Text="{Binding Inner.Description}"
|
||||||
TextTrimming="CharacterEllipsis"/>
|
TextTrimming="CharacterEllipsis"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@@ -264,7 +265,7 @@
|
|||||||
<AppBarToggleButton
|
<AppBarToggleButton
|
||||||
Command="{Binding SortUncompletedSwitchCommand}"
|
Command="{Binding SortUncompletedSwitchCommand}"
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
IsChecked="{Binding IsUncompletedItemsFirst}"
|
IsChecked="{Binding IsUncompletedItemsFirst, Mode=TwoWay}"
|
||||||
Label="{shcm:ResourceString Name=ViewPageAchievementSortIncompletedItemsFirst}"/>
|
Label="{shcm:ResourceString Name=ViewPageAchievementSortIncompletedItemsFirst}"/>
|
||||||
</CommandBar>
|
</CommandBar>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
<DataTemplate x:Key="AnnouncementTemplate">
|
<DataTemplate x:Key="AnnouncementTemplate">
|
||||||
<ItemsRepeater
|
<ItemsRepeater
|
||||||
Margin="16,0,16,16"
|
Margin="16,16,16,16"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
ItemsSource="{Binding List}">
|
ItemsSource="{Binding List}">
|
||||||
<ItemsRepeater.Layout>
|
<ItemsRepeater.Layout>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</ItemsRepeater.Layout>
|
</ItemsRepeater.Layout>
|
||||||
<ItemsRepeater.ItemTemplate>
|
<ItemsRepeater.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<ItemContainer>
|
<ItemContainer cw:Effects.Shadow="{ThemeResource CompatCardShadow}">
|
||||||
<Border Style="{StaticResource BorderCardStyle}">
|
<Border Style="{StaticResource BorderCardStyle}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
<!-- General Description -->
|
<!-- General Description -->
|
||||||
<Border Grid.Row="1" CornerRadius="{StaticResource CompatCornerRadiusBottom}">
|
<Border Grid.Row="1">
|
||||||
<StackPanel Margin="4" VerticalAlignment="Bottom">
|
<StackPanel Margin="4" VerticalAlignment="Bottom">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="4,6,0,0"
|
Margin="4,6,0,0"
|
||||||
|
|||||||
@@ -307,11 +307,10 @@
|
|||||||
<StackPanel
|
<StackPanel
|
||||||
Name="ListImageExportPanel"
|
Name="ListImageExportPanel"
|
||||||
MaxWidth="800"
|
MaxWidth="800"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left">
|
||||||
Background="Transparent">
|
|
||||||
<!-- 卡片面板 -->
|
<!-- 卡片面板 -->
|
||||||
<Border Margin="16" Style="{StaticResource BorderCardStyle}">
|
<Border Margin="16" cw:Effects.Shadow="{ThemeResource CompatCardShadow}">
|
||||||
<Grid>
|
<Grid Style="{StaticResource BorderGridStyle}">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition Height="auto"/>
|
<RowDefinition Height="auto"/>
|
||||||
@@ -320,25 +319,20 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="auto"/>
|
<ColumnDefinition Width="auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<shcp:AspectRatio
|
<cwcont:ConstrainedBox
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
TargetHeight="400"
|
AspectRatio="840:400">
|
||||||
TargetWidth="840"/>
|
|
||||||
<shci:CachedImage
|
<shci:CachedImage
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Source="{Binding SelectedAvatar.NameCard}"
|
Source="{Binding SelectedAvatar.NameCard}"
|
||||||
Stretch="UniformToFill"/>
|
Stretch="UniformToFill"/>
|
||||||
|
</cwcont:ConstrainedBox>
|
||||||
<Rectangle
|
<Rectangle
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Fill="#33000000"
|
Fill="#33000000"/>
|
||||||
Stroke="{x:Null}"/>
|
|
||||||
<Border
|
|
||||||
x:Name="ShadowTarget"
|
|
||||||
Grid.RowSpan="2"
|
|
||||||
Grid.ColumnSpan="2"/>
|
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="16"
|
Margin="16"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
@@ -348,16 +342,10 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="auto"/>
|
<ColumnDefinition Width="auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<shvcont:ItemIcon Icon="{Binding SelectedAvatar.Icon}" Quality="{Binding SelectedAvatar.Quality}">
|
<shvcont:ItemIcon
|
||||||
<cw:Effects.Shadow>
|
cw:Effects.Shadow="{ThemeResource CompatCardShadow}"
|
||||||
<cw:AttachedDropShadow
|
Icon="{Binding SelectedAvatar.Icon}"
|
||||||
BlurRadius="16"
|
Quality="{Binding SelectedAvatar.Quality}"/>
|
||||||
CastTo="{Binding ElementName=ShadowTarget}"
|
|
||||||
IsMasked="False"
|
|
||||||
Opacity="0.6"
|
|
||||||
Offset="4"/>
|
|
||||||
</cw:Effects.Shadow>
|
|
||||||
</shvcont:ItemIcon>
|
|
||||||
<StackPanel Grid.Column="1" Margin="16,0,0,0">
|
<StackPanel Grid.Column="1" Margin="16,0,0,0">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Foreground="#FFFFFFFF"
|
Foreground="#FFFFFFFF"
|
||||||
@@ -397,19 +385,12 @@
|
|||||||
<Button
|
<Button
|
||||||
Padding="0"
|
Padding="0"
|
||||||
BorderBrush="{x:Null}"
|
BorderBrush="{x:Null}"
|
||||||
BorderThickness="0"
|
BorderThickness="0">
|
||||||
CornerRadius="{StaticResource CompatCornerRadius}">
|
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<shvcont:ItemIcon Icon="{Binding Icon}" Quality="{Binding Quality}">
|
<shvcont:ItemIcon
|
||||||
<cw:Effects.Shadow>
|
cw:Effects.Shadow="{ThemeResource CompatCardShadow}"
|
||||||
<cw:AttachedDropShadow
|
Icon="{Binding Icon}"
|
||||||
BlurRadius="16"
|
Quality="{Binding Quality}"/>
|
||||||
CastTo="{Binding ElementName=ShadowTarget}"
|
|
||||||
IsMasked="False"
|
|
||||||
Opacity="0.6"
|
|
||||||
Offset="4"/>
|
|
||||||
</cw:Effects.Shadow>
|
|
||||||
</shvcont:ItemIcon>
|
|
||||||
</Button.Content>
|
</Button.Content>
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
<Flyout Placement="BottomEdgeAlignedLeft">
|
<Flyout Placement="BottomEdgeAlignedLeft">
|
||||||
@@ -603,6 +584,7 @@
|
|||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- 角色属性 -->
|
<!-- 角色属性 -->
|
||||||
<Expander
|
<Expander
|
||||||
Margin="16,0,16,0"
|
Margin="16,0,16,0"
|
||||||
|
|||||||
@@ -351,8 +351,7 @@
|
|||||||
Padding="0"
|
Padding="0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderBrush="{x:Null}"
|
BorderBrush="{x:Null}"
|
||||||
BorderThickness="0"
|
BorderThickness="0">
|
||||||
CornerRadius="{StaticResource CompatCornerRadius}">
|
|
||||||
<shvco:BottomTextControl Text="{Binding Count, Mode=OneWay}">
|
<shvco:BottomTextControl Text="{Binding Count, Mode=OneWay}">
|
||||||
<shvco:ItemIcon Icon="{Binding Inner.Icon, Converter={StaticResource ItemIconConverter}}" Quality="{Binding Inner.RankLevel}"/>
|
<shvco:ItemIcon Icon="{Binding Inner.Icon, Converter={StaticResource ItemIconConverter}}" Quality="{Binding Inner.RankLevel}"/>
|
||||||
</shvco:BottomTextControl>
|
</shvco:BottomTextControl>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
x:Class="Snap.Hutao.View.Page.DailyNotePage"
|
x:Class="Snap.Hutao.View.Page.DailyNotePage"
|
||||||
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"
|
||||||
|
xmlns:cw="using:CommunityToolkit.WinUI"
|
||||||
xmlns:cwc="using:CommunityToolkit.WinUI.Controls"
|
xmlns:cwc="using:CommunityToolkit.WinUI.Controls"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
@@ -187,11 +188,11 @@
|
|||||||
ItemsStretch="Fill"
|
ItemsStretch="Fill"
|
||||||
MinColumnSpacing="12"
|
MinColumnSpacing="12"
|
||||||
MinItemWidth="300"
|
MinItemWidth="300"
|
||||||
MinRowSpacing="-4"/>
|
MinRowSpacing="12"/>
|
||||||
</ItemsRepeater.Layout>
|
</ItemsRepeater.Layout>
|
||||||
<ItemsRepeater.ItemTemplate>
|
<ItemsRepeater.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<ItemContainer>
|
<ItemContainer cw:Effects.Shadow="{ThemeResource CompatCardShadow}">
|
||||||
<ItemContainer.Resources>
|
<ItemContainer.Resources>
|
||||||
<SolidColorBrush x:Key="ItemContainerPointerOverBackground" Color="Transparent"/>
|
<SolidColorBrush x:Key="ItemContainerPointerOverBackground" Color="Transparent"/>
|
||||||
<SolidColorBrush x:Key="ItemContainerPressedBackground" Color="Transparent"/>
|
<SolidColorBrush x:Key="ItemContainerPressedBackground" Color="Transparent"/>
|
||||||
@@ -533,6 +534,5 @@
|
|||||||
</ItemsRepeater>
|
</ItemsRepeater>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</SplitView>
|
</SplitView>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</shc:ScopedPage>
|
</shc:ScopedPage>
|
||||||
|
|||||||
@@ -348,10 +348,9 @@
|
|||||||
Margin="0,16,0,0"
|
Margin="0,16,0,0"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Style="{StaticResource BorderCardStyle}">
|
Style="{StaticResource BorderCardStyle}">
|
||||||
<Grid>
|
<cwc:ConstrainedBox AspectRatio="690:320">
|
||||||
<shcp:AspectRatio TargetHeight="320" TargetWidth="690"/>
|
|
||||||
<shci:CachedImage Source="{Binding SelectedHistoryWish.BannerImage}"/>
|
<shci:CachedImage Source="{Binding SelectedHistoryWish.BannerImage}"/>
|
||||||
</Grid>
|
</cwc:ConstrainedBox>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<Pivot
|
<Pivot
|
||||||
Width="360"
|
Width="360"
|
||||||
Background="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
Background="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
||||||
CornerRadius="{StaticResource CompatCornerRadius}">
|
CornerRadius="{StaticResource ControlCornerRadius}">
|
||||||
<PivotItem Header="{shcm:ResourceString Name=ViewPageHutaoPassportLoginHeader}">
|
<PivotItem Header="{shcm:ResourceString Name=ViewPageHutaoPassportLoginHeader}">
|
||||||
<StackPanel Margin="16">
|
<StackPanel Margin="16">
|
||||||
<TextBox PlaceholderText="{shcm:ResourceString Name=ViewPageHutaoPassportUserNameHint}" Text="{Binding UserName, Mode=TwoWay}"/>
|
<TextBox PlaceholderText="{shcm:ResourceString Name=ViewPageHutaoPassportUserNameHint}" Text="{Binding UserName, Mode=TwoWay}"/>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
x:Class="Snap.Hutao.View.Page.LaunchGamePage"
|
x:Class="Snap.Hutao.View.Page.LaunchGamePage"
|
||||||
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"
|
||||||
|
xmlns:cw="using:CommunityToolkit.WinUI"
|
||||||
xmlns:cwc="using:CommunityToolkit.WinUI.Controls"
|
xmlns:cwc="using:CommunityToolkit.WinUI.Controls"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
@@ -27,10 +28,12 @@
|
|||||||
<Visibility x:Key="VisibilityCollapsed">Collapsed</Visibility>
|
<Visibility x:Key="VisibilityCollapsed">Collapsed</Visibility>
|
||||||
</Page.Resources>
|
</Page.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Rectangle
|
<Grid
|
||||||
Height="{StaticResource AppBarThemeCompactHeight}"
|
Height="{StaticResource AppBarThemeCompactHeight}"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Fill="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||||
|
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
||||||
|
BorderThickness="0,0,0,1"
|
||||||
IsHitTestVisible="False"/>
|
IsHitTestVisible="False"/>
|
||||||
<Pivot>
|
<Pivot>
|
||||||
<Pivot.RightHeader>
|
<Pivot.RightHeader>
|
||||||
@@ -269,6 +272,7 @@
|
|||||||
<StackPanel>
|
<StackPanel>
|
||||||
<shvc:LaunchGameResourceExpander
|
<shvc:LaunchGameResourceExpander
|
||||||
Margin="16,16,16,0"
|
Margin="16,16,16,0"
|
||||||
|
cw:Effects.Shadow="{ThemeResource CompatCardShadow}"
|
||||||
DataContext="{Binding GameResource.PreDownloadGame.Latest, Mode=OneWay}"
|
DataContext="{Binding GameResource.PreDownloadGame.Latest, Mode=OneWay}"
|
||||||
Header="{shcm:ResourceString Name=ViewPageLaunchGameResourcePreDownloadHeader}"
|
Header="{shcm:ResourceString Name=ViewPageLaunchGameResourcePreDownloadHeader}"
|
||||||
Visibility="{Binding FallbackValue={StaticResource VisibilityCollapsed}, Converter={StaticResource EmptyObjectToVisibilityConverter}}"/>
|
Visibility="{Binding FallbackValue={StaticResource VisibilityCollapsed}, Converter={StaticResource EmptyObjectToVisibilityConverter}}"/>
|
||||||
@@ -277,6 +281,7 @@
|
|||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<shvc:LaunchGameResourceExpander
|
<shvc:LaunchGameResourceExpander
|
||||||
Margin="16,16,16,0"
|
Margin="16,16,16,0"
|
||||||
|
cw:Effects.Shadow="{ThemeResource CompatCardShadow}"
|
||||||
DataContext="{Binding Mode=OneWay}"
|
DataContext="{Binding Mode=OneWay}"
|
||||||
Header="{shcm:ResourceString Name=ViewPageLaunchGameResourceDiffHeader}"/>
|
Header="{shcm:ResourceString Name=ViewPageLaunchGameResourceDiffHeader}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@@ -284,6 +289,7 @@
|
|||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
<shvc:LaunchGameResourceExpander
|
<shvc:LaunchGameResourceExpander
|
||||||
Margin="16,16,16,0"
|
Margin="16,16,16,0"
|
||||||
|
cw:Effects.Shadow="{ThemeResource CompatCardShadow}"
|
||||||
DataContext="{Binding GameResource.Game.Latest, Mode=OneWay}"
|
DataContext="{Binding GameResource.Game.Latest, Mode=OneWay}"
|
||||||
Header="{shcm:ResourceString Name=ViewPageLaunchGameResourceLatestHeader}"/>
|
Header="{shcm:ResourceString Name=ViewPageLaunchGameResourceLatestHeader}"/>
|
||||||
<ItemsControl Margin="0,0,0,16" ItemsSource="{Binding GameResource.Game.Diffs, Mode=OneWay}">
|
<ItemsControl Margin="0,0,0,16" ItemsSource="{Binding GameResource.Game.Diffs, Mode=OneWay}">
|
||||||
@@ -291,6 +297,7 @@
|
|||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<shvc:LaunchGameResourceExpander
|
<shvc:LaunchGameResourceExpander
|
||||||
Margin="16,16,16,0"
|
Margin="16,16,16,0"
|
||||||
|
cw:Effects.Shadow="{ThemeResource CompatCardShadow}"
|
||||||
DataContext="{Binding Mode=OneWay}"
|
DataContext="{Binding Mode=OneWay}"
|
||||||
Header="{shcm:ResourceString Name=ViewPageLaunchGameResourceDiffHeader}"/>
|
Header="{shcm:ResourceString Name=ViewPageLaunchGameResourceDiffHeader}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|||||||
@@ -120,11 +120,7 @@
|
|||||||
MaxWidth="800"
|
MaxWidth="800"
|
||||||
Margin="0,0,16,0"
|
Margin="0,0,16,0"
|
||||||
HorizontalAlignment="Left">
|
HorizontalAlignment="Left">
|
||||||
<Border
|
<Border Margin="16,16,0,0" Style="{ThemeResource BorderCardStyle}">
|
||||||
Margin="16,16,0,0"
|
|
||||||
BorderBrush="{StaticResource CardStrokeColorDefault}"
|
|
||||||
BorderThickness="1"
|
|
||||||
CornerRadius="{StaticResource CompatCornerRadius}">
|
|
||||||
<Border.Background>
|
<Border.Background>
|
||||||
<ImageBrush ImageSource="ms-appx:///Resource/Icon/UI_GachaShowPanel_Bg_Weapon.png"/>
|
<ImageBrush ImageSource="ms-appx:///Resource/Icon/UI_GachaShowPanel_Bg_Weapon.png"/>
|
||||||
</Border.Background>
|
</Border.Background>
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
x:Class="Snap.Hutao.View.UserView"
|
x:Class="Snap.Hutao.View.UserView"
|
||||||
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"
|
||||||
xmlns:cwb="using:CommunityToolkit.WinUI.Behaviors"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:mxi="using:Microsoft.Xaml.Interactivity"
|
xmlns:mxi="using:Microsoft.Xaml.Interactivity"
|
||||||
@@ -249,7 +248,6 @@
|
|||||||
<ListView
|
<ListView
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="4"
|
Margin="4"
|
||||||
CanReorderItems="True"
|
|
||||||
ItemsSource="{Binding SelectedUser.UserGameRoles}"
|
ItemsSource="{Binding SelectedUser.UserGameRoles}"
|
||||||
SelectedItem="{Binding SelectedUser.SelectedUserGameRole, Mode=TwoWay}"
|
SelectedItem="{Binding SelectedUser.SelectedUserGameRole, Mode=TwoWay}"
|
||||||
SelectionMode="Single">
|
SelectionMode="Single">
|
||||||
|
|||||||
Reference in New Issue
Block a user