Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
0e7048e
Use eventFilter to process closeEvent
sqrvrt Oct 16, 2025
76da997
revert MixerView height cap
sqrvrt Oct 18, 2025
6fb9f9a
Remove obsolete part of ITW::closeEvent
sqrvrt Oct 18, 2025
0fe643f
refactor SampleTrackWindow, sync detached icon
sqrvrt Oct 18, 2025
c1e9c1e
Set window icon directly on InstrumenTrackView
sqrvrt Oct 19, 2025
b128009
Preserve detached state in ITW prev/next buttons
sqrvrt Oct 19, 2025
806d964
remove leftover comment
sqrvrt Oct 19, 2025
7656b1c
Account for size of decorations
sqrvrt Oct 20, 2025
a7f6c60
Fix ITW movement again (lazy version)
sqrvrt Oct 20, 2025
e3c854b
Move the close hook into SubWindow eventFilter
sqrvrt Oct 20, 2025
fac6160
Keep track of detached window while it's hidden
sqrvrt Oct 21, 2025
bad5f04
Code cleanup
sqrvrt Oct 21, 2025
6e45b96
re-fix ITW because apparently it still breaks
sqrvrt Oct 21, 2025
34681b2
fix codestyle
sqrvrt Oct 22, 2025
5529ed3
make another `if` inline
sqrvrt Oct 22, 2025
50f70ac
more codestyle fixes
sqrvrt Oct 22, 2025
e62b039
Expand SubWindow::setWidget() docs
sqrvrt Oct 22, 2025
608fe14
Constrain attached window positions
sqrvrt Oct 22, 2025
ddcadc9
Hide windows when attaching on closeEvent
sqrvrt Oct 23, 2025
fedfef8
Clarify wayland move workaround
sqrvrt Oct 23, 2025
c21f641
Remove redundant includes
sqrvrt Oct 23, 2025
c8cfe67
make detached closeEvent transparent
sqrvrt Oct 23, 2025
21beffd
fix editor windows minimizing their height on close
sqrvrt Oct 23, 2025
9b596b0
Enable minimize button on detached windows
sqrvrt Oct 23, 2025
5b1b493
Change detach button SVG
sqrvrt Oct 24, 2025
deeb802
rename detach icon
sqrvrt Oct 24, 2025
8968652
clean up detach.svg
sqrvrt Oct 25, 2025
f6e2cdd
Disable broken detach for MacOS builds
sqrvrt Oct 25, 2025
36cbf35
fix typo
sqrvrt Oct 25, 2025
d6129cc
revert SimpleTextFloat to master branch
sqrvrt Oct 25, 2025
08fbfed
clean up diff against master
sqrvrt Oct 25, 2025
58ab680
Fix effect control views bing killed on close
sqrvrt Oct 26, 2025
6e35157
Use, init and update childGeomm only when detached
sqrvrt Oct 27, 2025
50d527c
Use std::clamp
sqrvrt Oct 28, 2025
c60029e
Make hide-on-attach-on-close configurable
sqrvrt Oct 29, 2025
1d0634c
Fix window size resetting for real this time
sqrvrt Oct 29, 2025
ca14048
Restore EffectView functionality actually
sqrvrt Oct 29, 2025
696e2e3
Fix SubWindow label overlapping detach button
sqrvrt Oct 29, 2025
12e1509
Add SubWindow::eventFilter docs
sqrvrt Oct 29, 2025
69e4ed0
Get rid of childGeom
sqrvrt Oct 29, 2025
a9654fc
Keep attached widget position
sqrvrt Oct 29, 2025
d144abb
Initial attempt at always-detach
sqrvrt Oct 30, 2025
34888a7
close autodetached windows properly
sqrvrt Oct 30, 2025
93f4dc6
Improve window positioning on attach
sqrvrt Oct 31, 2025
c1ed85d
Fix editor windows having minimal height on first show
sqrvrt Oct 31, 2025
49b23d5
Remove redundant subwindow-related code from MainWindow
sqrvrt Nov 1, 2025
53c23c2
fix typo in setup menu
sqrvrt Nov 1, 2025
0255db6
Fix ITW icon always showing up as piano
sqrvrt Nov 1, 2025
80a9ffd
Update ControllerView
sqrvrt Nov 1, 2025
485c8c1
minor formatting fixes
sqrvrt Nov 1, 2025
4a8d6f9
even more minor formatting fixes
sqrvrt Nov 1, 2025
ff29cf5
Don't hard-set size of EffectView
sqrvrt Nov 2, 2025
666094a
Change label text
sqrvrt Nov 2, 2025
f0282aa
Destroy childless subwindows
sqrvrt Nov 2, 2025
6acbae9
Get rid of isResizable in EffectView
sqrvrt Nov 4, 2025
f0d57d1
Fix EffectControlDialog not hiding the title bar
sqrvrt Nov 4, 2025
50a73e4
Remove redundant widget->show() on showEvent
sqrvrt Nov 4, 2025
e50247e
fix drag&drop not updating ITW SubWindow
sqrvrt Nov 6, 2025
98e6078
Disable FixedSizeDialogHint on ITW
sqrvrt Nov 7, 2025
1a7f6be
Disable SubWindow flag when detaching a window
sqrvrt Nov 8, 2025
49817e4
Try disabling MacOS soft-fail
sqrvrt Nov 9, 2025
0ca0474
Enable Undo/Redo globally
sqrvrt Nov 9, 2025
84e83e0
Save detached window visibility properly; refactor
sqrvrt Nov 11, 2025
944328f
remove obsolete qt version workarounds
sqrvrt Nov 11, 2025
029a0e4
remove setFixedSize from LadspaControlDialog
sqrvrt Nov 13, 2025
40d3420
Fix resizing LadspaMatrixControlDialog
sqrvrt Nov 13, 2025
6aa4b13
Allow detached windows in topLevelITW; refactor
sqrvrt Nov 13, 2025
17157a0
allow detach to be disabled
sqrvrt Nov 15, 2025
fcb8fdb
disable detach on embedded VST subwindows
sqrvrt Nov 15, 2025
d74cd8d
add attach/detach everything actions
sqrvrt Nov 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions data/themes/default/detach.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
108 changes: 0 additions & 108 deletions data/themes/default/window.svg

