fix webview title text clipping

This commit is contained in:
DismissedLight
2024-07-08 11:13:38 +08:00
parent 04d4fa0c29
commit 544469f078
2 changed files with 5 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ internal sealed class UpdateLogContentProvider : IWebView2ContentProvider
public RectInt32 InitializePosition(RectInt32 parentRect, double parentDpi)
{
PointInt32 center = parentRect.GetPointInt32(PointInt32Kind.Center);
SizeInt32 size = new SizeInt32(480, 800).Scale(parentDpi);
SizeInt32 size = new SizeInt32(640, 800).Scale(parentDpi);
RectInt32 target = RectInt32Convert.RectInt32(new(center.X - (size.Width / 2), center.Y - (size.Height / 2)), size);
RectInt32 workArea = DisplayArea.GetFromRect(parentRect, DisplayAreaFallback.None).WorkArea;
RectInt32 workAreaShrink = new(workArea.X + 48, workArea.Y + 48, workArea.Width - 96, workArea.Height - 96);

View File

@@ -36,6 +36,10 @@
x:Name="TitleArea"
Grid.Column="2"
IsHitTestVisible="False">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="46"/>
</Grid.ColumnDefinitions>
<TextBlock
x:Name="DocumentTitle"
Margin="12,0,0,0"