Text alignment with specialization icons

Started by m4ttmcg, June 10, 2023, 02:02:08 AM

Previous topic - Next topic

m4ttmcg

Having an issue with custom icons on Archi 5.02. When using specializations, the text for the element does not seem to honour the new image - I have to stretch the element size to stop the text from appearing in the custom icon's place.

Example attached with and without specialization. Is this a bug or have I missed something in config for the specialization?


Phil Beauvoir

When an in-built icon is used (as in your 2nd screenshot) the image size is fixed and known so the text box can be moved to accommodate it. Custom images can be any size (even massive) and are drawn "as is" in the figure and so the text box isn't aware of the image's size. In this case you need to make adjustments or use left alignment on the text.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Phil Beauvoir

#2
Having said that, I have been experimenting with adjusting the text position in relation to custom images. For example, if the custom image is 32x32 then decrease the width of the text box by 32 pixels. This seems to work well if the custom image is not too big but for larger images the text area is too small. However, if this is implemented it will have to be a setting because it will change users' existing layouts.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

m4ttmcg

That makes sense. The examples I was attempting were using the security and risk icons posted in the "Share your models" forum, which are intended to be the same size as the default icons. In that scenario your idea would work well. Perhaps a per-specialization option in the specialization manager?                                                                               

Phil Beauvoir

Quote from: m4ttmcg on June 14, 2023, 12:26:37 PMThat makes sense. The examples I was attempting were using the security and risk icons posted in the "Share your models" forum, which are intended to be the same size as the default icons. In that scenario your idea would work well. Perhaps a per-specialization option in the specialization manager?                                                                               

Yes, something like that. I have some POC code written, just needs more thought, input and testing.

https://github.com/archimatetool/archi/tree/textbox-position
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.