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

Convert all tool Popups to floating windows #1658

Merged
merged 23 commits into from
May 10, 2024

Commits on May 8, 2024

  1. Refactored tool popup code to use floating windows instead of fixed p…

    …opups
    
    Additional changes:
    - Added a 'Pin' button to the floating popup's toolbar. When a tool is pinned, the popup will not close automatically after the action is executed.
    - Added a virtual function to the `ViewHexEditor::Popup` class, allowing implementations to specify a tool window title.
    SparkyTD committed May 8, 2024
    Configuration menu
    Copy the full SHA
    badc2bd View commit details
    Browse the repository at this point in the history
  2. Fixed scaling issues with the new floating tool window UI

    Before this change, the modifications to the tool popup UIs did not respect the user's scaling factor settings.
    SparkyTD committed May 8, 2024
    Configuration menu
    Copy the full SHA
    356c175 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6a46960 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    56cf190 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    86bacdb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    483a98c View commit details
    Browse the repository at this point in the history
  7. changed getTitle() to return UnlocalizedString, moved localization co…

    …de to ViewHexEditor::drawPopup()
    SparkyTD committed May 8, 2024
    Configuration menu
    Copy the full SHA
    1086991 View commit details
    Browse the repository at this point in the history
  8. Fixed the background not being rendered correctly on the transparent …

    …window when the user isn't hovering over it
    
    In the previous approach, I was using ImGuiWindowFlags_NoBackground combined with an explicitly drawn background rectangle to correctly set the window transparency within ImGuiExt::Begin/EndHoveringPopup(). However with this approach, there was a small but noticeable gap between the window's external borders and the background rectangle, due to the configured default padding.
    
    With this new approach, the decision to apply the transparency will always be delayed by one frame, but theis way the whole window can be set to being transparent before ImGuiExt::BeginHoveringPopup().
    SparkyTD committed May 8, 2024
    Configuration menu
    Copy the full SHA
    b6a5037 View commit details
    Browse the repository at this point in the history
  9. Added support for customizable transparency for Popup windows when th…

    …e user isn't hovering over
    SparkyTD committed May 8, 2024
    Configuration menu
    Copy the full SHA
    92ad4f4 View commit details
    Browse the repository at this point in the history
  10. Prevents the popup from initially appearing with the transparency eff…

    …ect until the user hovers over it
    SparkyTD committed May 8, 2024
    Configuration menu
    Copy the full SHA
    e9cf4ef View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e3ffd2a View commit details
    Browse the repository at this point in the history
  12. Fixed issue that made Popups disappear completely with a misconfigure…

    …d PopupWindowAlpha value
    SparkyTD committed May 8, 2024
    Configuration menu
    Copy the full SHA
    919590c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    dc0dd93 View commit details
    Browse the repository at this point in the history
  14. Whitespace fixes

    SparkyTD committed May 8, 2024
    Configuration menu
    Copy the full SHA
    cc12859 View commit details
    Browse the repository at this point in the history
  15. Whitespace fixes

    SparkyTD committed May 8, 2024
    Configuration menu
    Copy the full SHA
    0bfb402 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    1d7f0ad View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    62b585f View commit details
    Browse the repository at this point in the history
  18. Replaced redundant justOpened flag with ImGui::IsWindowAppearing()

    This fix restores the previously decided behavior ensuring that newly opened popup windows are initially non-transparent, until the user hovers over them for the first time.
    SparkyTD committed May 8, 2024
    Configuration menu
    Copy the full SHA
    07f7fe9 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2024

  1. Configuration menu
    Copy the full SHA
    fb9c65b View commit details
    Browse the repository at this point in the history
  2. Whitespace fixes

    SparkyTD committed May 9, 2024
    Configuration menu
    Copy the full SHA
    3b014fa View commit details
    Browse the repository at this point in the history
  3. Fixed bug that was causing popup windows outside the root window to d…

    …isappear on click
    
    This if branch handles the case when the user clicks outside of the currently visible popup, and it loses focus. But if the popup loses focus while `ImGui::IsWindowHovered()` still returns true, it means that the focus loss was not caused by the user clicking away, so it should not be closed yet. Since the focus loss was only registered when clicking on the background / title bar of the popup, and not any of its child widgets, this could be an ImGui bug.
    SparkyTD committed May 9, 2024
    Configuration menu
    Copy the full SHA
    72701a6 View commit details
    Browse the repository at this point in the history
  4. Updated scaling calculations to use the _scaled UDL instead of manual…

    …ly multiplying with the scale factor
    SparkyTD committed May 9, 2024
    Configuration menu
    Copy the full SHA
    02dc312 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. Configuration menu
    Copy the full SHA
    c555195 View commit details
    Browse the repository at this point in the history