From 6b196ca3697cfd2051db8759f5651d71d3da36a7 Mon Sep 17 00:00:00 2001 From: Matthias <github@mpuchner.de> Date: Tue, 15 Dec 2020 11:59:04 +0100 Subject: [PATCH] Improve layout (fixed size of view selection bar in any circumstances) --- GUI/coregui/mainwindow/mainwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GUI/coregui/mainwindow/mainwindow.cpp b/GUI/coregui/mainwindow/mainwindow.cpp index 17430631679..1d307dd25c2 100644 --- a/GUI/coregui/mainwindow/mainwindow.cpp +++ b/GUI/coregui/mainwindow/mainwindow.cpp @@ -338,6 +338,13 @@ void MainWindow::updateViewSelectionButtonsGeometry() const { b->setFixedSize(buttonExtent, buttonExtent); b->setIconSize({iconExtent, iconExtent}); } + // set fixed width in filler and progress bar + auto filler = m_viewSelectionButtonsLayout->itemAt(m_viewSelectionButtons->buttons().size()); + if (filler != nullptr) + if (auto fillerBtn = dynamic_cast<QToolButton*>(filler->widget()); fillerBtn != nullptr) + fillerBtn->setFixedWidth(buttonExtent); + + m_progressBar->setFixedWidth(buttonExtent); } QToolButton* MainWindow::createViewSelectionButton() const { -- GitLab