mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-27 16:59:56 +01:00
A panel at its narrowest width offers its body less room than size.plot.width (240 pt, 300 pt at comfortable density). The preview pane still drew that wide and ran past the panel's edge: picture_width clamped the offered room up to its least width, and the pane's style also set its least width as min_size. picture_width now takes an offered room below its least width, down to size.plot.height (or the least width when that is smaller). Without a room, or at its least, it is still the least width, so a dialog sized from its content keeps the preview as wide as before. The preview pane, the Navigator preview, the histogram plot and the reading view drop the plot width from their min_size and keep its height.
craft-imaging
Raster image editing for Craft apps.
Without egui, on every target: craft_imaging::scopes (the clipping rule and clipping masks, the vectorscope grid, hue and saturation, and histogram statistics; the app does the colour management and the histogram count), selection (selection preview and Quick Mask rules), trace (mask outline tracing) and layer_style (the Layer Style value model).
With the ui feature, craft_imaging::ui has:
- the
WarpGrid(a warp's mesh on a canvas, withWarpMesh,WarpEditand the press and release helpers), theWarpFieldsof its options bar,PinWarpwithPinWarpBar, andPerspectiveWarpwithPerspectiveBar;TransformPreviewshows a transform or warp in progress; - the
LevelsEditor(a channel'sLevelsover its histogram) and the editors of the other adjustments: curves (CurvesPanel), brightness and contrast, color balance, hue and saturation, black and white, channel mixer, selective color, photo filter and threshold, over anAdjustSession, listed byAdjustmentKindand hosted in theAdjustmentsPanel;LivePreviewrenders them on a proxy of the image; - the
LayerStyleDialogwith theBlendIfBarand theContourField; - the selection tools (
MarqueeTool,LassoTool,PolygonLassoTool,MagneticLassoTool), theSelectionOverlay(ants, matte, Quick Mask) and theMaskViewControls; - the full-window editors, each a workspace over a session, panel and options bar:
SelectMaskWorkspace,ContentAwareFillWorkspace,FilterGalleryWorkspace,LiquifyWorkspace,WideAngleWorkspaceandVanishingPointWorkspace(settings inVanishingPointSettingsandStampSettings); the limits an app passes to Select and Mask and Content-Aware Fill areSelectMaskLimitsandFillLimits, and a refused edit is aLimitRefusedor aFillLimit;BlurPinsOverlayandBlurPinsPaneledit blur pins on the canvas; - the
ChannelsPanel(thumbnails, eyes, selection, rename in place withstart_rename, drag, the footer (ChannelsEvent::FooterandFooterDrop) and the menus over plainChannelRows;ChannelsPanel::style(&UiTokens)gives the look); - the
ScopePanel(histogram, statistics, tone zones and vectorscope) and theClippingOverlayfor a preview; - their stories, registered in
craft_ui::testing::stories().
The main types of every module are re-exported at craft_imaging::ui. The panels and editors report what the user did as events and hold no document. Thumbnails load as jobs on craft_host::queue::JobQueue.
The curves editor and the histogram stay in craft-ui.