Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Unexpected eraser size; values for two settings options not updated #120

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Ink Canvas/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@
<Bold>开发者:</Bold> XY Wang (WXRIW)
</TextBlock>
<TextBlock FontSize="14" TextWrapping="Wrap">
<Bold>贡献者:</Bold> Kengwang, Raspberry Kan, jiajiaxd, CN-Ironegg, Clover Yan, STBBRD
<Bold>贡献者:</Bold> Kengwang, Raspberry Kan, jiajiaxd, CN-Ironegg, Clover Yan, STBBRD, ChangSakura
</TextBlock>
<TextBlock FontSize="14">
<Bold>开源地址:</Bold>
Expand Down
12 changes: 11 additions & 1 deletion Ink Canvas/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,14 @@ private void LoadSettings(bool isStartup = true)
{
ToggleSwitchEnableTwoFingerZoom.IsOn = false;
}
if (Settings.Gesture.IsEnableTwoFingerTranslate)
{
ToggleSwitchEnableTwoFingerTranslate.IsOn = true;
}
else
{
ToggleSwitchEnableTwoFingerTranslate.IsOn = false;
}
if (Settings.Gesture.IsEnableTwoFingerRotation)
{
ToggleSwitchEnableTwoFingerRotation.IsOn = true;
Expand Down Expand Up @@ -761,6 +769,8 @@ private void LoadSettings(bool isStartup = true)
ComboBoxPenStyle.SelectedIndex = Settings.Canvas.InkStyle;

ComboBoxEraserSize.SelectedIndex = Settings.Canvas.EraserSize;

ComboBoxHyperbolaAsymptoteOption.SelectedIndex = (int)Settings.Canvas.HyperbolaAsymptoteOption;
}
else
{
Expand Down Expand Up @@ -1045,9 +1055,9 @@ private void BtnErase_Click(object sender, RoutedEventArgs e)
forcePointEraser = false;
break;
}
inkCanvas.EraserShape = forcePointEraser ? new EllipseStylusShape(50, 50) : new EllipseStylusShape(5, 5);
inkCanvas.EditingMode =
forcePointEraser ? InkCanvasEditingMode.EraseByPoint : InkCanvasEditingMode.EraseByStroke;
inkCanvas.EraserShape = forcePointEraser ? new EllipseStylusShape(50, 50) : new EllipseStylusShape(5, 5);
drawingShapeMode = 0;
GeometryDrawingEraser.Brush = forcePointEraser
? new SolidColorBrush(Color.FromRgb(0x23, 0xA9, 0xF2))
Expand Down