BizHawk icon indicating copy to clipboard operation
BizHawk copied to clipboard

TAStudio marker edit dialogue box spawns in bad locations

Open RetroEdit opened this issue 2 years ago • 6 comments

In BizHawk 2.9.1, creating a marker (via double clicking or the 'Add marker with text' icon) will spawn the marker edit dialogue box where the mouse cursor is.

This behavior doesn't make sense to me, and it's often in an inconvenient location. By contrast, the 'Edit Marker Text' icon always places the edit dialogue consistently and conveniently in the center of the TAStudio window, but it can't be used to create new markers.

Preferred behavior: all methods of editing marker text place the dialogue box in the same location.

Host env.

  • BizHawk 2.9.1; Win11 Home 22H2; Intel/Intel

RetroEdit avatar Jul 24 '23 17:07 RetroEdit

Oh wait, I just realized I reported this a while ago, and it was resolved as "won't fix": #2369 (edit: seems unrelated --yoshi)

I have some new context here of inconsistent behavior, but I won't be offended if this also resolves the same way.

RetroEdit avatar Jul 28 '23 16:07 RetroEdit

Ah least the double click behavior was explicitly coded to spawn the dialog box on the cursor location: https://github.com/TASEmulators/BizHawk/blob/4f144c74d47021018bc3252393db8685d98d58c7/src/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs#L234-L240

So I wanna say this is intended behavior? I personally don't find this bothersome at all, but arguably the inconsistency in behavior doesn't really make sense.

Morilli avatar Jun 25 '24 20:06 Morilli

IMO all modal dialogs should appear centred on their parent window, no exceptions.

YoshiRulz avatar Jun 25 '24 21:06 YoshiRulz

IMO all modal dialogs should appear in centred on their parent window, no exceptions.

How many tastudio markers did you create in your life?

vadosnaprimer avatar Jun 25 '24 22:06 vadosnaprimer

it's often in an inconvenient location

Could you elaborate on this? If you move the mouse to click on an icon and the shown dialog box appears directly under the mouse, where's the issue in that?

Morilli avatar Aug 21 '24 22:08 Morilli

Late reply (somehow I was unsubscribed from this GitHub issue), but I believe there was an issue of it getting offset when the TAStudio window is near the edge of the screen. I also recall some situations where it would spawn the dialog box in the place it was previously instead of relative to the current window.

In some cursory testing in 2.9.1, I'm not observing either of these two issues (which is weird: maybe they show up only in edge cases or I got confused when filing this issue?), though I do think if the standard is going to be mouse cursor centered, that should extend to the "edit cursor text" button.

RetroEdit avatar Sep 13 '24 21:09 RetroEdit

feos insisted on the dialog appearing under the cursor—not beside the cell under the cursor, not near the cursor, exactly under it—so I have done so. Clicking (or selecting with the keyboard) the buttons in the right pane does not open it under the cursor. And as a reminder, you've always been able to close the dialog with Enter after typing in a new value.

There are a few instances of FormStartPosition.Manual left in the codebase, but I believe they're all either centred on their "parent Control" (TAStudio piano roll), or take a position from Lua.

YoshiRulz avatar Nov 28 '24 14:11 YoshiRulz

I insisted on making it optional so the author of this issue could have their own workflow.

And forcing it to the center when hitting GUI buttons has the same problems as input roll marker clicking: when the dialog height occupies your entire screen and you're looking at the very bottom to click that button, the dialog appears in the middle instead, and looking back and forth every time serves no productive purpose, which is why it was initially attached to cursor position 8 years ago.

So now both parties are equally unhappy I guess.

vadosnaprimer avatar Nov 28 '24 14:11 vadosnaprimer

I've reread the OP once again and it looks like the only problem was that some GUI buttons don't spawn those dialogs under the cursor while others do. That's the problematic inconsistency which needed to be fixed, which I'll do.

vadosnaprimer avatar Nov 28 '24 15:11 vadosnaprimer

In some cursory testing in 2.9.1, I'm not observing either of these two issues (which is weird: maybe they show up only in edge cases or I got confused when filing this issue?), though I do think if the standard is going to be mouse cursor centered, that should extend to the "edit cursor text" button.

Done in 28757bd8bef8633f89f119ab00a2f91e79db936c.

vadosnaprimer avatar Dec 01 '24 19:12 vadosnaprimer