Created attachment 138262 [details] Weird flickering when list of apps is refreshed This happens only when I select an element in the list of apps, See attached video for more info. NB : this problem is not present with KSysguard. Operating System: Manjaro Linux KDE Plasma Version: 5.21.4 KDE Frameworks Version: 5.81.0 Qt Version: 5.15.2 Kernel Version: 5.4.112-1-MANJARO OS Type: 64-bit Graphics Platform: X11
Cannot reproduce. Looks graphics-related. What kind of graphical hardware does your system have?
(In reply to Nate Graham from comment #1) > Cannot reproduce. Looks graphics-related. What kind of graphical hardware > does your system have? I have an intel cpu with integrated graphics and use modesetting driver. I don't think it's related to hardware because from what I know the new monitor app is build with same Qt framework as KSysguard which doesn't suffer from this problem at all.
Not exactly. :) KSysGuard was written with QtWidgets, which is an older set of Qt-provided UI components and exclusively renders using the CPU, not your graphics hardware (if present). System Monitor is written with QtQuick, which is a newer Qt UI component set which can render using the GPU for reduced CPU usage and lower power usage as well as better visual effects. However this means that these apps are exposed to rendering glitches from buggy GPU drivers.
(In reply to Nate Graham from comment #3) > Not exactly. :) > > KSysGuard was written with QtWidgets, which is an older set of Qt-provided > UI components and exclusively renders using the CPU, not your graphics > hardware (if present). System Monitor is written with QtQuick, which is a > newer Qt UI component set which can render using the GPU for reduced CPU > usage and lower power usage as well as better visual effects. However this > means that these apps are exposed to rendering glitches from buggy GPU > drivers. Thanks, that explains why the new monitor app seems little slower to open and load data.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-systemmonitor/-/merge_requests/129
Git commit 05ca503aa63e579d1b5d774e90d945d8e0433993 by David Edmundson. Committed on 17/05/2021 at 10:02. Pushed by davidedmundson into branch 'master'. Fix flickering in table view We have a list of delegates: Whenever we get a layoutChange signal (from a re-order), table view recycles all of them. Every binding, text and value changes. Our backgrounds have two rectangles: One does a white or grey line: ``` color: (row % 2 == 0) ? Kirigami.Theme.backgroundColor : Kirigami.Theme.alternateBackgroundColor ``` One draws the highlight: ``` color: Kirigami.Theme.backgroundColor Kirigami.Theme.inherit: false Kirigami.Theme.colorSet: Kirigami.Theme.Selection opacity: selected ? 1: 0 ``` That's all well and good, but we don't want the text to be black on blue, so there's some code here that handles this in the parent item of the cell background. ``` Kirigami.Theme.colorSet: background.selected ? Kirigami.Theme.Selection : Kirigami.Theme.View Kirigami.Theme.inherit: false ``` A noticable quirk there is that our background to draw the white and grey alternating rows actually draws a blue background because it inherits the selected colourSet from our parent Kirigami.Theme. That is marked as being "Selection" not "View" Why does that cause a problem? After a reshuffle what happens is: - All bindings update, Qt does everything perfectly - The colours in the real highlight update on time - The colours in the background are delayed because they come from the parent ColorSet - Kirigami theme propagation has some "event compression" before propagating to children. IMHO this is a Kirigami bug. - The old selected item which is now some random item renders a blue highlight where it should be rendering the white or grey background. This patch moves logic for the selection colour into rectangle for drawing the main background, whic also means we explicitly set a Kirigami.ColorSet there. This also helps differentiate highlighted + vs highlighted + mouse over which brings it more in line with the desktop. M +5 -2 src/table/CellBackground.qml https://invent.kde.org/plasma/plasma-systemmonitor/commit/05ca503aa63e579d1b5d774e90d945d8e0433993
Git commit 3da9fda948ebe1e41e31e4d302ef907fe182ab6f by David Edmundson. Committed on 01/06/2021 at 12:01. Pushed by davidedmundson into branch 'Plasma/5.22'. Fix flickering in table view We have a list of delegates: Whenever we get a layoutChange signal (from a re-order), table view recycles all of them. Every binding, text and value changes. Our backgrounds have two rectangles: One does a white or grey line: ``` color: (row % 2 == 0) ? Kirigami.Theme.backgroundColor : Kirigami.Theme.alternateBackgroundColor ``` One draws the highlight: ``` color: Kirigami.Theme.backgroundColor Kirigami.Theme.inherit: false Kirigami.Theme.colorSet: Kirigami.Theme.Selection opacity: selected ? 1: 0 ``` That's all well and good, but we don't want the text to be black on blue, so there's some code here that handles this in the parent item of the cell background. ``` Kirigami.Theme.colorSet: background.selected ? Kirigami.Theme.Selection : Kirigami.Theme.View Kirigami.Theme.inherit: false ``` A noticable quirk there is that our background to draw the white and grey alternating rows actually draws a blue background because it inherits the selected colourSet from our parent Kirigami.Theme. That is marked as being "Selection" not "View" Why does that cause a problem? After a reshuffle what happens is: - All bindings update, Qt does everything perfectly - The colours in the real highlight update on time - The colours in the background are delayed because they come from the parent ColorSet - Kirigami theme propagation has some "event compression" before propagating to children. IMHO this is a Kirigami bug. - The old selected item which is now some random item renders a blue highlight where it should be rendering the white or grey background. This patch moves logic for the selection colour into rectangle for drawing the main background, whic also means we explicitly set a Kirigami.ColorSet there. This also helps differentiate highlighted + vs highlighted + mouse over which brings it more in line with the desktop. (cherry picked from commit 05ca503aa63e579d1b5d774e90d945d8e0433993) M +5 -2 src/table/CellBackground.qml https://invent.kde.org/plasma/plasma-systemmonitor/commit/3da9fda948ebe1e41e31e4d302ef907fe182ab6f