Views: Use wasted space in 4 column form layout

The default 4 column form layout in Tryton often allows to re-use the wasted space of fields with a small width like the date field, like in this example:

+--------+----------+---------+-----------------------------------+
| Label1:| [field1] |  Label2:| [field2]                          |
+--------+----------+---------+-----------------------------------+

I would like to avoid adding a new label and field in a new row. Instead the expected result should look like this:

+--------+----------+---------+----------+--/…/--------+----------+
| Label1:| [field1] |  Label2:| [field2] |  /…/ Label3:| [field3] |
+--------+----------+---------+----------+--/…/--------+----------+

The behaviour on resizing the screen is that additional space is added between [field2] and Label3 (space comes here: /…/). This way Label3 stays together with [field3] and separates from [field2].

My solution is:

        <label name="field1"/>
        <field name="field1"/>
        <!-- Keep the label of field2 in the original position -->
        <label name="field2"/>
        <!-- Only split the space of field2 into three additional columns -->
        <group id="additional-fields" colspan="1" col="3">
            <field name="field2"/>
            <!-- Expand and fill the space for label3 and right align to field3 -->
            <label name="field3" xexpand="1" xfill="1" xalign="1.0"/>
            <!-- Shrink the space for field 3 to align it most right -->
            <field name="field3" xexpand="0"/>
        </group>

There is one small flaw in adding a group (at least in version 6.0). There is a small horizontal gap (_) between Label2 and [field2] which I can’t get rid of:

+--------+----------+---------+-_----------+-----------+----------+
| Label1:| [field1] |  Label2:| _ [field2] |    Label3:| [field3] |
+--------+----------+---------+-_----------+-----------+----------+

Any ideas how to use a group which doesn’t consume any space?

For it sounds like you want a form with col=6 and disable expand on th e last field.

yes, col="6" would be fine in views I own. But in this case it is a view from another party which I inherit. I really would prefer a kind of logical group, which doesn’t consume space. But maybe it is just a CSS problem.