mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f66ad3b4e1 | ||
|
|
9d47082f47 | ||
|
|
cd4516d9a7 |
@@ -27,7 +27,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
||||
|
||||
private bool registered;
|
||||
|
||||
private bool modifierHasWindows;
|
||||
private bool modifierHasControl;
|
||||
private bool modifierHasShift;
|
||||
private bool modifierHasAlt;
|
||||
@@ -52,7 +51,10 @@ internal sealed class HotKeyCombination : ObservableObject
|
||||
isEnabled = LocalSetting.Get($"{settingKey}.IsEnabled", true);
|
||||
|
||||
HotKeyParameter actual = LocalSettingGetHotKeyParameter();
|
||||
modifiers = actual.Modifiers;
|
||||
|
||||
// HOT_KEY_MODIFIERS.MOD_WIN is reversed for use by the OS.
|
||||
// It should not be used by the application.
|
||||
modifiers = actual.Modifiers & ~HOT_KEY_MODIFIERS.MOD_WIN;
|
||||
InitializeModifiersCompositionFields();
|
||||
key = actual.Key;
|
||||
|
||||
@@ -61,18 +63,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
||||
}
|
||||
|
||||
#region Binding Property
|
||||
public bool ModifierHasWindows
|
||||
{
|
||||
get => modifierHasWindows;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref modifierHasWindows, value))
|
||||
{
|
||||
UpdateModifiers();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool ModifierHasControl
|
||||
{
|
||||
get => modifierHasControl;
|
||||
@@ -218,11 +208,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
||||
{
|
||||
StringBuilder stringBuilder = new();
|
||||
|
||||
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_WIN))
|
||||
{
|
||||
stringBuilder.Append("Win").Append(" + ");
|
||||
}
|
||||
|
||||
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_CONTROL))
|
||||
{
|
||||
stringBuilder.Append("Ctrl").Append(" + ");
|
||||
@@ -247,11 +232,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
||||
{
|
||||
HOT_KEY_MODIFIERS modifiers = default;
|
||||
|
||||
if (ModifierHasWindows)
|
||||
{
|
||||
modifiers |= HOT_KEY_MODIFIERS.MOD_WIN;
|
||||
}
|
||||
|
||||
if (ModifierHasControl)
|
||||
{
|
||||
modifiers |= HOT_KEY_MODIFIERS.MOD_CONTROL;
|
||||
@@ -272,11 +252,6 @@ internal sealed class HotKeyCombination : ObservableObject
|
||||
|
||||
private void InitializeModifiersCompositionFields()
|
||||
{
|
||||
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_WIN))
|
||||
{
|
||||
modifierHasWindows = true;
|
||||
}
|
||||
|
||||
if (Modifiers.HasFlag(HOT_KEY_MODIFIERS.MOD_CONTROL))
|
||||
{
|
||||
modifierHasControl = true;
|
||||
|
||||
@@ -2664,7 +2664,7 @@
|
||||
<value>高级功能</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingKeyShortcutAutoClickingDescription" xml:space="preserve">
|
||||
<value>更改自动连点功能的快捷键</value>
|
||||
<value>更改自动连点功能的快捷键,仅管理员模式下生效</value>
|
||||
</data>
|
||||
<data name="ViewPageSettingKeyShortcutAutoClickingHeader" xml:space="preserve">
|
||||
<value>自动连点</value>
|
||||
@@ -3257,4 +3257,4 @@
|
||||
<data name="WindowIdentifyMonitorHeader" xml:space="preserve">
|
||||
<value>显示器编号</value>
|
||||
</data>
|
||||
</root>
|
||||
</root>
|
||||
@@ -437,7 +437,7 @@
|
||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||
Style="{ThemeResource SettingButtonStyle}">
|
||||
<Button.Flyout>
|
||||
<Flyout FlyoutPresenterStyle="{ThemeResource FlyoutPresenterPadding16And10Style}">
|
||||
<Flyout FlyoutPresenterStyle="{ThemeResource FlyoutPresenterPadding16And10Style}" ShouldConstrainToRootBounds="False">
|
||||
<cwc:UniformGrid
|
||||
ColumnSpacing="16"
|
||||
Columns="2"
|
||||
@@ -447,7 +447,7 @@
|
||||
MinWidth="64"
|
||||
VerticalAlignment="Center"
|
||||
Content="Win"
|
||||
IsChecked="{Binding HotKeyOptions.MouseClickRepeatForeverKeyCombination.ModifierHasWindows, Mode=TwoWay}"/>
|
||||
IsEnabled="False"/>
|
||||
<CheckBox
|
||||
MinWidth="64"
|
||||
VerticalAlignment="Center"
|
||||
|
||||
@@ -104,8 +104,10 @@
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
<cwc:SwitchPresenter Grid.Row="1" Value="{Binding ElementName=ItemsPanelSelector, Path=Current}">
|
||||
|
||||
<cwc:SwitchPresenter
|
||||
Grid.Row="1"
|
||||
ContentTransitions="{ThemeResource EntranceThemeTransitions}"
|
||||
Value="{Binding ElementName=ItemsPanelSelector, Path=Current}">
|
||||
<cwc:Case Value="List">
|
||||
<Border Margin="16,0,16,16" cw:Effects.Shadow="{ThemeResource CompatCardShadow}">
|
||||
<Border Style="{ThemeResource AcrylicBorderCardStyle}">
|
||||
@@ -113,7 +115,7 @@
|
||||
DisplayMode="Inline"
|
||||
IsPaneOpen="True"
|
||||
OpenPaneLength="{StaticResource CompatSplitViewOpenPaneLength2}"
|
||||
PaneBackground="{StaticResource CardBackgroundFillColorSecondary}">
|
||||
PaneBackground="{ThemeResource CardBackgroundFillColorSecondaryBrush}">
|
||||
<SplitView.Pane>
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
DisplayMode="Inline"
|
||||
IsPaneOpen="True"
|
||||
OpenPaneLength="{StaticResource CompatSplitViewOpenPaneLength}"
|
||||
PaneBackground="{StaticResource CardBackgroundFillColorSecondary}">
|
||||
PaneBackground="{ThemeResource CardBackgroundFillColorSecondaryBrush}">
|
||||
<SplitView.Pane>
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
|
||||
@@ -372,8 +372,13 @@ internal sealed partial class AchievementViewModel : Abstraction.ViewModel, INav
|
||||
|
||||
private void UpdateAchievementsFinishPercent()
|
||||
{
|
||||
// 保存成就状态时,需要保持当前选择的成就分类
|
||||
AchievementGoalView? currentSelectedAchievementGoal = SelectedAchievementGoal;
|
||||
|
||||
// 仅 读取成就列表 与 保存成就状态 时需要刷新成就进度
|
||||
AchievementFinishPercent.Update(this);
|
||||
|
||||
SelectedAchievementGoal = currentSelectedAchievementGoal;
|
||||
}
|
||||
|
||||
[Command("SaveAchievementCommand")]
|
||||
|
||||
Reference in New Issue
Block a user