Fixes #6753: Lv2 help window issues (#6957)

This fixes at least three issues:

* Help window is not synched with window manager's `X`-button
* Help window is not being closed on track destruction or on closing the plugin window
* Trims help window strings and force-adds a newline, because `QLabel::sizeHint` sometimes computes too small values. Now, together with #6956, all help windows fit their strings. Some help windows are too large by one line, but this seems better than forcing the user to resize them if they are too small by one line.
This commit is contained in:
Johannes Lorenz
2023-11-12 02:25:26 +01:00
committed by GitHub
parent 652b1fa57a
commit ecc5ff8ca7
6 changed files with 80 additions and 4 deletions

View File

@@ -72,4 +72,13 @@ void Lv2FxControlDialog::modelChanged()
}
void Lv2FxControlDialog::hideEvent(QHideEvent *event)
{
closeHelpWindow();
QWidget::hideEvent(event);
}
} // namespace lmms::gui

View File

@@ -46,6 +46,7 @@ public:
private:
Lv2FxControls *lv2Controls();
void modelChanged() final;
void hideEvent(QHideEvent *event) override;
};

View File

@@ -295,6 +295,15 @@ void Lv2InsView::dropEvent(QDropEvent *_de)
void Lv2InsView::hideEvent(QHideEvent *event)
{
closeHelpWindow();
QWidget::hideEvent(event);
}
void Lv2InsView::modelChanged()
{
Lv2ViewBase::modelChanged(castModel<Lv2Instrument>());

View File

@@ -124,6 +124,7 @@ public:
protected:
void dragEnterEvent(QDragEnterEvent *_dee) override;
void dropEvent(QDropEvent *_de) override;
void hideEvent(QHideEvent* event) override;
private:
void modelChanged() override;