Bug 438648 - Inconsistent looking of keyboard layout switcher icon in the tray
Summary: Inconsistent looking of keyboard layout switcher icon in the tray
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Keyboard Layout widget (show other bugs)
Version: 5.22.0
Platform: Arch Linux Linux
: VHI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-06-14 18:11 UTC by ChronosXYZ
Modified: 2021-06-17 13:28 UTC (History)
4 users (show)

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


Attachments
example of inconsistent looking of keyboard layout switcher icon (6.58 KB, image/png)
2021-06-14 18:11 UTC, ChronosXYZ
Details
example of inconsistent looking of keyboard layout switcher icon (us layout) (6.52 KB, image/png)
2021-06-14 18:13 UTC, ChronosXYZ
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ChronosXYZ 2021-06-14 18:11:47 UTC
Created attachment 139320 [details]
example of inconsistent looking of keyboard layout switcher icon

The icon of keyboard layout switcher in the tray is misaligned and it has inconsistent looking regarding of other tray icons. It has happened after recent commit: https://invent.kde.org/plasma/plasma-desktop/-/commit/be6e36e548fba3d6dba426891a19e319107616e7. The attachment shows example of this behavior.
Comment 1 ChronosXYZ 2021-06-14 18:13:09 UTC
Created attachment 139321 [details]
example of inconsistent looking of keyboard layout switcher icon (us layout)
Comment 2 Nate Graham 2021-06-15 21:17:22 UTC
Andrey, can you investigate and correct this?
Comment 3 Andrey 2021-06-15 23:24:17 UTC
We will check and revert in worst case.
Currently I have no idea what's wrong, but AFAIK we didn't test on HiDPI so my wild guess it might be related.
Please confirm.
Comment 4 Yaroslav Sidlovsky 2021-06-16 00:25:41 UTC
I think it will be better to revert this commit,
if it's causing such weird positioning on some systems.

Still using toUpperCase() for language code is good alternative, IMHO.
It won't have vertical positioning issues at all.
Comment 5 Andrey 2021-06-16 11:08:45 UTC
We are about to revert this, but have alternative solution.  
Still, the roots of the problem is not clear, so please help us reproduce it:
is you display HiDPI, does it happen on new user with default settings, panel size etc.?
Thanks.
Comment 6 Bug Janitor Service 2021-06-16 17:59:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/504
Comment 7 Bug Janitor Service 2021-06-16 18:57:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/505
Comment 8 Andrey 2021-06-16 19:00:29 UTC
Git commit 3654bb5b875cd090f943bcf6bd7d453ca25cd2df by Andrey Butirsky.
Committed on 16/06/2021 at 18:58.
Pushed by butirsky into branch 'master'.

Revert "[keyboard layout applet] Make keyboard layout label vertically centered"

This reverts commit be6e36e548fba3d6dba426891a19e319107616e7

The patch didn't work when system tray icons are not scaled and on some
non-standard panel sizes.

M  +0    -8    applets/keyboardlayout/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/3654bb5b875cd090f943bcf6bd7d453ca25cd2df
Comment 9 Andrey 2021-06-17 11:02:57 UTC
I suppose you didn't have "resize icons by panel height" tick set in systray settings?
Comment 10 ChronosXYZ 2021-06-17 11:25:04 UTC
(In reply to Andrey from comment #9)
> I suppose you didn't have "resize icons by panel height" tick set in systray
> settings?

That setting is ticked in systray settings, but it doesn't have effect on keyboard layout switcher indicator.
Comment 11 ChronosXYZ 2021-06-17 11:27:44 UTC
(In reply to ChronosX88 from comment #10)
> (In reply to Andrey from comment #9)
> > I suppose you didn't have "resize icons by panel height" tick set in systray
> > settings?
> 
> That setting is ticked in systray settings, but it doesn't have effect on
> keyboard layout switcher indicator.

By "doesn't  have effect" I mean indicator is still centered incorrectly.
Comment 12 Andrey 2021-06-17 11:56:25 UTC
So can you make it look good somehow then?
Maybe you have set another font or resized panel that is why it's always broken for you now.
AFAIK, on our side it looks good with that tick set.
Comment 13 ChronosXYZ 2021-06-17 12:01:07 UTC
(In reply to Andrey from comment #12)
> So can you make it look good somehow then?
> Maybe you have set another font or resized panel that is why it's always
> broken for you now.
> AFAIK, on our side it looks good with that tick set.

No, I tried everything, it is still doesn't look good.
Comment 14 ChronosXYZ 2021-06-17 12:04:16 UTC
(In reply to Andrey from comment #5)
> We are about to revert this, but have alternative solution.  
> Still, the roots of the problem is not clear, so please help us reproduce it:
> is you display HiDPI, does it happen on new user with default settings,
> panel size etc.?
> Thanks.

Yes, I have HiDPI displays (both - laptop and external screen).
Comment 15 Andrey 2021-06-17 13:28:56 UTC
Could you check if you can center the label with this patch?
We can't test on HiDPI currently..
https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/502