Bug 413686 - Wrong offset of the virtual desktop numbers in the virtual desktop switcher applet after activating the option
Summary: Wrong offset of the virtual desktop numbers in the virtual desktop switcher a...
Status: RESOLVED DUPLICATE of bug 405454
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 5.20.4
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 413224 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-31 20:52 UTC by postix
Modified: 2023-12-09 04:11 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of the issue. (8.56 KB, image/png)
2019-10-31 20:52 UTC, postix
Details
Screenrecording. (774.16 KB, video/mp4)
2020-01-25 15:27 UTC, postix
Details
plasma 5.18 beta, panel 32px (107.12 KB, image/png)
2020-01-25 17:43 UTC, Patrick Silva
Details
Image of the bug occurrence (26.37 KB, image/png)
2020-12-10 16:46 UTC, felipesabrahao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2019-10-31 20:52:22 UTC
Created attachment 123627 [details]
Screenshot of the issue.

SUMMARY

If the option to display the numbers is turned on, the numbers have a wrong offset. If the panel gets resized once, the numbers are in place again until the option to display the numbers becomes de- and reactivated again.

See screenshot.

Operating System: Manjaro Linux 
KDE Plasma Version: 5.17.2
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.1
Comment 1 Patrick Silva 2020-01-25 14:09:48 UTC
Cannot reproduce here.

Operating System: Arch Linux 
KDE Plasma Version: 5.17.90
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.0
Comment 2 postix 2020-01-25 15:27:15 UTC
Created attachment 125400 [details]
Screenrecording.

(In reply to Patrick Silva from comment #1)
> Cannot reproduce here.
> 
> Operating System: Arch Linux 
> KDE Plasma Version: 5.17.90
> KDE Frameworks Version: 5.66.0
> Qt Version: 5.14.0

I can still reproduce it on 5.17.5 with scaling 1.0 and dpi non-forced. Maybe something at git master has resolved it?
Comment 3 Patrick Silva 2020-01-25 17:43:21 UTC
Created attachment 125405 [details]
plasma 5.18 beta, panel 32px

humm, I can reproduce according to panel heigh.
My screenshot shows panel 32px on Plasma 5.18 beta.
The problem disappears after relogin, after plasma to be restarted with "plasmashell --replace"
and increasing the panel height.
Comment 4 postix 2020-01-25 17:50:45 UTC
(In reply to Patrick Silva from comment #3)
> Created attachment 125405 [details]
> plasma 5.18 beta, panel 32px
> 
> humm, I can reproduce according to panel heigh.
> My screenshot shows panel 32px on Plasma 5.18 beta.
> The problem disappears after relogin, after plasma to be restarted with
> "plasmashell --replace"
> and increasing the panel height.

That's exactly what I experience, too.
Comment 5 Patrick Silva 2020-01-25 18:40:56 UTC
exact steps to reproduce on my system:
1. have a panel with height equal or less than 32px without Pager widget
2. set virtual desktops in system settings > workspace behavior > virtual desktops (I use 4 desktops, 2 rows)
3. add Pager widget to plasma panel
4. right click on the just added Pager, select "Configure Pager...", select "Desktop number" radio button, click on "Ok" button
Comment 6 postix 2020-01-25 22:49:55 UTC
I made some more observations

1) Use
>  kquitapp5 plasmashell && kstart5 plasmashell 
to reset the pager so everything looks fine

2) When the displayed label is changed to "text" and back to "number", the font size of the number becomes bigger

3) There are several binding loops, here with two virtual desktops, so every line appears twice:

From "number" to "text":
/org.kde.plasma.pager/contents/ui/main.qml:177:9: QML Label: Possible anchor loop detected on fill.
/org.kde.plasma.pager/contents/ui/main.qml:177:9: QML Label: Binding loop detected for property "font.pixelSize"
/org.kde.plasma.pager/contents/ui/main.qml:177:9: QML Label: Possible anchor loop detected on fill.
/org.kde.plasma.pager/contents/ui/main.qml:177:9: QML Label: Binding loop detected for property "font.pixelSize"
/org.kde.plasma.pager/contents/ui/main.qml:190: TypeError: Cannot read property 'display' of null
/org.kde.plasma.pager/contents/ui/main.qml:190: TypeError: Cannot read property 'display' of null

