tastudio: screenshot control tweaks.

- don't cut it on the left if tasview is narrow, push it right instead
- don't hide it instantly if it spawns right under the mouse cursor, hide it if mouse leaves *it*, not branch control
- keep consistent Y position
This commit is contained in:
feos 2015-11-22 19:54:21 +03:00
parent 099e37ad76
commit 2723739a02
3 changed files with 16 additions and 3 deletions

View File

@ -277,7 +277,7 @@ namespace BizHawk.Client.EmuHawk
private void BranchView_MouseLeave(object sender, EventArgs e)
{
Tastudio.ScreenshotControl.Visible = false;
// Tastudio.ScreenshotControl.Visible = false;
}
private void ScreenShotPopUp(TasBranch branch, int index)
@ -286,7 +286,9 @@ namespace BizHawk.Client.EmuHawk
this.Parent.PointToScreen(this.Location));
int x = locationOnForm.X - Tastudio.ScreenshotControl.Width;
int y = locationOnForm.Y + (BranchView.RowHeight * index);
int y = locationOnForm.Y; // keep consistent height, helps when conparing screenshots
if (x < 0) x = 0;
Tastudio.ScreenshotControl.Location = new Point(x, y);

View File

@ -38,7 +38,8 @@
this.Size = new System.Drawing.Size(237, 255);
this.Load += new System.EventHandler(this.ScreenshotPopupControl_Load);
this.ResumeLayout(false);
this.MouseLeave += new System.EventHandler(ScreenshotPopupControl_MouseLeave);
this.MouseHover += new System.EventHandler(ScreenshotPopupControl_MouseHover);
}
#endregion

View File

@ -31,5 +31,15 @@ namespace BizHawk.Client.EmuHawk
e.Graphics.DrawImage(bitmap, new Rectangle(0, 0, Width, Height));
base.OnPaint(e);
}
private void ScreenshotPopupControl_MouseLeave(object sender, EventArgs e)
{
Visible = false;
}
private void ScreenshotPopupControl_MouseHover(object sender, EventArgs e)
{
// todo: switch screenshots by hotkey
}
}
}