ui: Move editing context breadcrumb to top-left of 3D viewport #232

Closed
opened 2026-02-15 00:35:50 +00:00 by forbes · 0 comments
Owner

Summary

The BreadcrumbToolBar (editing context display showing colored chips like "Body > Sketch001 > [editing]") is currently positioned as a main window toolbar in a separate row at the top of the window. It should instead be an overlay in the top-left corner of the 3D viewport, reducing vertical space usage and keeping the context visually tied to the viewport.

Current Implementation

In src/Gui/MainWindow.cpp (lines 496-498):

d->breadcrumbBar = new BreadcrumbToolBar(this);
addToolBar(Qt::TopToolBarArea, d->breadcrumbBar);
insertToolBarBreak(d->breadcrumbBar);

This adds the breadcrumb as a full-width toolbar row in the main window's top toolbar area, taking up a dedicated horizontal strip across the entire window.

The BreadcrumbToolBar itself (src/Gui/BreadcrumbToolBar.cpp) is a QToolBar with max-height: 24px, non-movable, non-floatable.

Proposed Approach

Convert the breadcrumb from a main-window toolbar to a floating overlay widget positioned at the top-left of the 3D viewport:

  1. Re-parent the breadcrumb from MainWindow to the active View3DInventor or the QMdiArea
  2. Use absolute positioning — position as a floating QWidget with raise() to stay on top, anchored to the top-left corner
  3. Follow the NaviCube patternNaviCube (src/Gui/NaviCube.cpp) already positions itself as a viewport overlay using corner positioning with offsets; a similar approach could work for the breadcrumb
  4. Track active view changes — update the parent/position when the active MDI subwindow changes (connect to signalActivateView)

The BreadcrumbToolBar could remain a QToolBar (styled as a widget) or be converted to a plain QWidget / QFrame since it doesn't need docking behavior.

Affected Files

  • src/Gui/MainWindow.cpp — remove addToolBar / insertToolBarBreak for breadcrumb
  • src/Gui/BreadcrumbToolBar.h/.cpp — change parent to viewport, add positioning logic
  • src/Gui/EditingContext.cpp — signal connection may need to update on view changes
## Summary The `BreadcrumbToolBar` (editing context display showing colored chips like "Body > Sketch001 > [editing]") is currently positioned as a main window toolbar in a separate row at the top of the window. It should instead be an overlay in the top-left corner of the 3D viewport, reducing vertical space usage and keeping the context visually tied to the viewport. ## Current Implementation In `src/Gui/MainWindow.cpp` (lines 496-498): ```cpp d->breadcrumbBar = new BreadcrumbToolBar(this); addToolBar(Qt::TopToolBarArea, d->breadcrumbBar); insertToolBarBreak(d->breadcrumbBar); ``` This adds the breadcrumb as a full-width toolbar row in the main window's top toolbar area, taking up a dedicated horizontal strip across the entire window. The `BreadcrumbToolBar` itself (`src/Gui/BreadcrumbToolBar.cpp`) is a `QToolBar` with `max-height: 24px`, non-movable, non-floatable. ## Proposed Approach Convert the breadcrumb from a main-window toolbar to a floating overlay widget positioned at the top-left of the 3D viewport: 1. **Re-parent** the breadcrumb from `MainWindow` to the active `View3DInventor` or the `QMdiArea` 2. **Use absolute positioning** — position as a floating `QWidget` with `raise()` to stay on top, anchored to the top-left corner 3. **Follow the NaviCube pattern** — `NaviCube` (`src/Gui/NaviCube.cpp`) already positions itself as a viewport overlay using corner positioning with offsets; a similar approach could work for the breadcrumb 4. **Track active view changes** — update the parent/position when the active MDI subwindow changes (connect to `signalActivateView`) The `BreadcrumbToolBar` could remain a `QToolBar` (styled as a widget) or be converted to a plain `QWidget` / `QFrame` since it doesn't need docking behavior. ## Affected Files - `src/Gui/MainWindow.cpp` — remove `addToolBar` / `insertToolBarBreak` for breadcrumb - `src/Gui/BreadcrumbToolBar.h/.cpp` — change parent to viewport, add positioning logic - `src/Gui/EditingContext.cpp` — signal connection may need to update on view changes
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#232