fix: always have the instance toolbar be vertical
This overrides the orientation set automatically by Qt when we start moving the toolbar around.
This commit is contained in:
parent
f7f39854f8
commit
29a53d7e95
@ -746,6 +746,9 @@ public:
|
|||||||
// disabled until we have an instance selected
|
// disabled until we have an instance selected
|
||||||
instanceToolBar->setEnabled(false);
|
instanceToolBar->setEnabled(false);
|
||||||
instanceToolBar->setMovable(true);
|
instanceToolBar->setMovable(true);
|
||||||
|
// Qt doesn't like vertical moving toolbars, so we have to force them...
|
||||||
|
// See https://github.com/PolyMC/PolyMC/issues/493
|
||||||
|
connect(instanceToolBar, &QToolBar::orientationChanged, [=](Qt::Orientation){ instanceToolBar->setOrientation(Qt::Vertical); });
|
||||||
instanceToolBar->setAllowedAreas(Qt::LeftToolBarArea | Qt::RightToolBarArea);
|
instanceToolBar->setAllowedAreas(Qt::LeftToolBarArea | Qt::RightToolBarArea);
|
||||||
instanceToolBar->setToolButtonStyle(Qt::ToolButtonTextOnly);
|
instanceToolBar->setToolButtonStyle(Qt::ToolButtonTextOnly);
|
||||||
instanceToolBar->setFloatable(false);
|
instanceToolBar->setFloatable(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user