diff --git a/AGENTS.md b/AGENTS.md
index 46416d3..3c8ab9e 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -193,7 +193,7 @@ Platform adaptations, each forced by a missing Qt analog:
- The Layers footer's ink (14.11, Swift 1.4.7: `7fb40a9`, `790195f`): `footerIcon` (in `UI/LayersPanel`, Swift's `FooterIcon`) gives the plain buttons (new layer, folder, mask, delete) the primary ink, `WindowText`, and for their disabled state the menus' own: the shape in `PlaceholderText` dimmed by the style's `generatedIconPixmap`, as Qt dims the effects and adjustment menus' icons, so a disabled button is exactly as dim as a disabled menu (Swift measures a quarter-strength white for the same end). Both inks are read from the active group, since a disabled widget's palette answers with its disabled group. The menus keep `PlaceholderText`. The panel redraws its icons from the event loop on a palette change, once its buttons carry the new palette. Tests: `LayersPanelTests::footerButtonsTakeThePrimaryInkAndDimAsTheMenus` (disabled from the start and after a busy project disables them), and the inks after a new palette in `LayerListFocusTests::aNewPaletteRedrawsEveryIcon`.
- Don't Save (14.12, Swift 1.4.7: `283d360`, `4e035bf`) was held: Swift marked the button destructive and took it back the next day, so its net change is none, Save the one coloured button. The twin's alert keeps `QMessageBox::DestructiveRole` for Don't Save, which in Qt sets only the platform's button order, no colour; Save, the first accepting button, is the default, and Cancel and Don't Save are both plain. `ProjectControllerTests::saveIsTheOneDefaultAndDontSaveIsAsPlainAsCancel` holds it.
- The name field (14.13, Swift 1.4.7: `8f7d344`): a rename's `QLineEdit` has no frame and the name label's height and top, two points further left and wider, since a `QLineEdit` insets its text by two where the `QLabel` does not, so the text stays where the name was; its ground (`Base`, set as the rename begins) is the active `WindowText` at a tenth, Swift's quaternary label colour, and the name label hides beneath it until the rename ends, since Swift edits the label itself. `LayerListFocusTests::theNameFieldKeepsTheNamesSizeAndPlace`.
-- Tool bars that scroll (14.14, Swift 1.4.7: `68396ff`): `ToolHeaderBar::scrolling` is Swift's horizontal `ScrollView` with hidden indicators, as the Move and Type bars already had it: the controls in a frameless `QScrollArea` without bars that takes the row's spare room, their content packed at its own size at the leading edge (a stretch of its own), so a narrow window scrolls them (a sideways wheel or trackpad, or the focus moving in) rather than squeezing them. The Brush, Gradient and selection bars use it (`brushScroll`, `gradientScroll`, `selectionScroll`); the Brush bar's clone and mask notes now scroll after the controls, as Swift's moved them inside; the Gradient's Mask note, Cancel and Apply and the selection's Empty selection and Deselect stay at the bar's end. Tests: `ToolHeaderScrollTests`; `ColorSwatchTests` and `GradientCanvasTests` widen their bars, since a scrolling bar's own size hint no longer holds every control.
+- Tool bars that scroll (14.14, Swift 1.4.7: `68396ff`): `ToolHeaderBar::scrolling` is Swift's horizontal `ScrollView` with hidden indicators, as the Move and Type bars already had it: the controls in a frameless `QScrollArea` without bars that takes the row's spare room, their content packed at its own size at the leading edge (a stretch of its own), so a narrow window scrolls them (a sideways wheel or trackpad, or the focus moving in) rather than squeezing them. The Brush, Gradient and selection bars use it (`brushScroll`, `gradientScroll`, `selectionScroll`); the Brush bar's clone and mask notes now scroll after the controls, as Swift's moved them inside; the Gradient's Mask note, Cancel and Apply and the selection's Empty selection and Deselect stay at the bar's end. Tests: `ToolHeaderScrollTests` (each bar narrow and wide, and each note where Swift puts it); `ColorSwatchTests` and `GradientCanvasTests` widen their bars, since a scrolling bar's own size hint no longer holds every control.
- Drops between projects: `ProjectWorkspace::draggedLayerSource` finds the tab whose document holds the dragged id (Swift reads the drag pasteboard; the twin reads the drag's `QMimeData`, which every drop target has), `canReceiveDrag(data, destination)` refuses only a layer's own tab, and `receiveProviders` copies several ids one after another, as Swift awaits each provider, so a two-row drop on the New button opens two tabs as Swift's does. `ContentView` takes such a drop over its whole area (`setWorkspace` hands it the workspace; `acceptsDrop` keeps Swift's guards: busy, the sheet, the importer, a rename; `levels` arrives with 9.x), shows the 3-point accent ring inside the canvas while targeted and hands the drop's document point on when it fell on the canvas. `ProjectTabButton` takes drops for its tab (accent fill and rim, "Add to
"), and `NewCanvasButton`, the toolbar's New canvas button with the action as its default, for a fresh tab ("Open in a new project tab"), both refusing an Alt drag, which duplicates in the panel; Swift's transient `NewTabDropSlot` in the strip has no twin, the New canvas button is `NewProjectDropTarget` already. Files and pictures arrived with 10.4.
- `CanvasThumbnail` draws a layer or a mask inside the canvas's box at `backingScale` 2 (the panel's pixmaps carry that ratio); a mask's ground is `LayerMask::background`, white or black by its edge's majority, as the canvas treats it (Swift's `edgeTone` mean went with 12.12b). `LayerIcons` draws the panel's SF Symbols as paths, in one palette colour, like `ToolIcons`. `BlendModePicker` is a `QComboBox` whose popup previews the highlighted mode through `previewBlendMode` for the layer it opened on (Qt calls `hidePopup` before `activated`, so the preview, the target and the highlight are cleared from the event loop, after a choice had its chance) and refuses a choice once another layer is active. `LayerAppearanceControls` is Swift's blend and opacity row: the slider's press and release are one opacity drag (the release is watched application-wide while the slider is down, so a popup opened mid-drag cannot keep the step open), the percent field applies once through its `FocusOut`, which Return and Escape cause (Swift's `releasesFocusOnCommit`), and steps with Up and Down (Swift's `isFinite` test and the steps' clamp are left out: `setLayerOpacity` refuses a value that is no finite number and clamps the rest), and another active layer makes the controls anew, as Swift's `.id` does.
- `ProjectWorkspaceView` is the `QMainWindow`: the front tab's `ContentView` as its central widget, made anew when another tab comes to the front, as SwiftUI's `.id` rebuilds it, and disabled while the workspace manages; the window holds the shown tab (`std::shared_ptr`) until the old editor is deleted, as Swift's views hold their session, so a replaced or closed tab's session never ends under its editor (`ProjectWorkspace::tab` is public for this); a `QToolBar` with the New canvas action, the `ProjectTabStrip` (which takes the toolbar's free width) and the four zoom actions, since SwiftUI's `.toolbar` modifier lives in `ContentView` but the toolbar belongs to the window. Its actions follow the front session's `changed()`, and on that signal the window syncs every tab's button as well, because a busy front tab dims the other tabs' buttons, which their own sessions' signals do not reach; the strip syncs its buttons on the workspace's signal, each button on its own session's. The window's title is the front tab's, with Qt's `[*]` placeholder, so `setWindowModified` can show the mark that `isDocumentEdited` shows; `setWindowFilePath` carries `representedURL`. The editor's own minimum size is cleared inside the window, which owns the 800 × 520 minimum for the whole, toolbar included. Closing the window ignores the event and asks the workspace (`closeWindow`), which confirms tab by tab and then closes the window again with the property `closeConfirmed` set, since the workspace may not include `UI/` headers; a confirmed close is accepted and the mark cleared, so a window shown again asks again. `ProjectTabStrip` is a plain `QWidget` whose buttons are kept for the tabs that stay, made for new tabs and deleted for tabs that went, and placed by hand from `projectTabOverflow` (13.14): every button at its own size hint, so no title is squeezed below Swift's 35 points, laid out again when the strip is resized, the workspace changes or any tab's session changes; it fills no background, so the toolbar shows through (a stylesheet would do the same but freezes the widgets' palette, so a theme switch would pass them by); the unsaved dot is a character before the title. Files named on the command line go to `ProjectWorkspace::receive`, as Finder's Open With reaches the delegate. Layer drops on tabs and the New canvas button are 4.7's; file and picture drops arrived with 10.4.
diff --git a/tests/ToolHeaderScrollTests.cpp b/tests/ToolHeaderScrollTests.cpp
index bed3c2d..2f5c35a 100644
--- a/tests/ToolHeaderScrollTests.cpp
+++ b/tests/ToolHeaderScrollTests.cpp
@@ -60,6 +60,7 @@ private slots:
void theBrushBarScrolls();
void theGradientBarScrollsAndKeepsItsButtons();
void theSelectionBarScrollsAndKeepsDeselect();
+ void eachNoteSitsWhereSwiftsDoes();
};
void ToolHeaderScrollTests::theBrushBarScrolls()
@@ -101,5 +102,33 @@ void ToolHeaderScrollTests::theSelectionBarScrollsAndKeepsDeselect()
QTRY_VERIFY(deselect->isVisible() && deselect->geometry().right() < 440 && deselect->parentWidget() == &bar);
}
+void ToolHeaderScrollTests::eachNoteSitsWhereSwiftsDoes()
+{
+ // Clone Stamp's hint scrolls inside, after the controls.
+ const auto cloning = withLayer(NavigationTool::cloneStamp);
+ BrushControls brush(*cloning);
+ brush.resize(440, brush.height());
+ brush.show();
+ QWidget &hint = *brush.findChild("cloneSourceNote");
+ QTRY_VERIFY(hint.isVisible());
+ QCOMPARE(hint.parentWidget(), brush.findChild("brushScroll")->widget());
+ // The Gradient's Mask note stays outside, at the bar's end.
+ const auto masked = withLayer(NavigationTool::gradient);
+ GradientControls gradient(*masked);
+ masked->addMask();
+ gradient.resize(440, gradient.height());
+ gradient.show();
+ QWidget &mask = *gradient.findChild("gradientMaskNote");
+ QTRY_VERIFY(mask.isVisible() && mask.parentWidget() == &gradient && mask.geometry().right() < 440);
+ // So does an empty selection's note.
+ const auto empty = withLayer(NavigationTool::marquee);
+ LassoControls selection(*empty);
+ empty->setSelection(DocumentSelection{}, QStringLiteral("Empty"));
+ selection.resize(440, selection.height());
+ selection.show();
+ QWidget ¬e = *selection.findChild("emptySelection");
+ QTRY_VERIFY(note.isVisible() && note.parentWidget() == &selection && note.geometry().right() < 440);
+}
+
QTEST_MAIN(ToolHeaderScrollTests)
#include "ToolHeaderScrollTests.moc"