Skip to content

Setting config before the TextEditorWidget is created #154

@distractor

Description

@distractor

I see the default theme is set to Monokai in this line.

This is somewhat of a problem if I don't have the Monokai.tmTheme file, nor do I want to use it. The problem is that as soon as TextEditorWidget is created

edbee::Edbee::instance()->setThemePath(":/resources/edbee/themes");  // Enables to set theme by name.
m_pEditor = new edbee::TextEditorWidget();
m_pEditor->setMinimumHeight(200);

an error message is logged:

"texttheme.cpp" @ 424 "Error theme not found :/resources/edbee/themes/Monokai.tmTheme."

This is understandable, since the Monokai.tmTheme is not even there, but I want it to start with a different theme, i.e. different config.

Question

Can I set the config (in particular the theme) beforehand, so that this error message would not get logged for users that don't want to use Monokai? Is that an option?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions