Merge pull request #529 from flowln/vertical_toolbar

Set right orientation for instance toolbar when moving it around
This commit is contained in:
txtsd 2022-05-17 12:14:34 +05:30 committed by GitHub
commit 9b387d73e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -749,6 +749,9 @@ public:
// disabled until we have an instance selected
instanceToolBar->setEnabled(false);
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->setToolButtonStyle(Qt::ToolButtonTextOnly);
instanceToolBar->setFloatable(false);