fix: align ink overlay DPI and ignore include-ink toolbar clicks

This commit is contained in:
tayasui rainnya!
2026-04-09 13:07:28 +08:00
parent 8b2bc352a6
commit 36e47cec43
3 changed files with 9 additions and 3 deletions
+3 -2
View File
@@ -374,11 +374,12 @@ namespace Ink_Canvas
dc.DrawRectangle(visualBrush, null, inkRectDip);
}
var dpi = 96.0 * dpiScale;
var rtb = new RenderTargetBitmap(
Math.Max(1, virtualScreen.Width),
Math.Max(1, virtualScreen.Height),
96,
96,
dpi,
dpi,
PixelFormats.Pbgra32);
rtb.Render(drawingVisual);
rtb.Freeze();
@@ -155,7 +155,8 @@
Foreground="White"
Checked="IncludeInkCheckBox_Checked"
Unchecked="IncludeInkCheckBox_Unchecked" />
<Rectangle Width="1"
<Rectangle Name="ToolbarDividerRectangle"
Width="1"
Height="20"
Fill="#404040"
Margin="8,0" />
@@ -628,10 +628,12 @@ namespace Ink_Canvas
if (hitElement != null && (
hitElement is Ellipse ||
hitElement is System.Windows.Controls.Button ||
hitElement is System.Windows.Controls.CheckBox ||
hitElement is Border ||
hitElement is TextBlock ||
hitElement is StackPanel ||
hitElement is Separator ||
hitElement.Name == "ToolbarDividerRectangle" ||
hitElement.Name == "SizeInfoBorder" ||
hitElement.Name == "HintText" ||
hitElement.Name == "AdjustModeHint" ||
@@ -719,10 +721,12 @@ namespace Ink_Canvas
if (hitElement != null && (
hitElement is Ellipse ||
hitElement is System.Windows.Controls.Button ||
hitElement is System.Windows.Controls.CheckBox ||
hitElement is Border ||
hitElement is TextBlock ||
hitElement is StackPanel ||
hitElement is Separator ||
hitElement.Name == "ToolbarDividerRectangle" ||
hitElement.Name == "SizeInfoBorder" ||
hitElement.Name == "HintText" ||
hitElement.Name == "AdjustModeHint"))