From "text" back to "number":
/org.kde.plasma.pager/contents/ui/main.qml:177:9: QML Label: Possible anchor loop detected on fill.
/org.kde.plasma.pager/contents/ui/main.qml:177:9: QML Label: Binding loop detected for property "font.pixelSize"
/org.kde.plasma.pager/contents/ui/main.qml:177:9: QML Label: Possible anchor loop detected on fill.
/org.kde.plasma.pager/contents/ui/main.qml:177:9: QML Label: Binding loop detected for property "font.pixelSize"

From "number" to "none":
/org.kde.plasma.pager/contents/ui/main.qml:190: TypeError: Cannot read property 'display' of null
/org.kde.plasma.pager/contents/ui/main.qml:190: TypeError: Cannot read property 'display' of null


The issue is somewhere here:
https://github.com/KDE/plasma-desktop/blob/Plasma/5.17/applets/pager/package/contents/ui/main.qml#L190

If I set `font.pixelSize` to a fixed value like 8 or 20, the label is always correctly positioned and I no longer receive the both erros:
> Possible anchor loop detected on fill.
> Binding loop detected for property

but only 
> Cannot read property 'display' of null
remains.
Comment 7 postix 2020-01-25 23:09:14 UTC
That's when and why the dynamic fontSize was introduced: https://phabricator.kde.org/D19751
Comment 8 Patrick Silva 2020-01-25 23:22:41 UTC
another report about the numbers: bug 413224
Comment 9 postix 2020-01-25 23:34:07 UTC
*** Bug 413224 has been marked as a duplicate of this bug. ***
Comment 10 postix 2020-01-25 23:35:39 UTC
(In reply to Patrick Silva from comment #8)
> another report about the numbers: bug 413224

If I'm not mistaken it's actually a duplicate and happens if "pagerModel.refresh();" is invoked, either by drag and drop or by changing the label's text.
Comment 11 Markus 2020-02-27 17:27:31 UTC
Still present in 5.18.2.
Comment 12 felipesabrahao 2020-12-10 16:45:00 UTC
Confirmed here on KDE 5.19.5

SUMMARY
On boot or after the repositioning of plugging/unplugging secondary displays, the numbers of the virtual desktops becomes unaligned with respect to the desktop square icons (see the attached pictures).

STEPS TO REPRODUCE
1. Set the Virtual Desktop widget to show numbers.

2. The bug appears after booting the desktop environment OR after repositioning of plugging/unplugging secondary displays.


OBSERVED RESULT
See attached images.


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: openSUSE Tumbleweed or Leap.
(available in About System)
Tested on:
KDE Plasma Version: 5.12+ (current 5.19.5)
KDE Frameworks Version: 5.68+ (current 5.74)
Qt Version: 5.12+ (current 5.15.1)

WORKAROUND:
I have no clue on how to workaround the bug appearance after plugging/unplugging secondary displays. But for the case of booting the DE, I just added: 

sleep 7; /usr/bin/latte-dock

on the application initialization command, which makes the unalignment not occur.

In any event, after the bug appears, by just resizing the dock in the "Dock Settings" the numbers get aligned again.
Comment 13 felipesabrahao 2020-12-10 16:46:01 UTC
Created attachment 133973 [details]
Image of the bug occurrence
Comment 14 postix 2020-12-10 17:22:28 UTC
Well, you moved it to Lattedock, but the original bug was confirmed for the plasmashell's panel. 
I guess it doesn't matter as it especially concerns the plasmoid, but I would still have filed it under plasmashell.
Comment 15 felipesabrahao 2020-12-11 15:04:55 UTC
(In reply to postix from comment #14)
> Well, you moved it to Lattedock, but the original bug was confirmed for the
> plasmashell's panel. 
> I guess it doesn't matter as it especially concerns the plasmoid, but I
> would still have filed it under plasmashell.

Right, so do you think it might be better to file a new bug?

KDE 5.19.5

Have just tested the virtual desktop pager applet on stock plasma's panel and the bug is not occurring.
It seems the problem is occurring only when the pager is set onto lattedock.
Comment 16 postix 2020-12-11 15:29:27 UTC
I can still reproduce it on 

Operating System: Manjaro Linux
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.2

with 2x scaling and a panel height of 26 px.
Comment 17 felipesabrahao 2020-12-12 15:47:35 UTC
(In reply to postix from comment #16)
> I can still reproduce it on 
> 
> Operating System: Manjaro Linux
> KDE Plasma Version: 5.20.4
> KDE Frameworks Version: 5.76.0
> Qt Version: 5.15.2
> 
> with 2x scaling and a panel height of 26 px.

I will file as a new bug.
Comment 18 Patrick Silva 2021-06-04 14:48:29 UTC

*** This bug has been marked as a duplicate of bug 405454 ***