diff options
| author | a1xd <[email protected]> | 2020-10-08 02:08:27 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2020-10-08 06:36:50 -0400 |
| commit | 37d2cb7d3ed25862683ef807712c7d50f71e8493 (patch) | |
| tree | 3852439d718d36a79ebf8b778e82ee5c06461eeb /grapher/Form1.cs | |
| parent | add toggle button + save gui settings on close (diff) | |
| download | rawaccel-37d2cb7d3ed25862683ef807712c7d50f71e8493.tar.xz rawaccel-37d2cb7d3ed25862683ef807712c7d50f71e8493.zip | |
add scroll to charts
Diffstat (limited to 'grapher/Form1.cs')
| -rw-r--r-- | grapher/Form1.cs | 24 |
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) + { + + } } } |