Summary: | Long caption in Thumbnail layout overlaps box for only one item | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | David Martí <neikokz+kbugs> |
Component: | tabbox | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 4.8.1 | ||
Target Milestone: | 4.8.3 | ||
Platform: | unspecified | ||
OS: | Linux | ||
URL: | https://git.reviewboard.kde.org/r/104507/ | ||
Latest Commit: | Version Fixed In: | 4.8.3 | |
Sentry Crash Report: | |||
Attachments: |
Screenshot
Another screenshot |
Way to reproduce: use the dialog when there's only a window open. It's 100% reproduceable. The problem is that the window title is bigger than the size of the tabbox and the thumbnail is not centered in the tabbox. Created attachment 69990 [details]
Another screenshot
I can reproduce on current master It is not possible to fix this bug properly as QML seems not to be meant to have text elements with changing sizes. The only possibility to fix I have seen so far is to create a new text element whenever the selection changes, get the implicitWidth and use it to update the item's width. That would of course impact the performance. I'll try to at least clip properly for one item. I succeeded, please have a look at https://git.reviewboard.kde.org/r/104507/ (especially the screenshot) and if possible give it a try. This solves half of the issue, the thumbnail and the text aren't centered yet inside the tabbox The text is perfectly centered. Not having the thumbnail centered is actually a different bug :-) Reported Bug #297856 for the new spotted issue Git commit 41b0647ad4ad052a3b6b049cb8ffdc526a6e03fd by Martin Gräßlin. Committed on 09/04/2012 at 11:28. Pushed by graesslin into branch 'master'. Constrain width of text element in Thumbnail Layout Fixes a layouting issue when caption does not fit into the window switcher box. REVIEW: 104507 M +22 -0 kwin/tabbox/qml/clients/thumbnails/contents/ui/main.qml http://commits.kde.org/kde-workspace/41b0647ad4ad052a3b6b049cb8ffdc526a6e03fd Git commit 8cdc6c341456f361a45bbc28cb85869004de3900 by Martin Gräßlin. Committed on 09/04/2012 at 11:28. Pushed by graesslin into branch 'KDE/4.8'. Constrain width of text element in Thumbnail Layout Fixes a layouting issue when caption does not fit into the window switcher box. Cherry-picked from 41b0647ad4ad052a3b6b049cb8ffdc526a6e03fd REVIEW: 104507 FIXED-IN: 4.8.3 M +22 -0 kwin/tabbox/qml/thumbnails.qml http://commits.kde.org/kde-workspace/8cdc6c341456f361a45bbc28cb85869004de3900 |
Created attachment 69989 [details] Screenshot Screenshot attached.