Skip to content

Commit 0d8cc3e

Browse files
committed
Fixed multiple thread safety and stability issues
1 parent 9f7daa5 commit 0d8cc3e

46 files changed

Lines changed: 2198 additions & 1229 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

TabletDriverGUI/Configuration.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ public class TabletViewSettings
122122
public Point OffsetText;
123123
public Point OffsetPressure;
124124
public bool FadeInOut;
125+
public bool Borderless;
125126
public TabletViewSettings()
126127
{
127128
BackgroundColor = "#FFFFFF";
@@ -133,11 +134,12 @@ public TabletViewSettings()
133134
InputTrailLength = 30;
134135
OutputTrailLength = 30;
135136
DrawLength = 0;
136-
Font = "Arial";
137+
Font = "Segoe UI";
137138
FontSize = 25;
138139
OffsetPressure = new Point(0, 0);
139140
OffsetText = new Point(0, 0);
140141
FadeInOut = false;
142+
Borderless = false;
141143
}
142144
};
143145
public TabletViewSettings TabletView;

TabletDriverGUI/MainWindow.Areas.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -908,18 +908,19 @@ void UpdateAreaInformation()
908908

909909
// Screen area
910910
labelScreenAreaInfo.Content = areaText +
911-
"" + Utils.GetNumberString(config.SelectedScreenArea.Width / config.SelectedScreenArea.Height, "0.000") + ":1" +
912-
" | " + Utils.GetNumberString(config.SelectedScreenArea.Width * config.SelectedScreenArea.Height, "0") + " pixels";
911+
Utils.GetNumberString(config.SelectedScreenArea.Width / config.SelectedScreenArea.Height, "0.000") + ":1 | " +
912+
Utils.GetNumberString(config.SelectedScreenArea.Width * config.SelectedScreenArea.Height, "0") + " pixels";
913913

914914
// Tablet area
915915
labelTabletAreaInfo.Content = areaText +
916-
"" + Utils.GetNumberString(config.SelectedTabletArea.Width / config.SelectedTabletArea.Height, "0.000") + ":1" +
917-
" | " + Utils.GetNumberString(config.SelectedTabletArea.Width * config.SelectedTabletArea.Height, "0") + " mm²" +
918-
" " + Utils.GetNumberString(
916+
Utils.GetNumberString(config.SelectedTabletArea.Width / config.SelectedTabletArea.Height, "0.000") + ":1 | " +
917+
Utils.GetNumberString(config.SelectedTabletArea.Width * config.SelectedTabletArea.Height, "0") + " mm² " +
918+
Utils.GetNumberString(
919919
config.SelectedTabletArea.Width * config.SelectedTabletArea.Height /
920920
(config.TabletFullArea.Width * config.TabletFullArea.Height) * 100.0
921-
, "0") + "%" +
922-
" | " + Utils.GetNumberString(config.SelectedScreenArea.Width / config.SelectedTabletArea.Width, "0.0") + " x " +
921+
, "0") + "% of " +
922+
Utils.GetNumberString(config.TabletFullArea.Width) + "x" + Utils.GetNumberString(config.TabletFullArea.Height) + " mm | " +
923+
Utils.GetNumberString(config.SelectedScreenArea.Width / config.SelectedTabletArea.Width, "0.0") + "x" +
923924
Utils.GetNumberString(config.SelectedScreenArea.Height / config.SelectedTabletArea.Height, "0.0") + " px/mm";
924925

925926
}
@@ -995,7 +996,7 @@ private void CanvasArea_MouseUp(object sender, MouseButtonEventArgs e)
995996
canvasTabletArea.ReleaseMouseCapture();
996997

997998
// Focus
998-
if(sender == canvasScreenMap)
999+
if (sender == canvasScreenMap)
9991000
canvasScreenMap.Focus();
10001001
else if (sender == canvasTabletArea)
10011002
canvasTabletArea.Focus();

TabletDriverGUI/MainWindow.Settings.cs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,17 +1401,6 @@ private void MainMenuClick(object sender, RoutedEventArgs e)
14011401
}
14021402

14031403

1404-
//
1405-
// Fit window to content
1406-
//
1407-
else if (sender == mainMenuFitToContent)
1408-
{
1409-
SizeToContent = SizeToContent.WidthAndHeight;
1410-
UpdateLayout();
1411-
SizeToContent = SizeToContent.Manual;
1412-
}
1413-
1414-
14151404
//
14161405
// Update desktop image
14171406
//
@@ -1433,6 +1422,15 @@ private void MainMenuClick(object sender, RoutedEventArgs e)
14331422
}
14341423

14351424

1425+
//
1426+
// Fit window to content
1427+
//
1428+
else if (sender == mainMenuFitToContent)
1429+
{
1430+
SizeToContent = SizeToContent.WidthAndHeight;
1431+
UpdateLayout();
1432+
SizeToContent = SizeToContent.Manual;
1433+
}
14361434

14371435
}
14381436

0 commit comments

Comments
 (0)