Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Auxiliary theme support #1294

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
5 participants
Contributor

aparajita commented Jun 4, 2011

Motivation

The current theme engine provides little to no built in support for auxiliary themes that can augment or override the default theme. Although themes can be loaded dynamically, they don't really work well in that way, and nib2cib does not correctly support them. In the end most people end up merging everything into one master theme that they set as the default. This is obviously non-optimal.

Solution

This release supports a CPAuxiliaryThemes item in an app or framework's Info.plist:

<key>CPAuxiliaryThemes</key>
<array>
    <string>MyTheme</string>
</array>

Theme Loading
At boot time, all of the auxiliary themes are loaded after the default theme. CPTheme keeps track of the order in which they were loaded, because themes loaded later augment or override themes loaded earlier.

Theme Lookup
Currently, if you use a class that uses a custom theme, you have to manually set its theme during init. In this release the correct theme for a given class is determined automatically by traversing the list of themes, most recently loaded first, matching a class' +defaultTheme with the names in the theme. The first matching theme is set as the view's theme.

nib2cib Support
This release solves the Cappuccino side of the problem and works quite well for views created in code. The nib2cib side will be fixed in a separate pull request.

Owner

primalmotion commented Oct 26, 2011

Hey, this one rocks. what is the status?

cappbot commented May 9, 2012

Label: #new. What's next? A reviewer should examine this issue.

Contributor

ggsato commented May 24, 2012

+#needs-review

Contributor

aparajita commented May 24, 2012

Actually, this needs a fix to theme generation before it can be used.

#needs-improvement

cappbot commented May 24, 2012

Labels: #needs-improvement, #needs-review, #new. What's next?

  • This issue is pending an architectural or implementation design decision and should be discussed or voted on.
  • The code for this issue has problems with formatting or fails a capp_lint check, has bugs, or has non-optimal logic or algorithms. It should be improved upon.
Contributor

ahankinson commented Feb 16, 2013

-#new

cappbot commented Feb 16, 2013

Labels: #needs-improvement, #needs-review. What's next?

  • This issue is pending an architectural or implementation design decision and should be discussed or voted on.
  • The code for this issue has problems with formatting or fails a capp_lint check, has bugs, or has non-optimal logic or algorithms. It should be improved upon.

cappbot commented Feb 17, 2013

Milestone: Someday. Labels: #needs-improvement, #needs-review. What's next?

  • This issue is pending an architectural or implementation design decision and should be discussed or voted on.
  • The code for this issue has problems with formatting or fails a capp_lint check, has bugs, or has non-optimal logic or algorithms. It should be improved upon.

cappbot commented Jan 21, 2014

Milestone: Someday. Labels: #needs-review, SublimeLinter. What's next? This issue is pending an architectural or implementation design decision and should be discussed or voted on.

@aparajita aparajita closed this Jan 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment