The title bar doesn't show the entire title, but instead shortens the title and places three dots (...) in between the beggining and the end of the title. I would have understood if this behavious was used for extremely long titles, but the title is being wrapped up even for small titles. Please check the attachments below. Reproducible: Always Steps to Reproduce: 1. Select Breeze Window Decoration 2. Launch Application Actual Results: Title bar text gets wrapped up. Expected Results: Title bar text should not get wrapped up, except for extremely long titles, like for eg:- long webpage titles in Firefox
The version of Breeze used was 5.2.0-2 (ArchLinux).
Created attachment 91289 [details] Firefox wrapping up the text in titlebar
Created attachment 91290 [details] The same happens in Dolphin as well
Yes. I have seen that happen and seems a problem with font metrics calculations within Qt (some discrepancy between fontMetrics.boundingRect() and fontMetrics.elidedTex(). I had put in a workaround at that time (see: c6e35208c64032ada79b95aa213902a7851aef60), but it might not be enough, depending on the font. Right now, with the font I am using I cannot reproduce. Can you tell me which font you are using ? I'll investigate some more on my side. (might find a non-workaround fix). Will keep you posted. Thanks for reporting, Hugo
Git commit a8d2104ab36c91053da1fee3ad31d68c979965a7 by Hugo Pereira Da Costa. Committed on 25/02/2015 at 23:17. Pushed by hpereiradacosta into branch 'Plasma/5.2'. Added an explicit flag as output from captionRect to tell whether caption must be ellided or not. M +10 -8 kdecoration/breezedecoration.cpp M +7 -1 kdecoration/breezedecoration.h http://commits.kde.org/breeze/a8d2104ab36c91053da1fee3ad31d68c979965a7
Git commit 8ebd33d72d24a2d6aaa73fb9978437bceb7c3091 by Hugo Pereira Da Costa. Committed on 25/02/2015 at 23:17. Pushed by hpereiradacosta into branch 'master'. Added an explicit flag as output from captionRect to tell whether caption must be ellided or not. M +10 -8 kdecoration/breezedecoration.cpp M +7 -1 kdecoration/breezedecoration.h http://commits.kde.org/breeze/8ebd33d72d24a2d6aaa73fb9978437bceb7c3091
ok. That should fix it. Don't hesitate to confirm (if you get a chance to compile breeze from source and/or apply the patch to the version you have). Feel free to re-open if bug reoccurs. Best, Hugo
Thanks for your efforts, Hugo. I'm using the Noto Sans Regular font. I'll try to check whether the issue has been fixed.
Alright, the text isn't getting elided up any more, but it is now getting cut off at the end for some reason. Please check the attachments.
Created attachment 91298 [details] Text cut off at the end - Firefox
Created attachment 91299 [details] Text cut off at the end - Dolphin
... crap. I really suspect something wrong either in the Qt or in the font ... Thanks for posting the one you are using, I'll investigate further.
basically, some 'text' does not fit into the fontMetrics::boundingRect() calculated from this text ... (so was getting elided in the past, and gets truncated now ...)
I tried changing my Window Title font to Oxygen Sans and it showed the title perfectly. I think there is something wrong with the Noto Sans font maybe. Oh, and I'm using the Infinality package for font rendering if that makes any difference.
I also use the Infinality patch set, but reverting to the stock packages offered by Arch has no effect on this bug. I can confirm that Oxygen Sans works fine for the title bars. Noto Sans also works for me, interestingly. Droid Sans and DejaVu Sans do not work. My standard test application is Crashplan, a java program. The title bar merely displays "Cras...lan". Maybe this info can help with replicating the bug. Thanks for your investigation, Hugo!
oh I can replicate the bug no worry just have no idea so far on how to fix :) (well, have some ideas but had no time to test)
Git commit 850906e9d78e1b928d2865057310d4f52caabe6c by Hugo Pereira Da Costa. Committed on 13/03/2015 at 09:26. Pushed by hpereiradacosta into branch 'Plasma/5.2'. removed ellision flag from captionRect (broken anyway) ellide caption text directly at rendering and not prior, using fontMetrics::elidedText seems to 'fix' overzealous ellision M +3 -10 kdecoration/breezedecoration.cpp M +2 -6 kdecoration/breezedecoration.h http://commits.kde.org/breeze/850906e9d78e1b928d2865057310d4f52caabe6c
Git commit 6195ee0b0a4b2e06aa6b91b5242a5a8adac95dce by Hugo Pereira Da Costa. Committed on 13/03/2015 at 09:26. Pushed by hpereiradacosta into branch 'master'. removed ellision flag from captionRect (broken anyway) ellide caption text directly at rendering and not prior, using fontMetrics::elidedText seems to 'fix' overzealous ellision M +3 -10 kdecoration/breezedecoration.cpp M +2 -6 kdecoration/breezedecoration.h http://commits.kde.org/breeze/6195ee0b0a4b2e06aa6b91b5242a5a8adac95dce
new attempt. Any chance you can give it a shot ? It does work here for cases where I had ellided text that should not be. If it still doesn't work, I have other ideas (this fix is rather simple and might be due to me mis-interpretting the Qt API) Otherwise, well, feel free to close :) Thanks, Hugo
Now the text gets cut off at the begin. I don't remember having problems with ellision, but I did with text getting cut off at the end.
Hi Mika, thanks for the feedback can you provide the font you are using, fontsize, and an example of window where the text is cut off ? I'll go ahead and code the plans I have for a more robust implementation (as a matter of fact it seems that boundingRect and ellideText don't play nice one with the other)
Created attachment 91568 [details] Text cut off at the begin - System Settings
I'm using DejaVu Sans, 9pt as window title font.
Can reproduce, thanks !
Hello, Sorry for the late reply. I'm also experiencing the same effects as Mika. The text is getting cut off at the beggining of the title. I'm using Noto Sans Regular (Size - 10) as before. Oxygen Sans is still unaffected, and is showing the title properly.
Hi I think I finally have a patch that should work this time. In any case previous one is definitely broken as far as I can tell (no text elision any more, plus truncated title: worse of both worlds) Anyway, I'll test some more and push later today. Thanks for your patience
Git commit 8568a80a6ed05c260b088528f5f59957cd1c53e0 by Hugo Pereira Da Costa. Committed on 16/03/2015 at 09:26. Pushed by hpereiradacosta into branch 'Plasma/5.2'. Pass both caption rect and alignment as output from ::captionRect Use largest possible rect for all combinations, to avoid truncation Adjust alignment flags accordingly. M +21 -28 kdecoration/breezedecoration.cpp M +1 -1 kdecoration/breezedecoration.h http://commits.kde.org/breeze/8568a80a6ed05c260b088528f5f59957cd1c53e0
Git commit 79ffe5e50e6b20b3d3275744c5df0662986be415 by Hugo Pereira Da Costa. Committed on 16/03/2015 at 09:26. Pushed by hpereiradacosta into branch 'master'. Pass both caption rect and alignment as output from ::captionRect Use largest possible rect for all combinations, to avoid truncation Adjust alignment flags accordingly. M +22 -27 kdecoration/breezedecoration.cpp M +1 -1 kdecoration/breezedecoration.h http://commits.kde.org/breeze/79ffe5e50e6b20b3d3275744c5df0662986be415
Alright, good news!! The title bar is working as expected and the really long titles which can't fit in the title bar are also getting elided.... great job Hugo! Guess this bug can now be marked as resolved.
It's now working here too.
ok. closing. Thanks
*** Bug 345351 has been marked as a duplicate of this bug. ***