Summary: | Pager is resized upon relogin | ||
---|---|---|---|
Product: | [Unmaintained] plasma4 | Reporter: | Olaf Lenz <olaf> |
Component: | general | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | marc.weidinger, robinpeder |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Screenshot of the pager before logging out.
Screenshot of the pager after logging in. Screenshot of the pager after logging in a second time. Pager after login. Using Slim Glow plasmatheme Fix pager plasmoid resizing bug Possible fix |
Description
Olaf Lenz
2009-01-30 21:31:10 UTC
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! |