This file was deleted.

6 changes: 4 additions & 2 deletions include/ControllerDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
#ifndef LMMS_GUI_CONTROLLER_DIALOG_H
#define LMMS_GUI_CONTROLLER_DIALOG_H

#include "DetachableWidget.h"
#include <QWidget>

#include "ModelView.h"


namespace lmms
{

Expand All @@ -37,7 +39,7 @@ class Controller;
namespace gui
{

class ControllerDialog : public DetachableWidget, public ModelView
class ControllerDialog : public QWidget, public ModelView
{
public:
ControllerDialog(Controller* controller, QWidget* parent);
Expand Down
6 changes: 4 additions & 2 deletions include/ControllerRackView.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
#ifndef LMMS_GUI_CONTROLLER_RACK_VIEW_H
#define LMMS_GUI_CONTROLLER_RACK_VIEW_H

#include "DetachableWidget.h"
#include <QWidget>

#include "SerializingObject.h"

class QPushButton;
class QScrollArea;
class QVBoxLayout;


namespace lmms
{

Expand All @@ -42,7 +44,7 @@ namespace gui

class ControllerView;

class ControllerRackView : public DetachableWidget, public SerializingObject
class ControllerRackView : public QWidget, public SerializingObject
{
Q_OBJECT
public:
Expand Down
2 changes: 0 additions & 2 deletions include/ControllerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class ControllerView : public QFrame, public ModelView
public slots:
void editControls();
void removeController();
void closeControls();
void renameController();
void moveUp();
void moveDown();
Expand All @@ -85,7 +84,6 @@ public slots:
QMdiSubWindow * m_subWindow;
ControllerDialog * m_controllerDlg;
QLabel * m_nameLabel;
bool m_show;

} ;

Expand Down
49 changes: 0 additions & 49 deletions include/DetachableWidget.h

This file was deleted.

49 changes: 0 additions & 49 deletions include/DetachableWindow.h

This file was deleted.

5 changes: 2 additions & 3 deletions include/Editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@
#ifndef LMMS_GUI_EDITOR_H
#define LMMS_GUI_EDITOR_H

#include <QMainWindow>
#include <QToolBar>

#include "DetachableWindow.h"

class QAction;

namespace lmms::gui
Expand All @@ -46,7 +45,7 @@ class DropToolBar;
///
/// Those editors include the Song Editor, the Automation Editor, B&B Editor,
/// and the Piano Roll.
class Editor : public DetachableWindow
class Editor : public QMainWindow
{
Q_OBJECT
public:
Expand Down
8 changes: 4 additions & 4 deletions include/EffectControlDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
#ifndef LMMS_GUI_EFFECT_CONTROL_DIALOG_H
#define LMMS_GUI_EFFECT_CONTROL_DIALOG_H

#include "DetachableWidget.h"
#include <QWidget>

#include "ModelView.h"


namespace lmms
{

Expand All @@ -37,14 +39,12 @@ class EffectControls;
namespace gui
{

class LMMS_EXPORT EffectControlDialog : public DetachableWidget, public ModelView
class LMMS_EXPORT EffectControlDialog : public QWidget, public ModelView
{
public:
EffectControlDialog(EffectControls* controls);
~EffectControlDialog() override = default;

virtual bool isResizable() const { return false; }

Comment on lines -46 to -47
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that this has been removed. It feels like a step backwards since now plugin devs need to remember to call setSizeConstraint.

I don't really understand the problem that led to you removing isResizable, but is there any other solution?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that like in other cases, the way this was done without the patch was applying size constraints to the SubWindow. Because detached widgets are no longer contained within a subwindow, they can be resized freely.

The reason isResizable() can't be applied to the child widget is because the child can basically be whatever it wants as long as that is a widget, including but not limited to:

