Skip to content

How to properly setup tweaked themes #312

Answered by pthom
steve725 asked this question in Q&A
Discussion options

You must be logged in to vote

Your current code changes the theme at each frame, even if the user did not select a change in the combo box.
I guess this is the origin of your issue.

You can try:

from imgui_bundle import imgui, immapp, hello_imgui, imgui_ctx


class Globals:
    def __init__(self):
        # ---
        self.runner_params = hello_imgui.RunnerParams()
        # ---
        self.addons = immapp.AddOnsParams()
        # ---
        self.val_combo_layout = 0

    def setup_runner_params(self):
        self.runner_params = hello_imgui.RunnerParams()
        self.runner_params.app_window_params.window_geometry.size = (1000, 600)
        self.runner_params.callbacks.show_gui = create_gui

    def on_change_la…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by steve725
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants