I was trying to define the same decorative toolbar as it is pictured here in stylesheet. I succeed to do so. Now, I want to define custom decorative toolbar in the Default stylesheet using the same approach.
I used this code in cell expression form
Cell[BoxData[ToBoxes[image] /. {(ImageSize -> {___, ___}) -> (ImageSize -> \{1399, 24})}], "DockedCell", Background -> White, ImageMargins -> 0, CellMargins -> {{0, 0}, {0, 0}}, CellFrameMargins -> {{0, 0}, {0, 0}}] // CellPrint
Please note that instead of "image
" in the code I used actual image.
I copied this part from code above
RasterBox[CompressedData["1:eJ....SPo="], {{0, 232}, {1833, 0}}, {0, 255},
ColorFunction->RGBColor] (*"1:eJ....SPo=" - too long to show*)
to
Cell[StyleData[All, "Working"], Editable->True,
CellInsertionPointCell->FEPrivate`FrontEndResource[
"FEExpressions", "CellInsertionMenu"],
DockedCells->{Cell[BoxData[GraphicsBox[TagBox[place for code above,
BoxForm`ImageTag["Byte", Interleaving -> True, ColorSpace -> "RGB"],
Selectable -> False], BaseStyle -> "ImageGraphics",
ImageSize -> {1399, 250},
ImageSizeRaw -> {1399, 250},
PlotRange -> {{0, 1399}, {0, 250}}]]]}]
placed in the custom stylesheet notebook in the section Style Enviroment Names, Working.
The problem is that the docked decorative toolbar is not scalable in contrast to created decorative toolbar in notebook.
I put the corresponding notebook file and stylesheet notebook here
I will be grateful for any advice.
Pane
and useImageSize->FEPrivate`Part[FrontEnd`AbsoluteCurrentValue[FrontEnd`EvaluationNotebook[], WindowSize], 1]
,ImageSizeAction->”ShrinkToFit”
, andAlignment->Center
but I’ll need to debug that and get it all working just right. $\endgroup$