Created attachment 112764 [details] Screenshot showing wrong alignment The column alignment in KSysGuard is inconsistent: 1. The column headers don’t all have the same alignment as column data. Many of them are centred (CPU %) or left-aligned (CPU time) even though the corresponding data are right-aligned. 2. The alignment of the column *data* is sometimes *centred* when it should be right-aligned (CPU %) or left-aligned (user name). The customary rules for column alignment (not just for KDE software, for tables in general) are: 1. The headers should have *same* alignment as the data. If the data is right-aligned, the corresponding header should be right-aligned. Similar for left-aligned and centred data. See Dolphin for an example where this implemented. 2. Text columns should always be left-aligned (for LTR locales, since we read from the left to the right), while number(ish) columns should be right-aligned (since numbers ‘grow’ from the right to the left). So, for example, the CPU %, CPU time, memory usage and PID columns should be right-aligned while the Name and User Name columns should be left-aligned. I’ll attach a screenshot showing the problem.
Just noticed a small error in my previous comment. In the first example, it’s the ‘PID’ (not the ‘CPU %’) header that’s centred even though the corresponding data is (correctly) right-aligned.
Can confirm, the processor time column header is left-aligned for some reason. Doesn't seem to be related to translation.
Git commit 7a580e83e1b2d21cd5deacb2cbba86130e1de669 by Kai Uwe Broulik. Committed on 24/05/2018 at 10:20. Pushed by broulik into branch 'Plasma/5.12'. [ProcessModel] Center more column headings Also horizontally center TTY, Relative Start Time, and CPU Time. Those are typically narrow columns and so should be horizontally centered like the others. FIXED-IN: 5.12.6 Differential Revision: https://phabricator.kde.org/D13031 M +3 -0 processui/ProcessModel.cpp https://commits.kde.org/libksysguard/7a580e83e1b2d21cd5deacb2cbba86130e1de669
Created attachment 115929 [details] ksysguard 5.14.2 on Arch Linux
As we can see in my screenshot, the issue pointed here persists.
Looks like just the name column isn't centered, right?
(In reply to Nate Graham from comment #6) > Looks like just the name column isn't centered, right? No, the problem is that the headers don’t have the same alignment as the data. See https://phabricator.kde.org/D13098 for a fix of a similar (now fixed) problem in Lokalize. Note that one has to use `Qt::AlignRight | Qt::AlignAbsolute` instead of just `Qt::AlignRight` for things to work properly for RTL languages.
It's helpful to spell out the issues, possibly drawing big red arrows on screenshots, when dealing with visual bugs. Not everyone sees these things. - PID header center data right - Memory header center data right I don't have a sufficiently working KSysGuard at the moment to check other columns, it would be useful Karl or Patrick if you write up a list.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libksysguard/-/merge_requests/34
Git commit bc59d3f6532aaf34d738444a566ab491dd4b5fbc by Arjen Hiemstra, on behalf of Adriaan de Groot. Committed on 01/07/2020 at 13:16. Pushed by ahiemstra into branch 'master'. Align headers and data consistently As the bug report says, data and columns should generally have the same alignment. Move all the alignment calculation to one spot and do it consistently. M +28 -41 processui/ProcessModel.cpp https://invent.kde.org/plasma/libksysguard/commit/bc59d3f6532aaf34d738444a566ab491dd4b5fbc