1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Origin: upstream, commit:0aa01f3ea381416e6489d57f03dfc7ca2325b4b1
Author: Dmitri Ovodok <dmitrio95@yandex.ru>
Description: Fix dock plugins appearing with zero height
Plugin should assign reasonable values to implicitHeight/implicitWidth
(or, less preferably, height/width) properties for this to work
properly.
--- a/mscore/plugin/mscorePlugins.cpp
+++ b/mscore/plugin/mscorePlugins.cpp
@@ -450,6 +450,12 @@ void MuseScore::pluginTriggered(QString
QWidget* w = QWidget::createWindowContainer(view);
dock->setWidget(w);
addDockWidget(area, dock);
+ const Qt::Orientation orientation =
+ (area == Qt::RightDockWidgetArea || area == Qt::LeftDockWidgetArea)
+ ? Qt::Vertical
+ : Qt::Horizontal;
+ const int size = (orientation == Qt::Vertical) ? view->initialSize().height() : view->initialSize().width();
+ resizeDocks({ dock }, { size }, orientation);
connect(engine, SIGNAL(quit()), dock, SLOT(close()));
dock->show();
}
|