omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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?

    Pythonista
    pyui theme
    2
    3
    2699
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • shinyformica
      shinyformica last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        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.

        shinyformica 1 Reply Last reply Reply Quote 0
        • shinyformica
          shinyformica @JonB last edited by

          @JonB And there it is...and indeed pretty obvious, but I missed it.

          Thank you so much!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors