Bug 510353

Summary: Line separating sidebar and content view is brighter than intended with a dark color scheme and fractional scale
Product: [Applications] systemsettings Reporter: Nate Graham <nate>
Component: sidebarviewAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: 4wy78uwh, kdedev, notmart
Priority: NOR    
Version First Reported In: 6.5.80   
Target Milestone: ---   
Platform: KDE Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: Kirigami 6.20 and Plasma 6.5.0
Sentry Crash Report:
Attachments: White lines
Comparison screenshot

Description Nate Graham 2025-10-07 18:20:27 UTC
Created attachment 185580 [details]
White lines

STEPS TO REPRODUCE
1. Use Breeze Dark color scheme
2. Set scale factor to 160% or 175%
3. Launch System Settings


OBSERVED RESULT
The line separating sidebar and content view is visibly brighter than other separator lines. See attached screenshot


EXPECTED RESULT
Same color as other lines


ADDITIONAL INFORMATION
Doesn't seem to be a general Kirigami issue, as I can only reproduce it in System Settings


SOFTWARE/OS VERSIONS
Operating System: KDE Linux 2025-09-25
KDE Plasma Version: 6.5.80
KDE Frameworks Version: 6.20.0
Qt Version: 6.9.2
Kernel Version: 6.16.8-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840U w/ Radeon™ 780M Graphics
Memory: 16 GiB of RAM (14.9 GiB usable)
Graphics Processor: AMD Radeon 780M Graphics
Comment 1 Marco Martin 2025-10-08 08:54:59 UTC
Created attachment 185596 [details]
Comparison screenshot

Here is the comparison on how it renders here at 125% (top part) vs your screenshot (bottom part) the separator is still brighter but less. note that the separator between columns is stronger than the one of the scrollbar by design, to tell that the scrollbar belongs to the left panel, if the two separators would be identical it would actually be an usability problem.

The issue is that sometimes they get too much different, i guess indeed due to fractional scaling: in both screenshots you can see lines that become two dimmed pixels because they are rendering still not quite aligned to the pixel grid
Comment 2 Marco Martin 2025-10-08 09:31:19 UTC
the vertical separator however should definitely have the same color of the header separator
Comment 3 Bug Janitor Service 2025-10-10 12:23:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/1937
Comment 4 Bug Janitor Service 2025-10-13 15:01:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kcmutils/-/merge_requests/278
Comment 5 Bug Janitor Service 2025-10-13 15:09:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/systemsettings/-/merge_requests/377
Comment 6 Marco Martin 2025-10-15 08:02:30 UTC
Git commit b5db0006b37e9e8c7abb5b41feecf1116bc59b82 by Marco Martin.
Committed on 14/10/2025 at 09:20.
Pushed by mart into branch 'master'.

Fix glitches in separators rendering

* Use the same control as size hit for the header, so there won't be
  cases where the sidebar and page headers have a different height
* Redo how the sidebar separator split is done so it will always met
  perfectly with the headers separator

It introduces a devicepixelratio property, because on 6.5 we can't
depend from https://invent.kde.org/frameworks/kirigami/-/merge_requests/1937

on 6.6 it will use AlignedSize instead

M  +5    -0    app/SidebarMode.cpp
M  +5    -0    app/SidebarMode.h
M  +4    -6    app/qml/CategoriesPage.qml
M  +26   -17   app/qml/Main.qml
M  +4    -6    app/qml/SubCategoryPage.qml

https://invent.kde.org/plasma/systemsettings/-/commit/b5db0006b37e9e8c7abb5b41feecf1116bc59b82
Comment 7 Bug Janitor Service 2025-10-15 08:03:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/systemsettings/-/merge_requests/378
Comment 8 Marco Martin 2025-10-15 08:03:30 UTC
Git commit 2a277ce516ae91643092d34142bb9622d4d09f8a by Marco Martin.
Committed on 15/10/2025 at 08:02.
Pushed by mart into branch 'Plasma/6.5'.

Fix glitches in separators rendering

* Use the same control as size hit for the header, so there won't be
  cases where the sidebar and page headers have a different height
* Redo how the sidebar separator split is done so it will always met
  perfectly with the headers separator

It introduces a devicepixelratio property, because on 6.5 we can't
depend from https://invent.kde.org/frameworks/kirigami/-/merge_requests/1937

on 6.6 it will use AlignedSize instead


(cherry picked from commit b5db0006b37e9e8c7abb5b41feecf1116bc59b82)

Co-authored-by: Marco Martin <notmart@gmail.com>

M  +5    -0    app/SidebarMode.cpp
M  +5    -0    app/SidebarMode.h
M  +4    -6    app/qml/CategoriesPage.qml
M  +26   -17   app/qml/Main.qml
M  +4    -6    app/qml/SubCategoryPage.qml

https://invent.kde.org/plasma/systemsettings/-/commit/2a277ce516ae91643092d34142bb9622d4d09f8a
Comment 9 Marco Martin 2025-10-15 10:10:30 UTC
Git commit 5f4737a674db84e4f34204f05cef8b3a4ac1e5be by Marco Martin.
Committed on 15/10/2025 at 10:10.
Pushed by mart into branch 'master'.

Make Separator always perfectly pixel-aligned

Separator is the component which is the most important is always exactly
aligned to the  pixel grid, even with fractional scaling (or inside
Flickables that have a non integer contentY)
    
Without antialiasing the line will be sometimes one pixel, sometimes two
    
With antialiasing they will often look blurry and with an apparent different color,
depending how much sharp is rendered in that particular position
    
Use an internal Rectangle that has size adjusted in
order to fall exactly on the pixel grid
    
It needs to use an internal one because just adjusting the size of the
external rectangle, sometimes is still misaligned when the separator
has vertical center anchors, such as in the listview section headers

M  +1    -1    src/controls/ContextDrawer.qml
M  +1    -1    src/controls/Page.qml
M  +3    -3    src/controls/private/globaltoolbar/PageRowGlobalToolBarStyleGroup.qml
M  +1    -1    src/controls/private/globaltoolbar/PageRowGlobalToolBarUI.qml
M  +3    -0    src/layouts/columnview.cpp
M  +2    -0    src/primitives/CMakeLists.txt
M  +24   -12   src/primitives/Separator.qml
A  +131  -0    src/primitives/alignedsizeattached.cpp     [License: LGPL(v2.0+)]
A  +90   -0    src/primitives/alignedsizeattached.h     [License: LGPL(v2.0+)]
M  +4    -4    src/templates/AbstractApplicationHeader.qml

https://invent.kde.org/frameworks/kirigami/-/commit/5f4737a674db84e4f34204f05cef8b3a4ac1e5be