Registered Member
|
Hi
I successfully added https://github.com/KDE/syntax-highlighting to my own editor. It works as expected. But it have only 2 build in themes. I have color theme editor for my previous highlighting engine, but currently it is broken and unusable. I want to fix it in the way it would generate themes for https://github.com/KDE/syntax-highlighting. But in KSyntaxHighlighting::Theme class I can see only filePath() method and nothing like setFilePath(QString). So: if I even create my own theme file I wouldn't be able to set it to the KSyntaxHighlighting::Theme class! Please tell me: how can I make it possible to create themes by my program users for https://github.com/KDE/syntax-highlighting? thanks and best regards Szyk Cech |
Global Moderator
|
A Theme instance always represents a single theme loaded from a file. You do not change the path it was loaded from after it was created. Instead, install your theme file into the appropriate folder (something like $XDG_DATA_DIRS/org.kde.syntax-highlighting/themes, e.g. /home/foo/.local/share/org.kde.syntax-highlighting/themes or /usr/share/org.kde.syntax-highlighting/themes), then it will automatically be loaded from there.
I'm working on the KDevelop IDE.
|
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]