Skip to content
Snippets Groups Projects
Commit b7560dbf authored by Josh Siegle's avatar Josh Siegle
Browse files

Add 'Reset window bounds' option to 'View' menu

parent 738b22b2
No related branches found
No related tags found
No related merge requests found
......@@ -120,10 +120,8 @@ void RecordControlEditor::loadEditorParameters(XmlElement* xml)
if (xmlNode->hasTagName("PARAMETERS"))
{
newFileToggleButton->setToggleState(xmlNode->getBoolAttribute("FileSaveOption"), true);
availableChans->setSelectedId(xmlNode->getIntAttribute("Channel"), NotificationType::sendNotification);
}
}
......
......@@ -259,6 +259,8 @@ PopupMenu UIComponent::getMenuForIndex(int menuIndex, const String& menuName)
menu.addCommandItem(commandManager, toggleProcessorList);
menu.addCommandItem(commandManager, toggleSignalChain);
menu.addCommandItem(commandManager, toggleFileInfo);
menu.addSeparator();
menu.addCommandItem(commandManager, resizeWindow);
}
else if (menuIndex == 3)
......@@ -297,7 +299,8 @@ void UIComponent::getAllCommands(Array <CommandID>& commands)
toggleProcessorList,
toggleSignalChain,
toggleFileInfo,
showHelp
showHelp,
resizeWindow
};
commands.addArray(ids, numElementsInArray(ids));
......@@ -375,6 +378,10 @@ void UIComponent::getCommandInfo(CommandID commandID, ApplicationCommandInfo& re
result.setInfo("Show help...", "Show some freakin' help.", "General", 0);
result.setActive(false);
break;
case resizeWindow:
result.setInfo("Reset window bounds", "Reset window bounds", "General", 0);
break;
default:
break;
......@@ -446,6 +453,10 @@ bool UIComponent::perform(const InvocationInfo& info)
case toggleSignalChain:
editorViewportButton->toggleState();
break;
case resizeWindow:
mainWindow->centreWithSize(800, 600);
break;
default:
break;
......
......@@ -195,7 +195,8 @@ private:
toggleProcessorList = 0x2008,
toggleSignalChain = 0x2009,
toggleFileInfo = 0x2010,
showHelp = 0x2011
showHelp = 0x2011,
resizeWindow = 0x2012
};
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(UIComponent);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment