Skip to content

fix: SG-45792: Keep annotation color picker on screen when docked right - #1474

Merged
cedrik-fuoco-adsk merged 4 commits into
AcademySoftwareFoundation:mainfrom
cedrik-fuoco-adsk:SG-45792-color-palette-fullscreen-position
Nov 4, 2026
Merged

cedrik-fuoco-adsk merged 4 commits into
AcademySoftwareFoundation:mainfrom
cedrik-fuoco-adsk:SG-45792-color-palette-fullscreen-position

Conversation

@cedrik-fuoco-adsk

@cedrik-fuoco-adsk cedrik-fuoco-adsk commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Linked issues

N/A (internal ticket SG-45792)

Summarize your change.

The annotate_beta color picker popup now opens on whichever side of the color swatch has room, and always stays inside the screen.

Describe the reason for the change.

The popup was always placed to the right of the color swatch. With the annotation toolbar docked on the right of a fullscreen RV window, that put most of the popup off screen, so only part of the color palette could be used.

The popup is a frameless Qt.Tool window, not a Qt.Popup, so Qt doesn't keep it on screen. It can't simply become a Qt.Popup either: that would close it on outside clicks, which breaks dragging the HSV gradient while drawing.

Describe what you have tested and on which operating system.

To be filled in.

Add a list of changes, and note any that might need special attention during the review.

  • annotate_beta_color_picker.py: ColorPickerPopup.show_near() places the popup to the right of the swatch, flips it to the left if it would go past the right edge of the screen, then clamps it to the screen's available geometry (horizontally and vertically, since the popup can sit low in the toolbar). It uses the swatch's own screen, so it handles floating docks and multiple monitors without knowing the dock area.
  • The 6 px gap is now a named constant, _POPUP_ANCHOR_SPACING. The value is unchanged; the original commit didn't explain it, so the comment records my reading of the layout.
  • All coordinates are logical pixels, so this behaves the same with Qt high-DPI scaling on or off (it's off by default on Windows in RV).

The annotate_beta color picker popup always opened to the right of the
color swatch, so with the toolbar docked on the right of a fullscreen RV
window it opened partly off screen.

Open it to the right by default, flip it to the left when it would
overflow the screen, and clamp it to the screen's available geometry
both horizontally and vertically.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
@cedrik-fuoco-adsk
cedrik-fuoco-adsk marked this pull request as ready for review October 29, 2026 17:16

@bernie-laberge bernie-laberge left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
@cedrik-fuoco-adsk
cedrik-fuoco-adsk merged commit 9d697c5 into AcademySoftwareFoundation:main Nov 4, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants