Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-331

Form's vertical spacing should be baseline-aware

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 2.5
    • wtk
    • None

    Description

      Graphic designers often want to lay out forms such that the vertical spacing between the baselines of the form elements is predictable. Though Pivot's Form can now align the baselines of its fields with their labels, it provides no way to coordinate the vertical spacing of the baselines. Take, for example, the following WTKX:

      <Window maximized="true"
      xmlns:wtkx="http://pivot.apache.org/wtkx"
      xmlns="org.apache.pivot.wtk">
      <content>
      <CardPane styles="

      {padding:10}

      ">
      <Form>
      <sections>
      <Form.Section>
      <Label Form.label="Field 1" text="Foo"/>
      <Label Form.label="Field 2" text="Bar"/>
      <TextInput Form.label="Field 3" text="Baz"/>
      <TextInput Form.label="Field 4" text="Something Else"/>
      </Form.Section>
      </sections>
      </Form>
      </CardPane>
      </content>
      </Window>

      It produces the attached screenshot, where the vertical spacing between the baselines is unpredictable, even though the form's "verticalSpacing" style is evenly applied. Contrast this with the attached mockup provided by a graphic designer, where they clearly specify the layout in terms of spacing between baselines.

      It's not clear how best to achieve this feature from an architectural point of view. Ideas are welcome in this ticket.

      Attachments

        1. screenshot-before-and-after.png
          10 kB
          Todd Volkert
        2. form-layout-mockup.png
          24 kB
          Todd Volkert

        Activity

          People

            rwhitcomb Roger Lee Whitcomb
            tvolkert Todd Volkert
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: