speedata / publisher

speedata Publisher - a professional database Publishing system
https://www.speedata.de/
GNU Affero General Public License v3.0
292 stars 36 forks source link

Overlay interdependence between children #520

Closed serpent213 closed 7 months ago

serpent213 commented 9 months ago

While you are on the hunt, could be I found another oddity.

Following structure for the page header (implemented here):

<PlaceObject>
  <Overlay>
    <Textblock ...>
    <!--
    <Position>
      <Textblock ...>
    </Position>
    -->
    <Position>
      <Textblock ...>
    </Position>
  </Overlay>
</PlaceObject>

Works as expected:

Screenshot 2023-09-20 at 12 45 15

But when removing the comment markers to enable the centered text, the last Textblock changes its position:

Screenshot 2023-09-20 at 12 44 16

Or is Overlay supposed to be applied differently?

pgundlach commented 9 months ago

Yes, this is a bug....

pgundlach commented 9 months ago

Just for the record: This kind of header can be created with a table:

<PlaceObject row="1" column="1">
    <Table fontfamily="text" stretch="max">
        <Tr>
            <Td align="left">
                <Paragraph>
                    <Value>Amateurfunk Cheat Sheet V</Value>
                </Paragraph>
            </Td>
            <Td align="center">
                <Paragraph>
                    <Value>0Z0BSP</Value>
                  </Paragraph>
            </Td>
            <Td align="right">
                <Paragraph>
                    <Value>2023 Steffen Beyer</Value>
                </Paragraph>
            </Td>
        </Tr>
        <!-- control spacing, color '-'' means no color -->
        <Tablerule rulewidth="4pt" color="-"/>
        <Tablerule rulewidth="0.6pt" />
    </Table>
</PlaceObject>
serpent213 commented 9 months ago

Thank you, using a table now with added column specs:

<Columns>
  <Column align="left" width="8" />
  <Column align="center" width="16" />
  <Column align="right" width="8" />
</Columns>

Tried width="max" first for the center column, which didn't work as expected...

pgundlach commented 9 months ago

Instead of using "8","16","8" as values you can use "1", "2", "1*", you don't have to do the calculation yourself. But this works only if you use stretch="max" (not width="max") on the Table.