[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: [kdeplasma-addons] applets/fileWatcher: fix the minimum size only on the desktop
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2012-06-21 13:03:22
Message-ID: 1656558.LdCky2PHJq () freedom
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
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
["signature.asc" (application/pgp-signature)]
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic