modonomicon icon indicating copy to clipboard operation
modonomicon copied to clipboard

Better alignment of page elements

Open Noaaan opened this issue 1 year ago • 4 comments

Problem While redesigning the guidebook for Spectrum some of our devs has issues aligning images properly. Generally it seems that page elements cannot be aligned, with the exception of text.

image

Describe the solution you'd like Ideally there would be some way to do this, to allow for nicer looking guidebooks

Noaaan avatar Oct 01 '24 22:10 Noaaan

@Noaaan can you specify what you are looking for? Text currently uses a global offset (IIRC). Would you like to move all images (maybe images currently do not respect the global offsets / margins?) or would you like an optional property on images (and recipes, etc I presume) that allows to move them individually

klikli-dev avatar Oct 04 '24 06:10 klikli-dev

Titles, images and all are centered on the default page width, not factoring in text offsets (used for making the lines wider/narrower), making images not look centered anymore with like "left_text_offset != 0".

The (~~probably~~ ~~maybe~~ hopefully) easiest fix would be factoring in text offsets when centering titles, images and other stuff that should render centered.

DaFuqs avatar Oct 04 '24 07:10 DaFuqs

Ok that makes sense, a good starting point at least to align that behaviour! Thanks!

EDIT: This needs a bit more looking into, when just applying the offsets the elements do not align.

klikli-dev avatar Oct 04 '24 08:10 klikli-dev

I think in order to do this properly the page alignment for non-text elements needs to be changed to be centered. The offsets should define the area in which can be rendered, and if that area is smaller than the element, the element needs to shrink. I've yet to figure out the math for that :D

klikli-dev avatar Oct 29 '24 09:10 klikli-dev