frontend: Refactor main window menus#11171
Conversation
|
I have updated the code to remove the sender methods from the menus. |
|
Updated to adapt to the new frontend structure. |
dcace05 to
da14a24
Compare
|
This PR has merge conflicts and unresolved feedback. cc @Warchamp7 |
Warchamp7
left a comment
There was a problem hiding this comment.
Did some quick testing and menus all seemed to behave correctly still.
Left a few comments, and just making a general note here to have any of the new/renamed functions be camelCase instead of PascalCase.
| { | ||
| multiviewMenu.reset(CreateProjectorMenu(QTStr("Projector.Open.Multiview"), nullptr, ProjectorType::Multiview)); | ||
|
|
||
| QAction *separatorAction = ui->viewMenu->actions().at(ui->viewMenu->actions().count() - 2); |
There was a problem hiding this comment.
This is very cursed and we should find a better way to do it.
Should in theory be able to insert the new menu before the old one, then remove the old one.
There was a problem hiding this comment.
This wouldn't work when OBS is first loaded because the menu is not created yet.
There was a problem hiding this comment.
It would work if there were a placeholder entry within the UI form still, no? Otherwise what you're saying wouldn't work now either.
This makes it so we don't have to manually delete each menu each time they are shown, they are now created on demand, saving some memory.
Description
This makes it so we don't have to manually delete each menu each time they are shown, they are now created on demand, saving some memory. This also moves the menu code to a separate file.
Motivation and Context
The menu code has always bothered me
How Has This Been Tested?
Clicked through each menu to made sure they still worked
Types of changes
Checklist: