Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GUI] Move menu to cursor location instead of far right of the rectangle #906

Conversation

Rock-N-Troll
Copy link

@Rock-N-Troll Rock-N-Troll commented Mar 26, 2021

Before:
image

After:
image

Previous code moved the selection menu to the far top right of the screen.
Instead, the selection menu should intuitively be right next to where you click.

@Rock-N-Troll Rock-N-Troll changed the title move to cursor location instead of far right of the rectangle Move menu to cursor location instead of far right of the rectangle Mar 26, 2021
@Rock-N-Troll Rock-N-Troll changed the title Move menu to cursor location instead of far right of the rectangle [GUI] Move menu to cursor location instead of far right of the rectangle Mar 26, 2021
@codeofalltrades codeofalltrades added Component: GUI Primarily related to the display of the user interface Tag: TransactionRecords The display of transaction information labels Mar 26, 2021
@Rock-N-Troll
Copy link
Author

Rock-N-Troll commented Mar 26, 2021

I did another test and although the selection window moves to the cursor, it doesn't want to stay open long enough to move the cursor to one of the selections....will need to revisit

Update: Seems like the window closes too quickly for no reason.

@Rock-N-Troll
Copy link
Author

The timeout really has no effect on my system because the click action immediately activates the mouse enter event, but still good to include.

The original singleshot timer approach didn't reset the timer each time you click. It will always hide the widget after 3.5 seconds. This approach will always reset the timer even though the mouse over event disables the timer and is triggered immediately on click.

@codeofalltrades codeofalltrades added the Tag: Waiting For Code Review Waiting for code review from a core developer label Mar 27, 2021
@Rock-N-Troll Rock-N-Troll force-pushed the address_options_move_to_cursor branch from 315c501 to 22829f3 Compare March 28, 2021 21:48
Copy link
Collaborator

@CaveSpectre11 CaveSpectre11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure the timer is working; but I like the behavior I'm seeing.

ACK 22829f3

@Rock-N-Troll
Copy link
Author

Rock-N-Troll commented Apr 4, 2021

The timer is basically a "just in case" the mouse isn't somehow over it on click now that the mouse enter event immediately occurs which also stops the timeout timer.

@codeofalltrades
Copy link
Collaborator

If I go to the far right and click the menu is hidden behind the right nav.
Maybe z-index on the pop up would fix it?
image

@codeofalltrades codeofalltrades added Dev Status: In Progress Someone is actively working on this issue. and removed Tag: Waiting For Code Review Waiting for code review from a core developer labels Apr 6, 2021
@Rock-N-Troll Rock-N-Troll force-pushed the address_options_move_to_cursor branch from e8f12f1 to 343482e Compare April 6, 2021 03:44
@Rock-N-Troll
Copy link
Author

adjusted (but it was a pain to guess and test this one):

image

@codeofalltrades
Copy link
Collaborator

Ready for code review and QA?

@WetOne
Copy link
Collaborator

WetOne commented Apr 11, 2021

If one has enough address to fill the screen, clicking the bottom address cuts the menu at the bottom of the screen (I only see "copy" not "copy" and "edit"). After, my window scrolls so that the clicked address is no longer the bottom (but is still highlighted).

@Rock-N-Troll
Copy link
Author

Would you happen to have a screenshot of the issue for better understanding?

@WetOne
Copy link
Collaborator

WetOne commented Apr 11, 2021

image

@CaveSpectre11 CaveSpectre11 self-requested a review April 11, 2021 18:23
@CaveSpectre11
Copy link
Collaborator

If one has enough address to fill the screen, clicking the bottom address cuts the menu at the bottom of the screen (I only see "copy" not "copy" and "edit"). After, my window scrolls so that the clicked address is no longer the bottom (but is still highlighted).

Nice catch @WetOne . I've seen in the past with other applications that when there's not enough room to bring up the menu where it normally brings it up, it basically flips the anchor point. E.g. With the menu coming up with the pointer to the top left, if it was too close to the right side, it would make the anchor point top right, too close to the bottom, anchor bottom left. Too close to the bottom right corner, anchor bottom right.

@Rock-N-Troll Rock-N-Troll changed the title [GUI] Move menu to cursor location instead of far right of the rectangle [WIP][GUI] Move menu to cursor location instead of far right of the rectangle Apr 11, 2021
@Rock-N-Troll
Copy link
Author

If one has enough address to fill the screen, clicking the bottom address cuts the menu at the bottom of the screen (I only see "copy" not "copy" and "edit"). After, my window scrolls so that the clicked address is no longer the bottom (but is still highlighted).

Nice catch @WetOne . I've seen in the past with other applications that when there's not enough room to bring up the menu where it normally brings it up, it basically flips the anchor point. E.g. With the menu coming up with the pointer to the top left, if it was too close to the right side, it would make the anchor point top right, too close to the bottom, anchor bottom left. Too close to the bottom right corner, anchor bottom right.

Let me see if I can copy that behavior. Good suggestions both.

-Adjustment for timeout and enter and leave mouse event
-remove commented out code
this took way too long
fix for off-screen dropdown
@Rock-N-Troll Rock-N-Troll force-pushed the address_options_move_to_cursor branch from 343482e to 51bd07e Compare April 11, 2021 19:36
@Rock-N-Troll
Copy link
Author

@WetOne fix applied. Please retest when you get a chance. Thank you

@Rock-N-Troll Rock-N-Troll changed the title [WIP][GUI] Move menu to cursor location instead of far right of the rectangle [GUI] Move menu to cursor location instead of far right of the rectangle Apr 11, 2021
@WetOne
Copy link
Collaborator

WetOne commented Apr 11, 2021

ack 51bd07e

@codeofalltrades codeofalltrades added Tag: Waiting For Code Review Waiting for code review from a core developer and removed Dev Status: In Progress Someone is actively working on this issue. Tag: Waiting For Developer labels May 6, 2021
Copy link
Collaborator

@codeofalltrades codeofalltrades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 51bd07e

@codeofalltrades codeofalltrades added Code Review: Passed Tag: Waiting For QA A pull review is waiting for QA to test the pull request and removed Tag: Waiting For Code Review Waiting for code review from a core developer labels May 22, 2021
@codeofalltrades codeofalltrades merged commit 2eb430d into Veil-Project:master May 25, 2021
@seanPhill seanPhill removed Tag: Waiting For QA A pull review is waiting for QA to test the pull request Code Review: Passed labels Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: GUI Primarily related to the display of the user interface Tag: TransactionRecords The display of transaction information
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants