mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
fix #566
This commit is contained in:
@@ -83,16 +83,6 @@ internal sealed class ExtendedWindow<TWindow> : IRecipient<BackdropTypeChangedMe
|
||||
UpdateDragRectangles(appWindow.TitleBar, message.IsOpen);
|
||||
}
|
||||
|
||||
private static (string PosString, string SizeString) GetPostionAndSize(AppWindow appWindow)
|
||||
{
|
||||
PointInt32 pos = appWindow.Position;
|
||||
string posString = $"{pos.X},{pos.Y}";
|
||||
SizeInt32 size = appWindow.Size;
|
||||
string sizeString = $"{size.Width},{size.Height}";
|
||||
|
||||
return (posString, sizeString);
|
||||
}
|
||||
|
||||
private void InitializeWindow()
|
||||
{
|
||||
appWindow.Title = string.Format(SH.AppNameAndVersion, CoreEnvironment.Version);
|
||||
@@ -101,10 +91,6 @@ internal sealed class ExtendedWindow<TWindow> : IRecipient<BackdropTypeChangedMe
|
||||
|
||||
Persistence.RecoverOrInit(appWindow, window.PersistSize, window.InitSize);
|
||||
|
||||
// Log basic window state here.
|
||||
(string pos, string size) = GetPostionAndSize(appWindow);
|
||||
logger.LogInformation("Postion: [{pos}], Size: [{size}]", pos, size);
|
||||
|
||||
// appWindow.Show(true);
|
||||
// appWindow.Show can't bring window to top.
|
||||
window.Activate();
|
||||
@@ -192,6 +178,11 @@ internal sealed class ExtendedWindow<TWindow> : IRecipient<BackdropTypeChangedMe
|
||||
// 48 is the navigation button leftInset
|
||||
RectInt32 dragRect = StructMarshal.RectInt32(new(48, 0), titleBar.ActualSize).Scale(scale);
|
||||
appTitleBar.SetDragRectangles(dragRect.Enumerate().ToArray());
|
||||
|
||||
// workaround for https://github.com/microsoft/WindowsAppSDK/issues/2976
|
||||
SizeInt32 size = appWindow.ClientSize;
|
||||
size.Height -= (int)(31 * scale);
|
||||
appWindow.ResizeClient(size);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,4 +62,4 @@ internal sealed partial class LaunchGameWindow : Window, IDisposable, IExtendedW
|
||||
pInfo->ptMaxTrackSize.X = (int)Math.Min(MaxWidth * scalingFactor, pInfo->ptMaxTrackSize.X);
|
||||
pInfo->ptMaxTrackSize.Y = (int)Math.Min(MaxHeight * scalingFactor, pInfo->ptMaxTrackSize.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,7 @@ internal sealed class FetterInfo
|
||||
/// <summary>
|
||||
/// 料理
|
||||
/// </summary>
|
||||
public CookBonus? CookBonus2 { get; set; }
|
||||
public CookBonus? CookBonus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 好感语音
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<Identity
|
||||
Name="60568DGPStudio.SnapHutao"
|
||||
Publisher="CN=35C8E923-85DF-49A7-9172-B39DC6312C52"
|
||||
Version="1.4.15.0" />
|
||||
Version="1.5.1.0" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>Snap Hutao</DisplayName>
|
||||
|
||||
@@ -319,6 +319,7 @@ internal sealed class PackageConverter
|
||||
// System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
|
||||
|
||||
// We want to retry forever.
|
||||
fileStream.Seek(0, SeekOrigin.Begin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
|
||||
<AppxSymbolPackageEnabled>False</AppxSymbolPackageEnabled>
|
||||
<GenerateTestArtifacts>False</GenerateTestArtifacts>
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
<AppxBundle>Never</AppxBundle>
|
||||
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
|
||||
<StartupObject>Snap.Hutao.Program</StartupObject>
|
||||
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_MAIN;DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION;DISABLE_XAML_GENERATED_BINDING_DEBUG_OUTPUT</DefineConstants>
|
||||
|
||||
@@ -139,7 +139,7 @@ internal sealed class WikiAvatarViewModel : Abstraction.ViewModel
|
||||
foreach (Avatar avatar in avatars)
|
||||
{
|
||||
avatar.Collocation = idCollocations.GetValueOrDefault(avatar.Id);
|
||||
avatar.CookBonusView ??= CookBonusView.Create(avatar.FetterInfo.CookBonus2, idMaterialMap);
|
||||
avatar.CookBonusView ??= CookBonusView.Create(avatar.FetterInfo.CookBonus, idMaterialMap);
|
||||
avatar.CultivationItemsView ??= avatar.CultivationItems.SelectList(i => idMaterialMap[i]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user