Skip to content

Appearances #122

Closed
avaidyam opened this Issue Jul 5, 2012 · 0 comments

1 participant

@avaidyam
avaidyam commented Jul 5, 2012

I suggest TwUI have appearance containers, much like iOS, but, function differently than UIAppearance.

  • Standard: this appearance would mimic Cocoa, and hopefully blend in.
  • Light: this would mimic a brighter control scheme, something like NSPopover.
  • Dark: this appearance would mimic the HUD style, something like BGHUDAppKit.
  • HUD: This would, instead of mimicking Cocoa's HUD, be more minimal, black and white, like MBProgressHUD.

The way an appearance container would work, is it would define certain theme colors, fonts, and even drawing and layout blocks. For a control that supports an appearance container, it would have to override its own drawing block/drawRect and layoutSubviews/layout block when you set an appearance container to the object.

A simple example: TUILabel could be assigned an appearance container with a primary color black, a secondary color white, an inset for shadow, and a constraint for its position.

A complex example: a TUIProgressBar could be assigned a whole drawing block for HUD, that would be a simple rounded rectangle, or a drawing block for a cocoa-style animated progress bar.

This is just a proposition, and it's something that would take me a while on my own.

@avaidyam avaidyam closed this Sep 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.