[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: [Icon Plasmoid] Provide a generic plasmoid class for icon based
From: Loïc_Marteau <loic.marteau () gmail ! com>
Date: 2008-05-31 16:15:40
Message-ID: 484179AC.1050909 () gmail ! com
[Download RAW message or body]
Sorry forgot to delete this line when i make some tests :o(
void ShowDesktop::constraintsEvent(Plasma::Constraints constraints)
{
///Plasma::Applet::constraintsEvent(constraints); //mistake, line to
remove, sorry
m_icon->resize(contentsRect().size());
}
Cheers
Loïc Marteau wrote:
> Aaron J. Seigo wrote:
>> On Saturday 24 May 2008, Loïc Marteau wrote:
>>
>>> Each plasmoid have a particular way to implement the size stuff and the
>>> result is not often perfect.
>>>
>>
>> setAspectRatioMode(Plasma::Square)?
>>
>> if that isn't working, it needs to be fixed. but that's what it is
>> there for.
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Panel-devel mailing list
>> Panel-devel@kde.org
>> https://mail.kde.org/mailman/listinfo/panel-devel
>>
> ok
>
> Here is what i have when i try to use
> setAspectRatioMode(Plasma::Square) and make it the most simple as
> possible.
>
> void ShowDesktop::init()
> {
> setBackgroundHints(NoBackground);
> setAspectRatioMode(Plasma::Square);
> m_icon = new Plasma::Icon(KIcon("user-desktop"),QString(),this);
>
> connect(m_icon, SIGNAL(clicked()), this, SLOT(pressed()));
>
> [...]
> }
>
>
> void ShowDesktop::constraintsEvent(Plasma::Constraints constraints)
> {
> Plasma::Applet::constraintsEvent(constraints);
> m_icon->resize(contentsRect().size());
> }
>
>
> i attach the files for the showdesktop plasmoid.
>
> Question 1 :
> Is this the good way (tm) to implement icon based plasmoid ?
>
> There is a lot of icon plasmoid and they have all different way to
> implement size constraint stuff. The result is unequal.
>
> The result with this code is a little better than with the actual
> showdesktop plasmoid (he take less unused width space in border).
> Question 2 :
> Can this code be commited to trunk for showdesktop ?
>
> However, wee still need to implement the constraintsevent function to
> correctly resize the icon. I think that if we have a generic class
> icon it will be more useful to use.
>
> I think that such icon plasmoid should be a little more little (*0.75
> would be fine) and still take too much unused width space (it is much
> better with setAspectRatioMode(Plasma::Square) but still not perfect).
> Question 3 :
> How can i do to reduce the size to 75 % ?
> Question 4 :
> It is possible to reduce the width of unused space when we use the
> setAspectRatioMode(Plasma::Square) shortcut ?
>
> I would like to have a result like this :
> http://nuno-icons.com//images/estilo/imagefoldersclock.png
>
>
> I would like to help, i think that there is some plasmoid to polish
> with the size constraint stuff (showdesktop, showdashboard, trashcan,
> .desktop shortcut plasmoid, notify, new device notifier). I can
> perhaps help to patch them if we found the correct way to deal with
> this problem.
>
>
> Best regards,
>
> Loic
_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic