Gui: support toolbar drag and drop to status bar and menu bar (#13571)

* Gui: support toolbar drag and drop to status bar and menu bar

Closes FreeCAD/FreeCAD#12979

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Gui: improve toolbar handling in status and menu bar

* Gui: fix workbench tab bar orientation in status or menu bar

* Gui: remove workbench toolbar position settings

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Zheng Lei
2024-05-06 23:59:16 +08:00
committed by GitHub
parent 8f7424820c
commit b00a4384bf
15 changed files with 816 additions and 393 deletions

View File

@@ -41,7 +41,6 @@
#include "Selection.h"
#include "ToolBarManager.h"
#include "ToolBoxManager.h"
#include "UserSettings.h"
#include "Window.h"
#include <App/Application.h>
@@ -797,11 +796,9 @@ ToolBarItem* StdWorkbench::setupToolBars() const
*clipboard << "Std_Cut" << "Std_Copy" << "Std_Paste";
// Workbench switcher
if (WorkbenchSwitcher::isToolbar(WorkbenchSwitcher::getValue())) {
auto wb = new ToolBarItem(root);
wb->setCommand("Workbench");
*wb << "Std_Workbench";
}
auto wb = new ToolBarItem(root);
wb->setCommand("Workbench");
*wb << "Std_Workbench";
// Macro
auto macro = new ToolBarItem( root, ToolBarItem::DefaultVisibility::Hidden);