Skip to content

UX - Live Mouse Coordinates in Status Bar #6

@DevGeniusCode

Description

@DevGeniusCode

Title:
UX: Display Live Mouse Coordinates in Status Bar

Description:
To assist users in precisely aligning elements and tracing over reference images, we need a live readout of the mouse cursor's X and Y coordinates relative to the canvas (Scene coordinates). This should match the behavior of the original SAGE GUI Editor.

Tasks:

  • Ensure the main application window has a QStatusBar active at the bottom.
  • Enable mouse tracking on the main QGraphicsView widget by calling setMouseTracking(True).
  • Intercept mouse movements (either by overriding mouseMoveEvent in the view or using an event filter).
  • Convert the viewport coordinates to scene coordinates using mapToScene(event.pos()).
  • Format the coordinates into a readable string (e.g., X: 382, Y: 139) and push this text to a permanent or temporary widget on the right side of the status bar.

Acceptance Criteria:

  • Moving the mouse across the central canvas updates the status bar coordinates instantly.
  • The displayed coordinates accurately reflect the 800x600 (or current scale) internal coordinate system, not the physical monitor pixels.
  • When the mouse leaves the canvas area, the coordinates either clear or show the last known position smoothly without crashing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions