[kdeplasma-addons] applets/fileWatcher: fix the minimum size only on the desktop
Aaron J. Seigo
aseigo at kde.org
Thu Jun 21 13:03:22 UTC 2012
On Wednesday, June 13, 2012 15:36:39 Anne-Marie Mahfouf wrote:
> Git commit b7eff7326cbe4392bcbeb2c57371efc1b75c421a by Anne-Marie Mahfouf.
> Committed on 13/06/2012 at 15:32.
> Pushed by annma into branch 'master'.
>
> fix the minimum size only on the desktop
>
> CCBUG: 301676
>
> M +5 -1 applets/fileWatcher/fileWatcher.cpp
>
> http://commits.kde.org/kdeplasma-addons/b7eff7326cbe4392bcbeb2c57371efc1b75c
> 421a
>
> diff --git a/applets/fileWatcher/fileWatcher.cpp
> b/applets/fileWatcher/fileWatcher.cpp index 8b8aa2e..2544013 100644
> --- a/applets/fileWatcher/fileWatcher.cpp
> +++ b/applets/fileWatcher/fileWatcher.cpp
> @@ -45,7 +45,6 @@ FileWatcher::FileWatcher(QObject *parent, const
> QVariantList &args) {
> setAspectRatioMode(Plasma::IgnoreAspectRatio);
> setHasConfigurationInterface(true);
> - setMinimumSize(200, 100);
> resize(400, 200);
> }
>
> @@ -112,6 +111,11 @@ void FileWatcher::constraintsEvent(Plasma::Constraints
> constraints) textItem->setPos(contentsRect().topLeft());
> updateRows();
> }
> + if (constraints & Plasma::FormFactorConstraint) {
> + if (formFactor() == Plasma::Planar) {
> + setMinimumSize(200, 100);
> + }
> + }
> }
this still is not enough because the minimum size is not reset when move from
the desktop into a panel. will fix, but keep this in mind ..
also, if an applet needs such a thing, it usually is because it can not scale
the main interface down well, and so should then become a popup applet.
and sometimes the main interface does not scale down well, but could if there
was some additional thought put into it :)
--
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120621/b3ef46a5/attachment.sig>
More information about the Plasma-devel
mailing list