[Panel-devel] trashcan applet

Marco Martin martkive at gmail.com
Thu Nov 29 19:12:33 CET 2007


On Thursday 29 November 2007, Aaron J. Seigo wrote:
> i think it might just be easier to completely rewrite the Icon class at
> this point rather than try and untangle it. it should be a quick job as it
> just needs to show, well, an icon and some text below it given a certain
> amount of space.
>

maybe at this point is useless, but anyway, i've done a few tests around it 
and it seems that if the applet don't use a Plasma::HBoxLayout it works 
better and slapping the method

void Icon::resize(const QSizeF& s)
{
  QApplication::style()->pixelMetric(QStyle::PM_FocusFrameHMargin);
  int iconWidth = s.width()-focusHMargin*2;
  Icon::setIconSize(iconWidth, iconWidth);
}

into Icon it's possible to correctly resize it, but it always wants to be 
square and the text is always hidden

Cheers,
Marco Martin



More information about the Panel-devel mailing list