Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Getting Pythonista editor theme onto PyUi interface?
-
Is there a way to get the current pythonista editor theme to be applied to the pyui interface a script presents?
Perhaps this is obvious, and I'm just missing it? Googling around, I see that Ole's other awesome app, Editorial, seems to have a way to do it for its custom UI presentation (http://omz-software.com/editorial/docs/ios_workflows/special/action-custom-ui.html)...and since that system is basically pythonista underneath, I thought perhaps it could be done in regular pythonista?
-
Check out the docs for the editor module:
editor.apply_ui_theme(ui_view, theme_name=None)
Style a ui.View (and its descendents) with the given UI theme.If theme_name is None (the default), the currently selected theme is used. Otherwise, it should be the name of a theme as shown in the settings.
editor.present_themed(ui_view, theme_name=None, **kwargs)
Style a ui.View (and its descendents) with the given UI theme (using apply_ui_theme()), and present the view.Keyword arguments are passed on to ui.View.present(), except for title_bar_color and title_color, which are set automatically, based on the theme.
-
@JonB And there it is...and indeed pretty obvious, but I missed it.
Thank you so much!