diff options
author | flow <thiagodonato300@gmail.com> | 2022-05-07 20:42:19 -0300 |
---|---|---|
committer | flow <thiagodonato300@gmail.com> | 2022-05-07 20:44:44 -0300 |
commit | 29a53d7e95508f6c7cd6c1945d2100cca98533c1 (patch) | |
tree | 1c6c864c2d1fe6f788741bfd733a864e80a467cd /launcher/ui/MainWindow.cpp | |
parent | f7f39854f83002f528c6f05a67f6a3b0500a8038 (diff) | |
download | PrismLauncher-29a53d7e95508f6c7cd6c1945d2100cca98533c1.tar.gz PrismLauncher-29a53d7e95508f6c7cd6c1945d2100cca98533c1.tar.bz2 PrismLauncher-29a53d7e95508f6c7cd6c1945d2100cca98533c1.zip |
fix: always have the instance toolbar be vertical
This overrides the orientation set automatically by Qt when we start
moving the toolbar around.
Diffstat (limited to 'launcher/ui/MainWindow.cpp')
-rw-r--r-- | launcher/ui/MainWindow.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index f34cf1ab..44eba369 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -746,6 +746,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); |