| Summary: | Titlebar height is not set properly after it is changed from empty string | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | memidormid |
| Component: | decorations | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | hugo.pereira.da.costa |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Sample Java code to reproduce the bug | ||
|
Description
memidormid
2017-05-31 12:32:47 UTC
Hugo, could you check if this is a KWin or breeze decoration issue? Hi Christoph Probably a breeze bug. When we calculate the decoration borders we use: fm.boundingRect(c->caption()) (fm being fontMetrics) So when caption is empty, this gives 0. It is then not updated on caption change. I guess I shoud just use fm.height() (after all you do not want the size of the decoration to change depending on the caracters that appear in the caption !) Git commit 2cc0f8ba2da50ca3efa500ebdcc3655c8d0e47f8 by Hugo Pereira Da Costa. Committed on 06/06/2017 at 15:47. Pushed by hpereiradacosta into branch 'master'. use fontMetrics.height() rather than boundingRect(...).height() the height of the title bar should not depend on the caption content. M +1 -1 kdecoration/breezedecoration.cpp https://commits.kde.org/breeze/2cc0f8ba2da50ca3efa500ebdcc3655c8d0e47f8 Was able to test with the provided java code (thanks !) Now fixed. Will backport and also fix oxygen. Thanks for reporting the issue Hugo Git commit 4f0940b79001ae8b400d01a8abf63d03b8dbd9fc by Hugo Pereira Da Costa. Committed on 06/06/2017 at 16:06. Pushed by hpereiradacosta into branch 'Plasma/5.10'. use fontMetrics.height() rather than boundingRect(...).height() the height of the title bar should not depend on the caption content. M +1 -1 kdecoration/breezedecoration.cpp https://commits.kde.org/breeze/4f0940b79001ae8b400d01a8abf63d03b8dbd9fc |