QUICK REFERENCE: Button

Hopefully this update is a plateau, of sorts.

  • Needed to add the composite parameter cornerRadius. I think the order of properties in the list needs to have composite properties before specific properties “contained” within the composite. Hopefully this is all that is necessary to properly style a control.
  • List of style parameters elevated to class object. This might allow changing them for all subsequent function calls.
  • Testing ApplyStyleToArrayFrom(), tap “change” button after tapping a few color buttons and new cornerRounding is applied to all the text boxes/rectangles.
  • Tested plain object as a source of properties.

Still need to work out:

  • Does there also need to be an instance-based property list?
  • Does this need to be converted to allow an instance of NewStyle to carry, essentially, a set of properties and values? Properties and values can currently be carried by a standard JavaScript Object().
  • how this can be integrated with Control classes. I expect this would be a .newStyle setter.
  • how undefined parameters are treated (I think these should be ok)
  • how null parameters are treated (including when null is in source or destination or both)
  • (Edit to add:) this currently ignores top/left positioning because I originally thought users wouldn’t copy another object’s position and allowing for setting a position then copying the style. To extend this to handle applying CSS style objects requires also applying positioning properties. This only affects the case where a style includes top/left positioning and the control already contains properties needing to be retained. For top/left positioning, it’s probably sufficient to implement “last assigned is retained” such that order of style vs specific top/left is relevant. I think this is already how CSS styles work.

Here are links to posts discussing GUI styles (found with simple search, then search on tag:gui):