aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/MainWindow.cpp
diff options
context:
space:
mode:
authorflow <thiagodonato300@gmail.com>2022-05-07 20:42:19 -0300
committerflow <thiagodonato300@gmail.com>2022-05-07 20:44:44 -0300
commit29a53d7e95508f6c7cd6c1945d2100cca98533c1 (patch)
tree1c6c864c2d1fe6f788741bfd733a864e80a467cd /launcher/ui/MainWindow.cpp
parentf7f39854f83002f528c6f05a67f6a3b0500a8038 (diff)
downloadPrismLauncher-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.cpp3
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);