Version: (using KDE 4.2.0) OS: Linux Installed from: Ubuntu Packages When I have a pager plasmoid on my desktop, log out and log in again, the pager has changed its size. After the second (re-)login, the pager has become so small as to be unusable. This buggy behaviour doesn't seem to depend on the position on the desktop (also when I put it in the center), and also occurs in a fresh user account that has no extra plasmoids installed. I will attach screenshots that show the pager before logout, after logging in again, and after logging out and in a second time. PS: If you carefully examine the screenshots, you will notice that something else changes, too, namely the position of the System Monitor plasmoid in the panel on the right side. I will report this in an extra bug report, though.
Created attachment 30753 [details] Screenshot of the pager before logging out.
Created attachment 30754 [details] Screenshot of the pager after logging in.
Created attachment 30755 [details] Screenshot of the pager after logging in a second time.
I can confirm this. Furthermore, the pager is drawn with a wrong aspect ratio, and Plasma theme layers do not align correctly. This seems to depend on the theme used, though.
Created attachment 30825 [details] Pager after login. Using Slim Glow plasmatheme
Created attachment 30881 [details] Fix pager plasmoid resizing bug This patch seems to have fixed the bug for me. The problem was that the rect returned be QGraphicsWidget::contentsRect() was assumed to include the margins, which it doesn't. Thus, subtracting the margins from the rect resulted in the size being slightly smaller each time it was recalculated. I have svn access, and can apply the patch if there aren't any objections.
After I finally managed to compile the pager, I can confirm that this fixes the bug. Due to the fix, also some strange artefacts that happened when resizing the pager have disappeared. Good catch! From my point of view: apply the patch.
SVN commit 920594 by rpedersen: Fix pager plasmoid resizing bug The problem was that the rect returned be QGraphicsWidget::contentsRect() was assumed to include the margins, which it doesn't. Thus, subtracting the margins from the rect resulted in the size being slightly smaller each time it was recalculated. BUG: 182487 M +2 -2 pager.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=920594
SVN commit 920596 by rpedersen: backport 920594 CCBUG: 182487 M +2 -2 pager.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=920596
I just realized that I just _reverted_ the last bugfix by aseigo. Obviously, this bug was introduced when bug 180440 was fixed. I think the margins must be handled differently for the desktop and the panel. I will try to figure this out, but unfortunately my current location is not ideal for debugging this.
Created attachment 30909 [details] Possible fix After some debugging, I came up with this hack to fix the bug, without reintroducing bug 180440. I'll wait until aseigo is available for comments.
SVN commit 921782 by rpedersen: Handle margins correctly both when pager is on desktop and in panel This should result in correct behavior in both cases. But IMHO, this requires a better solution.. BUG: 180440 BUG: 182487 M +8 -2 pager.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=921782
SVN commit 921784 by rpedersen: backport 921782 CCBUG: 180440 CCBUG: 182487 M +8 -2 pager.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=921784
Unfortunately, I have to reopen the bug. When I apply your latest patch, the pager is still resized upon relogin. I have experimented a bit, and the problem seems to be that the location()-logic doesn't seem to work: location() == Plasma::Desktop is always false, so that the alternative size calculation is never used. So, the fix unfortunately is not complete.
OK, thanks for testing it. I also tried this first: if (formFactor() != Plasma::Vertical && formFactor() != Plasma::Horizontal) It didn't work either, because when the pager is resized on the desktop, it actually is either Vertical or Horizontal, which leads to wierd effects. I hope someone with more knowledge of plasma can have a look at this. I'll be busy with real life for the next few days.
No problem, and thanks for trying it! Just one more hint: From http://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/namespacePlasma.html#2e56eee20e28bd3df07081e9ac7cf72b I conclude, that location() does not at all give any hint on whether an applet is used on the Desktop or in the Panel.
SVN commit 927574 by rpedersen: Handle margins correctly both when pager is on desktop and in panel Using Plasma::Desktop did not work, now using Plasma::Floating instead which seems to work for me. CCBUG: 180440 CCBUG: 182487 M +2 -2 pager.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=927574
Now I can confirm that the fix indeed works to fix the resizing problem. Good catch!