  • Not having a layout and calling setFixedSize(), even before this commit
  • Having a layout and calling setFixedSize() with a different size compared to what layout wants (StereoMatrix)

As a result of the above, removing isResizable is mostly just a standardization of sorts - of 23 native effects (not counting LV2 and VST since I can't test them), only 7 were dependent on isResizable()! All others were either resizable by themselves or fixed their size explicitly already.

It feels like a step backwards since now plugin devs need to remember to call setSizeConstraint.

I'd argue for the reverse, most LMMS-native plugins nowadays aren't just solely knobs and have something doing GUI stuff already. And being resizable unless told otherwise is the default behavior of Qt, so I don't see any reason to stray from it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an alternative, we could just lie and set isResizable(true) on StereoMatrix since it's the only widget I've seen to break but that's even worse IMO.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinging @rubiefawn since she's using isResizable() over at #7805 (6cf9d41), and an alternative would be needed if we go through with removing that method as discussed here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rubiefawn actually could you test if the issues #7805 fixes are even present here? As far as I'm concerned, the issue of replacing instruments keeping their size looks to be gone (possibly associated with layout changes to SubWindow), and I wasn't able to reproduce the other issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The testing above was performed on the msvc build, but I installed the mingw build and encountered the same behavior there.

While I don't have a msvc or mingw dev environment set up (I do all that on the Linux partition or WSL if I'm desperate) I do still have the installer for the msvc build of 50a73e4 from my initial tests. Reinstalling and testing that shows that actually, ITWs were the only ones that had the controls to begin with.

image

Compare this to the mingw build of 98e6078:
image

Other things I noticed:

  • LADSPA plugins have their layout clipped once detached (at least on the newest commit the scrollbar doesn't also get clipped lmao)
  • VST plugins have no window border at all once detached

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What in the actual... alright, cool. I'm kinda wondering if rebasing this to qt6 would fix this since it's extremely wrong.

...Maybe if I enable FixedSizeDialogHint it starts working?.. I don't know anymore...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, a couple of observations I have after testing myself.

  • Apparently Qt::SubWindow isn't mutually exclusive with Qt::Window, that could be the source of some problems.
  • MSWindowsFixedSizeDialogHint acts as it should, and takes priority over whatever causes no flags to work. If disabling SubWindow flag doesn't work, perhaps CustomizeWindowHint will be the one to go on windows specifically.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That did it!!!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if that also fixes the MacOS bug

protected:
EffectControls* m_effectControls;
};
Expand Down
1 change: 0 additions & 1 deletion include/EffectView.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public slots:
void moveUp();
void moveDown();
void deletePlugin();
void closeEffects();


signals:
Expand Down
4 changes: 4 additions & 0 deletions include/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,13 @@ class MainWindow : public QMainWindow

static void saveWidgetState( QWidget * _w, QDomElement & _de );
static void restoreWidgetState( QWidget * _w, const QDomElement & _de );
void setAllSubWindowsDetached(bool detached);

bool eventFilter(QObject* watched, QEvent* event) override;

signals:
void detachAllSubWindows(bool detached);

public slots:
void resetWindowTitle();

Expand Down
5 changes: 3 additions & 2 deletions include/MicrotunerConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
#ifndef LMMS_GUI_MICROTUNER_CONFIG_H
#define LMMS_GUI_MICROTUNER_CONFIG_H

#include <QWidget>

#include "AutomatableModel.h"
#include "ComboBoxModel.h"
#include "DetachableWidget.h"
#include "SerializingObject.h"

class QLineEdit;
Expand All @@ -37,7 +38,7 @@ namespace lmms::gui
{


class LMMS_EXPORT MicrotunerConfig : public DetachableWidget, public SerializingObject
class LMMS_EXPORT MicrotunerConfig : public QWidget, public SerializingObject
{
Q_OBJECT
public:
Expand Down
5 changes: 3 additions & 2 deletions include/MixerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
#ifndef LMMS_GUI_MIXER_VIEW_H
#define LMMS_GUI_MIXER_VIEW_H

#include <QWidget>

#include "MixerChannelView.h"
#include "DetachableWidget.h"
#include "ModelView.h"
#include "SerializingObject.h"

Expand All @@ -45,7 +46,7 @@ namespace lmms::gui
{

class LMMS_EXPORT MixerView
: public DetachableWidget
: public QWidget
, public ModelView
, public SerializingObjectHook
{
Expand Down
Loading
Loading