This patch takes code from kdevelop that add a settings menu entry to allow color scheme changes per instance of kate.
- Group Reviewers
- R40:3d041e4c1c77: Add kcolorschemechooser support and related setting menu entry
instead of duplicating it further, could we move the code into ktexteditor and make it reusable from there?
Yep, +1 for that.
But actually, to get to the basic problem: The issue is that KTextEditor configuration is global, or?
Indeed, maybe this class should be part of the KConfigWidgets framework? See https://api.kde.org/frameworks/kconfigwidgets/html/annotated.html for current list of classes - it already contains the color scheme stuff and is a tier3 framework (so many dependencies allowed).
@zhigalin Any comments from your side?
+1 to having this in kconfigwidgets. In fact most of it should be there already. We have a very similar code in kdevelop (and I know there's some at least in digikam, labplot and possibly krita).
Sorry for the late reply, haven't noticed this review before.
As I said previously:
Now KDelelop also allows scheme selection, but I still think this should become a standard functionality, maybe something like KStandardAction::configureColors(KXmlGuiWindow *win);
And this is a reply by @broulik
If, and only if, we were to add something like that, we could add it to KXmlGui and have it provide a settings dialog in the settings menu where you also find eg. "Configure Toolbars".
The infrastructure is already there, KWin can even follow the colorscheme of an application to colorize the title bar accordingly. However, with KColorSchemeManager there's an easy-to-use class that applications that want to provide such functionality (eg. Krita, KDevelop, Gwenview, Dragon Player) > can add to their settings without further complicating the already insane customizability of our applications.
KateColorSchemeChooser may be a bit misleading as there is also the Editor color scheme which is different...
I tried the patch, I like the idea, now that I used it ;=)
I think centralizing that would be even nicer, but one can still remove this again if that goal is reached.
I will push this change before it rots away.