https://bugs.kde.org/show_bug.cgi?id=372081

--- Comment #7 from Hugo Pereira Da Costa <hugo.pereira.da.co...@gmail.com> ---
(In reply to Christoph Feck from comment #4)
> Adding Hugo for the KCapacityBar issue.
> 
> The default rendering of KCapacityBar is visible on
> https://api.kde.org/frameworks/kwidgetsaddons/html/classKCapacityBar.html
> 
> "inline text" mode draws the text inside the bar
> "outline text" mode draws the text below the bar
> 
> KInfoCenter uses the "outline text" mode.
> 
> KCapacityBar::minimumSizeHint() assumes this layout.
> 
> With Fusion style (which does not customize the rendering), the text is
> correctly drawn below the bar, and elided with trailing dots, if it does not
> fit completely.
> 
> With Breeze style, the text is rendered to the right of the bar, and the bar
> and leading text characters vanish when it does not fit completely.
> 
> Can KCapacityBar respect the different layout, in other words, is there some
> QStyle::sizeFromContents() for this custom ControlElements implemented in
> Breeze?

Hello Christoph

Thanks for adding me to the bug report.
So, first, this is not really a bug, right ? i mean, all the information is
displayed, provided there is enough space for it.

More seriously, in the current kcapacity bar implementation, the drawTextMode
you mention is only used when internal rendering is called, it is not known to
the style at all.

I guess one could pass it via a property on the widget, at the minimum.

And then you are right, there is the minimumSizeHint. It basically works only
if internal rendering is used. In principle the class should also call a
style-implemented minimumSizeHint (some sizeFromContents with the right
elements), in case of styled rendering. All in all there seems there is a need
for some reworking of the kcapacitybar class if we want to really support sized
rendering ....

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to