|
DefaultControlHeight had ended up everywhere with no real meaning attached to it,
used in some places with manual offsets. It was never clear whether it was the row
size or a control size. Given the design doesn't always have matching heights for
controls, we should just do away with this illusion.
Additionally each editor had a manual offset trying to account for the property
button and associated spacing on the right and wasn't consistent between 32 or 33.
We do away with all that by moving the property button into the EditorContainer
with a new flag on IEditorView denoting whether we should have a property button
or not. Now all editors should not concern themselves with right inset and match
width fully.
Unfortunately the design sometimes has inconsistent top/bottom insets that vary
from 3/3 to 3.5/3.5. I'd like to make them consistent, so we can set them at
the EditorContainer level but for now the best thing that can be done is inset
on a per editor basis.
This also attempts to address labels and sometimes the property button not being
vertically centered on the first editors. Now, the label is CenterY on the
FirstKeyView which should center it vertically against the topmost input. The
property button is now also CenterYd to the label, so it similarlly should auto
center against the first row of input. If this proves to be not flexible enough
we can revisit.
This also makes more controls consistent with a control size of Small and uses
the system provided mechanism for making sure the font matches so it fits
correctly.
These new guidelines should be used:
- Rows have a height of 24
- Editors should match width
- Single-row editors should CenterY on the parent, match width -6
- Multi-row editors should inset appropriately at -3/-3
- We should avoid so many manually calculated offsets going forward
|