| Summary: | Syntax highlighting doesn't use chosen theme (default style broken) | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-ktexteditor | Reporter: | Wouter Van Hemel <wouter-kde> |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | k.hias, nibgonz, pprkut |
| Priority: | NOR | ||
| Version First Reported In: | 5.50.0 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/ktexteditor/c922bc8352ac3a65b373f26070694d760d05e6b6 | Version Fixed/Implemented In: | 5.57.0 |
| Sentry Crash Report: | |||
| Attachments: |
normal scheme
breeze dark scheme |
||
|
Description
Wouter Van Hemel
2018-09-17 14:15:34 UTC
I can confirm this behavior (with frameworks 5.51.0 here). This is especially annoying now when using dark themes as it makes everything really hard to read. Created attachment 116089 [details]
normal scheme
normal scheme for C++ on new user account
Created attachment 116090 [details]
breeze dark scheme
breeze dark scheme for C++ on new user account
I can confirm this on frameworks 5.51 on kde neon. It seems it started with the port to ksyntaxhighlighting. It's a bit weird though. With a new user account, the colors for C++ don't change for any color scheme. For QML files the highlighting changes with the color scheme. For my user account, the behavior is the opposite. It works for C++ files but doesn't work for QML files. +1 I also confirm it in KF5.53, the normal schema is always used. When changing the schema, only the background color and dsNormal/dsKeyword/dsOperator changes. This is uncomfortable in dark schemes Git commit c922bc8352ac3a65b373f26070694d760d05e6b6 by Nibaldo González.
Committed on 03/04/2019 at 07:21.
Pushed by ngonzalez into branch 'master'.
Fix: apply correctly the text colors of the chosen scheme
Summary:
Since the implementation of KSyntaxHighlighting in KF5.50, KTextEditor always uses the "Normal" scheme for text colors.
Previously, the colors were set according to `KSyntaxHighlighting::Repository::LightTheme`, which corresponds to the "Normal" scheme. ~~Now use KateRendererConfig::global() to get the name of the current selected scheme.~~
Before:
{F6701315}
After:
{F6701318}
Reviewers: #ktexteditor, #kate, cullmann, mwolff
Reviewed By: #ktexteditor, #kate, cullmann
Subscribers: mwolff, cullmann, dhaumann, kwrite-devel, kde-frameworks-devel
Tags: #kate, #frameworks
Differential Revision: https://phabricator.kde.org/D19876
M +32 -5 src/syntax/katehighlight.cpp
M +2 -1 src/syntax/katehighlight.h
https://commits.kde.org/ktexteditor/c922bc8352ac3a65b373f26070694d760d05e6b6
|