Skip to content

Commit ef190ff

Browse files
tucktuckg00seclaude
andcommitted
fix: anchor browser bookmark menu to cursor at all UI scales
Right-clicking a folder or location row was opening the Add/Remove Bookmark popup at the raw screen coordinates passed via withTargetScreenArea, ignoring the editor's AffineTransform::scale. At UI scales above 1.0 the menu landed offset from the cursor. Add withParentComponent (getTopLevelComponent()) to both menu invocations so the popup is parented inside the transformed editor and JUCE converts the screen target rect into the parent's scaled coordinate space. Matches the existing convention used by the HeaderBar settings menu. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 0cdb994 commit ef190ff

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
1616
### Fixed
1717
- Wayland drag-and-drop fallback hint on the empty waveform now auto-hides after a few seconds instead of staying on screen indefinitely
1818
- Dropping non-audio files onto the waveform no longer attempts to load them
19+
- Browser bookmark right-click menu now appears under the cursor at every UI scale
1920

2021
## [0.14.0] - 2026-05-01
2122

src/ui/SampleBrowserPanel.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ void SampleBrowserPanel::showLocationMenu (int row, juce::Point<int> position)
584584
menu.addItem (kAddBookmark, "Add Bookmark");
585585

586586
menu.showMenuAsync (juce::PopupMenu::Options().withTargetScreenArea ({ position, { 1, 1 } })
587+
.withParentComponent (getTopLevelComponent())
587588
.withDeletionCheck (*this),
588589
[this, item] (int result)
589590
{
@@ -609,6 +610,7 @@ void SampleBrowserPanel::showFileMenu (int row, juce::Point<int> position)
609610
menu.addItem (kAddBookmark, "Add Bookmark");
610611

611612
menu.showMenuAsync (juce::PopupMenu::Options().withTargetScreenArea ({ position, { 1, 1 } })
613+
.withParentComponent (getTopLevelComponent())
612614
.withDeletionCheck (*this),
613615
[this, item] (int result)
614616
{

0 commit comments

Comments
 (0)