From 2723739a02519809e0cebea6ce788bbce6f7cf87 Mon Sep 17 00:00:00 2001 From: feos Date: Sun, 22 Nov 2015 19:54:21 +0300 Subject: [PATCH] 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 --- .../tools/TAStudio/BookmarksBranchesBox.cs | 6 ++++-- .../tools/TAStudio/ScreenshotPopupControl.Designer.cs | 3 ++- .../tools/TAStudio/ScreenshotPopupControl.cs | 10 ++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs index d0ee563907..0e2d80c095 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs @@ -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); diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotPopupControl.Designer.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotPopupControl.Designer.cs index 39f6bfd220..3a6174ac5e 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotPopupControl.Designer.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotPopupControl.Designer.cs @@ -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 diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotPopupControl.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotPopupControl.cs index b55226ca75..4295aa1413 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotPopupControl.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotPopupControl.cs @@ -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 + } } }