Bug 436281

Summary: System Tray highlight is offset when there is no visible entries
Product: [Plasma] plasmashell Reporter: Bruno Guedes <brunoguedes.nave>
Component: System Tray widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: materka, nate
Priority: NOR    
Version First Reported In: 5.21.4   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.22.0
Sentry Crash Report:
Attachments: offset inside the margin
offset outside the margin
Arrow

Description Bruno Guedes 2021-04-27 22:07:57 UTC
SUMMARY

the highlight that appears over the system tray expand button (the little triangle) is offset.


STEPS TO REPRODUCE
1. Click the System Tray expand button (the triangle).
2. See that the highlight is offset.

OBSERVED RESULT

the highlight above the button is offset by some pixels to the right.

EXPECTED RESULT

the highlight to be centered above the triangle.

SOFTWARE/OS VERSIONS

Operating System: Arch Linux
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Kernel Version: 5.11.16-arch1-1
OS Type: 64-bit
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 7.7 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520

ADDITIONAL INFORMATION

The bug happens in X11 and in Wayland.
Comment 1 Bruno Guedes 2021-04-27 22:11:45 UTC
Created attachment 137963 [details]
offset inside the margin

with inside and outside the margin I mean that the system tray is to the left side of the Margin Separator (outside) or to the right side of the Margin Separator (inside).
Comment 2 Bruno Guedes 2021-04-27 22:13:01 UTC
Created attachment 137964 [details]
offset outside the margin
Comment 3 Konrad Materka 2021-04-28 21:17:36 UTC
are you using right-to-left orientation?
Comment 4 Bruno Guedes 2021-04-28 23:17:45 UTC
(In reply to Konrad Materka from comment #3)
> are you using right-to-left orientation?

I didn't understand your question

Are you asking about my system language? If so the answer is no. My system is in English

But if you are talking about the alignment of the panel, it does not matter.
I can reproduce the bug in all alignments (left, center and right).

and if you are asking because the arrow is to the left side of the other widgets in the images... that is because they are not part of the system tray.
Those are the individual widgets.
The system tray is just showing the triangle to expand and collapse the hidden widgets.
Comment 5 Nate Graham 2021-04-29 13:59:17 UTC
Seems like this is fixed in 5,22 already, as the line now spans the entire width/height of the panel tray representation, rather than just the arrow.
Comment 6 Bruno Guedes 2021-04-29 14:45:29 UTC

(In reply to Nate Graham from comment #5)
> Seems like this is fixed in 5,22 already, as the line now spans the entire
> width/height of the panel tray representation, rather than just the arrow.



Sorry. I gave the wrong info about the bug.

It only happens if you set all entries of the system tray to always hidden or disabled.

and the highlight line already spans over the entire system tray in 5.21. and even so I am having this bug

steps to properly reproduce:

1. right click on the system tray and go to "Configure System Tray".

2. go to the entries tab and mark all entries as always hidden or disabled, but leave at least one entry as always hidden.

3. apply the changes. Now there should be just a up pointing triangle (the button that shows the hidden entries).

4. click the button and see the highlight.

I am reopening this bug and changing its name to properly convey the bug's behavior.

Again sorry for the misdirection.
Comment 7 Konrad Materka 2021-04-30 17:24:44 UTC
Created attachment 138033 [details]
Arrow

That's unusual test case :) I can confirm. Highlight is correct, arror is not centered.
Comment 8 Bug Janitor Service 2021-04-30 21:31:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/833
Comment 9 Konrad Materka 2021-05-04 07:14:42 UTC
Git commit 220c725813ed72435af3ba7900329c7fcb18f155 by Konrad Materka.
Committed on 04/05/2021 at 07:14.
Pushed by kmaterka into branch 'master'.

[applets/systemtray] Center expander arrow
FIXED-IN: 5.22.0

M  +1    -0    applets/systemtray/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/220c725813ed72435af3ba7900329c7fcb18f155