Bug 469180

Summary: CMake help with dark theme
Product: [Applications] kdevelop Reporter: Ivan Pessotto <ivan.pessotto>
Component: UI: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: ckukde, igorkuo
Priority: NOR    
Version First Reported In: 5.11.230400   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.12.230800
Sentry Crash Report:
Attachments: Screenshot of the problem

Description Ivan Pessotto 2023-04-30 08:49:10 UTC
Created attachment 158555 [details]
Screenshot of the problem

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Open CMakeLists.txt file
2. Switch to Breeze Dark theme
3. Hover on a cmake command like "add_executable"

OBSERVED RESULT
Tooltip opened with the help text has white background and white foreground (unreadable).

EXPECTED RESULT
Tooltip background should be dark, according to the selected theme.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux 2.13
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.9

ADDITIONAL INFORMATION
In kdevelop preferences there is no option to change the tooltip window background for the current selected theme.
Comment 1 Igor Kushnir 2023-05-01 04:07:41 UTC
Here is a proposed fix: https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/453
As mentioned in comments under the merge request, a workaround is to install rst2html and create a symlink to "/usr/bin/rst2html.py" in /usr/local/bin or /usr/bin. This should also improve rendering of CMake documentation.
Comment 2 Igor Kushnir 2023-05-10 17:45:46 UTC
Git commit adb192cf63a33b5a9492d8a8de7fe11bee57e83d by Igor Kushnir, on behalf of Bartłomiej Burdukiewicz.
Committed on 07/05/2023 at 07:08.
Pushed by igorkushnir into branch 'master'.

Fix hardcoded CMake documentation tooltip background color

(commit message authored by Igor Kushnir)

Since the "Apply color scheme to code browser tooltip" merge request
https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/370
CMake documentation tooltips contain white text on white background when
a dark Window Color Scheme is configured and when there is no rst2html
executable in PATH.

This commit effectively reverts a 12-year-old fix for black-on-black
CMake documentation tooltips 8153365a142a9d0997c49e78a831fafc64eb36a5.

I have tested reverting the !370 merge request's commits and a tiny
follow-up commit like this:
  git revert 258c2b70a39ccfc8788e85c2abaaa0628c9f8e81
  git revert -n d30fed992438e5cdbd917d7f67a4cd449c40622c^..9ae6ac2bcffa414b358b9a09a320788cc9a64231
After this reversion, the CMake documentation tooltips always contain
black text on white background, regardless of Window Color Scheme
configuration and whether or not rst2html is available. When the color
scheme merge request is reverted, applying this commit doesn't make a
difference, so I cannot reproduce the bug fixed by
8153365a142a9d0997c49e78a831fafc64eb36a5 in any case.
FIXED-IN: 5.12.230800

M  +1    -1    plugins/cmake/cmakecommandscontents.cpp

https://invent.kde.org/kdevelop/kdevelop/commit/adb192cf63a33b5a9492d8a8de7fe11bee57e83d