summaryrefslogtreecommitdiff
path: root/grapher/Form1.cs
diff options
context:
space:
mode:
authora1xd <[email protected]>2020-10-08 02:08:27 -0400
committera1xd <[email protected]>2020-10-08 06:36:50 -0400
commit37d2cb7d3ed25862683ef807712c7d50f71e8493 (patch)
tree3852439d718d36a79ebf8b778e82ee5c06461eeb /grapher/Form1.cs
parentadd toggle button + save gui settings on close (diff)
downloadrawaccel-37d2cb7d3ed25862683ef807712c7d50f71e8493.tar.xz
rawaccel-37d2cb7d3ed25862683ef807712c7d50f71e8493.zip
add scroll to charts
Diffstat (limited to 'grapher/Form1.cs')
-rw-r--r--grapher/Form1.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/grapher/Form1.cs b/grapher/Form1.cs
index 91cc4e2..a0d2fae 100644
--- a/grapher/Form1.cs
+++ b/grapher/Form1.cs
@@ -155,11 +155,35 @@ namespace grapher
}
+ public void ResetAutoScroll()
+ {
+ panel2.AutoScrollPosition = Constants.Origin;
+ }
+
+ public void DoResize()
+ {
+ ResetAutoScroll();
+
+ var wa = Screen.PrimaryScreen.WorkingArea;
+ var pref2 = panel2.GetPreferredSize(Constants.MaxSize);
+
+ Size = new Size
+ {
+ Width = Math.Min(wa.Width - Location.X, panel1.Size.Width + pref2.Width),
+ Height = Math.Min(wa.Height - Location.Y, pref2.Height + 48)
+ };
+ }
+
private void RawAcceleration_Paint(object sender, PaintEventArgs e)
{
//AccelGUI.AccelCharts.DrawLastMovement();
}
#endregion Method
+
+ private void panel1_Paint(object sender, PaintEventArgs e)
+ {
+
+ }
}
}