Bug 502054 - Horizontal lines are displayed in the editor with fractional scale factors
Summary: Horizontal lines are displayed in the editor with fractional scale factors
Status: RESOLVED UPSTREAM
Alias: None
Product: kate
Classification: Applications
Component: part (other bugs)
Version First Reported In: 24.12.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-27 05:41 UTC by kdmw.629
Modified: 2025-04-04 20:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
KDevelop code editor showing horizontal lines (117.81 KB, image/jpeg)
2025-03-27 05:41 UTC, kdmw.629
Details
Display Settings in the System Settings App (65.33 KB, image/jpeg)
2025-03-28 05:40 UTC, kdmw.629
Details
Rendering artifacts visible in kate (28.91 KB, image/png)
2025-04-02 17:55 UTC, Sven Brauch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kdmw.629 2025-03-27 05:41:40 UTC
Created attachment 179774 [details]
KDevelop code editor showing horizontal lines

SUMMARY
When Kdevelop ver 6.1.241203 (24.12.3) is opened and a source file is edited horizontal lines are shown in the code editor. It does not matter what source code is edited, python or C or C++ or something else. For all editors a horizontal line is observed. Please see the attached screenshot for more details. This causes a problem while writing code. 

STEPS TO REPRODUCE
1. Launch KDevelop.
2. Open an existing project or create a new project (Python/General/C)
3. Open a source file. Observe the 3 horizontal lines that are displayed. 

OBSERVED RESULT


EXPECTED RESULT
There should not be any horizontal lines that are displayed. 

SOFTWARE/OS VERSIONS
Windows: NA
macOS: NA
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Arch Linux 6.12.20-1-lts (64-bit) 
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
I have tried to change the Colour scheme by going to Settings > Windows Color Scheme and still the behaviour is observed. I changed from Default to various Breeze colour scheme to different Krita colour scheme and still the issue occurs.
I have tried t change the Colour Theme from ayu Mirage to Breeze light to Homunculus to Monokai and still the issue persists.
Comment 1 Milian Wolff 2025-03-27 14:03:33 UTC
Comment on attachment 179774 [details]
KDevelop code editor showing horizontal lines

this looks like a hidpi bug to me - do you use fractional scale factors?
Comment 2 kdmw.629 2025-03-28 04:47:57 UTC
(In reply to Milian Wolff from comment #1)
> Comment on attachment 179774 [details]
> KDevelop code editor showing horizontal lines
> 
> this looks like a hidpi bug to me - do you use fractional scale factors?
I do not think I do. 
If you can let me know how to confirm this, then I can get back to you.
Comment 3 kdmw.629 2025-03-28 05:22:37 UTC
Dont know if this is relevant or not, but I am using SDDM, KWIN and Wayland. Some details are given below

KWin version: 6.3.3
SDDM version: 0.21.0-6
Wayland compositor: kwin_wayland

Here are some of the environment variables related to display. 
XDG_SESSION_TYPE = wayland
WAYLAND_DISPLAY = wayland-0
Comment 4 kdmw.629 2025-03-28 05:40:15 UTC
Created attachment 179808 [details]
Display Settings in the System Settings App

This is the screenshot of the Display settings which has the scaling factor set to 115%
Comment 5 kdmw.629 2025-03-28 05:44:59 UTC
(In reply to Milian Wolff from comment #1)
> Comment on attachment 179774 [details]
> KDevelop code editor showing horizontal lines
> 
> this looks like a hidpi bug to me - do you use fractional scale factors?

I looked at the Display Settings and when the scaling factor is set to 115% then the horizontal lines appear in Kdevelop. However If I were to change the Scale to 105% or 125% or 135% or 120% or 110% or 117% then the lines disappear. 

Side Note when I set the scale factor to 117% the value is changed to 116.667%. The same thing happens for values like 121%, which gets automatically changed to 120.833%. This change of value does not happen for 105% or 115% or 125% or 135%, i.e. the scale factor value remains unchanged. Only when the scale factor value is not a multiple of 5 does the scale factor value gets changed.
Comment 6 Milian Wolff 2025-03-28 16:18:50 UTC
sorry to say, but there's nothing we can do to fix this I believe. It would need changes in Qt to resolve these issues I believe. Or maybe katepart can find some way to prevent it, you probably can trigger the same issues there, or? one way or another, nothing we can influence in kdevelop's code
Comment 7 kdmw.629 2025-03-31 11:11:04 UTC
This does not occur with Kate. Only with KDevelop. Does this bug have to be shifted or raised under a new category?
Comment 8 Milian Wolff 2025-04-02 15:45:37 UTC
kdevelop and kate share the same editor (katepart) that is used for rendering the area where you are seeing the artefacts. maybe you got "un"lucky that the issue wasn't visible in kate? generally, nothing we can do about it I'm afraid in kdevelop land
Comment 9 Sven Brauch 2025-04-02 17:55:18 UTC
Created attachment 179942 [details]
Rendering artifacts visible in kate
Comment 10 Sven Brauch 2025-04-02 17:55:45 UTC
I definitely see the same issue in kate, too (and in KDevelop). See attached file. Bug should be reported to kate.