Skip to content

Add shared QML application menu and action proxies - #16849

Open
xARSENICx wants to merge 8 commits into
mixxxdj:mainfrom
xARSENICx:feat/qml-menu-action-bridge
Open

Add shared QML application menu and action proxies#16849
xARSENICx wants to merge 8 commits into
mixxxdj:mainfrom
xARSENICx:feat/qml-menu-action-bridge

Conversation

@xARSENICx

@xARSENICx xARSENICx commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
  • Adds a shared native QML MenuBar with File, Library, View, Options, Developer, and Help menus on macOS.
  • Adds reusable QML command handling for track loading, full screen, About, Keywheel, and related dialogs.
  • Exposes application state, configured shortcuts, developer actions, and settings metadata through QmlApplicationProxy.
  • Exposes library rescan, export, search, playlist, crate, and Auto DJ actions through QmlLibraryProxy, including a QML scan-summary dialog.
  • Exposes URL-based deck loading and file-dialog metadata through QmlPlayerManagerProxy.
  • Creates the conditional Developer menu only after component completion, avoiding startup-time popup activation.
  • Keeps the native menu bar macOS-only so QML skins can provide their own in-window menu presentation on Windows and Linux.

@xARSENICx
xARSENICx marked this pull request as ready for review August 8, 2026 14:14
Comment thread res/qml/MainMenuBar.qml
Comment thread res/qml/MainMenuBar.qml
Comment on lines +204 to +211
Action {
checkable: true
checked: vinylDeck3Control.value > 0
shortcut: Mixxx.Application.menuShortcut("OptionsMenu_EnableVinyl3", "Ctrl+U")
text: qsTr("Enable Vinyl Control 3")

onTriggered: vinylDeck3Control.value = vinylDeck3Control.value > 0 ? 0.0 : 1.0
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Action {
checkable: true
checked: vinylDeck3Control.value > 0
shortcut: Mixxx.Application.menuShortcut("OptionsMenu_EnableVinyl3", "Ctrl+U")
text: qsTr("Enable Vinyl Control 3")
onTriggered: vinylDeck3Control.value = vinylDeck3Control.value > 0 ? 0.0 : 1.0
}
Action {
enabled: root.numberOfDecks >= 3
checkable: true
checked: vinylDeck3Control.value > 0
shortcut: Mixxx.Application.menuShortcut("OptionsMenu_EnableVinyl3", "Ctrl+U")
text: qsTr("Enable Vinyl Control 3")
onTriggered: vinylDeck3Control.value = vinylDeck3Control.value > 0 ? 0.0 : 1.0
}

Same as for the File menu Load to deck menu entries

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not working for me, always all 4 menu actions are enabled - maybe, because it's a nested sub-menu?

Comment thread src/qml/qmllibraryproxy.h Outdated
Comment thread res/qml/ApplicationMenuCommands.qml Outdated
Comment thread res/qml/main.qml Outdated
@xARSENICx
xARSENICx force-pushed the feat/qml-menu-action-bridge branch from 4f5532d to b8d9701 Compare August 10, 2026 18:49
@JoergAtGithub

Copy link
Copy Markdown
Member

The last commit does not change the behaviour. Allways all 4 menu entries are enabled. I guess that all these variables are out of scope of this nested submenu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants