File: plugin-size.diff

package info (click to toggle)
musescore3 3.2.3%2Bdfsg2-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 218,192 kB
  • sloc: cpp: 291,369; xml: 200,226; sh: 3,779; ansic: 1,447; python: 393; makefile: 249; perl: 82; pascal: 79
file content (22 lines) | stat: -rw-r--r-- 1,150 bytes parent folder | download | duplicates (3)
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();
                   }