feat: add Widebar::InsertWidgetBefore method

Signed-off-by: leo78913 <leo3758@riseup.net>
This commit is contained in:
leo78913
2022-12-30 21:06:14 -03:00
parent b9df10c8bd
commit 3da1d6a464
2 changed files with 11 additions and 0 deletions

View File

@ -111,6 +111,16 @@ void WideBar::insertActionAfter(QAction* after, QAction* action)
m_menu_state = MenuState::Dirty;
}
void WideBar::insertWidgetBefore(QAction* before, QWidget* widget)
{
auto iter = getMatching(before);
if (iter == m_entries.end())
return;
BarEntry entry;
entry.bar_action = insertWidget(iter->bar_action, widget);
}
void WideBar::insertSpacer(QAction* action)
{
auto iter = getMatching(action);