Toolbars: various toolbar layout tweaks

This makes sure that toolbutton sizes and spacings are correct in all
toolbar layout modes.

Task-number: QTCREATORBUG-29082
Change-Id: If2aad74b77c0b8dcda81478e3d345c783584cec4
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2023-04-24 09:41:09 +02:00
parent 09a58ddd12
commit 4d2632c3fa
9 changed files with 28 additions and 6 deletions

View File

@@ -12,6 +12,7 @@
#include <utils/utilsicons.h>
#include <utils/qtcassert.h>
#include <utils/stylehelper.h>
#include <QDebug>
#include <QLabel>
@@ -63,6 +64,7 @@ OutlineWidgetStack::OutlineWidgetStack(OutlineFactory *factory) :
this, &OutlineWidgetStack::toggleCursorSynchronization);
m_filterButton = new QToolButton(this);
Utils::StyleHelper::setPanelWidget(m_filterButton);
// The ToolButton needs a parent because updateFilterMenu() sets
// it visible. That would open a top-level window if the button
// did not have a parent in that moment.
@@ -75,6 +77,7 @@ OutlineWidgetStack::OutlineWidgetStack(OutlineFactory *factory) :
m_filterButton->setMenu(m_filterMenu);
m_toggleSort = new QToolButton(this);
Utils::StyleHelper::setPanelWidget(m_toggleSort);
m_toggleSort->setIcon(Utils::Icons::SORT_ALPHABETICALLY_TOOLBAR.icon());
m_toggleSort->setCheckable(true);
m_toggleSort->setChecked(false);