enaml
enaml copied to clipboard
Text Eliding when changing styles in the DockArea
When changing between styles on the DockArea the labels on the dock item title bars elide their text if the font size incurs a large increase. This is likely caused by QTextLabel caching it's size hint and not invalidating that cache on a style change. An appropriate fix would be to catch the QEvent::StyleChange and invalidate the cached hint.
In addition to the style change, there also appears to be an issue with an off-by-one error in the computation for QFontMetrics::elidedText. If for example QFontMetrics::width(...) returns 40, then QFontMetrics.elidedText(...) requires a width of 41 to not elide the text. This is on OSX with a retina display. I have not seen the issue on a Windows box.
A workaround was committed here: 5d7d0debe158065473bef4e476af3b5c49a0f57f
But, I'd still like to confirm whether the off-by-one issue is retina/OSX related, so i'm leaving the issue open for now.
@gabrielcnr Could you confirm this is still an issue on OSX ?