Skip to content

Commit

Permalink
fix initial size of dialog for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Jul 23, 2013
1 parent 881781c commit 187765b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mscore/pluginCreator.cpp
Expand Up @@ -292,8 +292,11 @@ void PluginCreator::runClicked()

if (item->pluginType() == "dock" || item->pluginType() == "dialog") {
view = new QQuickView(qml, 0);
view->setTitle(item->menuPath().mid(item->menuPath().lastIndexOf(".") + 1));
view->setResizeMode(QQuickView::SizeViewToRootObject);
item->setParentItem(view->contentItem());
view->setWidth(item->width());
view->setHeight(item->height());
view->show();

if (item->pluginType() == "dock") {
Expand Down
3 changes: 3 additions & 0 deletions mscore/plugins.cpp
Expand Up @@ -376,8 +376,11 @@ void MuseScore::pluginTriggered(int idx)

if (p->pluginType() == "dock" || p->pluginType() == "dialog") {
QQuickView* view = new QQuickView(engine, 0);
view->setTitle(p->menuPath().mid(p->menuPath().lastIndexOf(".") + 1));
view->setResizeMode(QQuickView::SizeViewToRootObject);
p->setParentItem(view->contentItem());
view->setWidth(p->width());
view->setHeight(p->height());
view->show();
if (p->pluginType() == "dock") {
QDockWidget* dock = new QDockWidget("Plugin", 0);
Expand Down

0 comments on commit 187765b

Please sign in to comment.