diff options
author | Ken Moore <ken@pcbsd.org> | 2015-04-24 18:53:38 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-04-24 18:53:38 -0400 |
commit | 56a5408045a0d2327842bd5fa3c86a48cd6a375f (patch) | |
tree | 7b044888749f9b92ac504a58a17cfd4e29348ce7 /lumina-desktop/desktop-plugins | |
parent | Update the Fluxbox startup command to use the new "-no-slit" and "-no-toolbar... (diff) | |
download | lumina-56a5408045a0d2327842bd5fa3c86a48cd6a375f.tar.gz lumina-56a5408045a0d2327842bd5fa3c86a48cd6a375f.tar.bz2 lumina-56a5408045a0d2327842bd5fa3c86a48cd6a375f.zip |
Before activating the panel on mouse-over, save the ID of the currently active window and then re-activate that other window when the mouse leaves the panel.
Diffstat (limited to 'lumina-desktop/desktop-plugins')
-rw-r--r-- | lumina-desktop/desktop-plugins/LDPlugin.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lumina-desktop/desktop-plugins/LDPlugin.h b/lumina-desktop/desktop-plugins/LDPlugin.h index 9660a85c..38cfa433 100644 --- a/lumina-desktop/desktop-plugins/LDPlugin.h +++ b/lumina-desktop/desktop-plugins/LDPlugin.h @@ -8,7 +8,7 @@ // Simply subclass this when creating a new plugin to enable correct // visibility and usage within the desktop window //=========================================== -// WARNING: Do *not* setup a custom context menu for plugins! +// WARNING: Do *not* setup a custom context menu for the entire plugins area! // This can prevent access to the general desktop context menu if // the plugin was maximized to fill the desktop area! //=========================================== @@ -58,6 +58,27 @@ public: settings->sync(); } } + + virtual void scalePlugin(double xscale, double yscale){ + //This can be re-implemented in the subclassed plugin as necessary + // Example: If there are icons in the plugin which should also be re-scaled + + int val = settings->value("location/width",0).toInt(); + if(val>0){ val = qRound(val*xscale); } + settings->setValue("location/width",val); + + val = settings->value("location/height",0).toInt(); + if(val>0){ val = qRound(val*yscale); } + settings->setValue("location/height",val); + + val = settings->value("location/x",0).toInt(); + if(val>0){ val = qRound(val*xscale); } + settings->setValue("location/x",val); + + val = settings->value("location/y",0).toInt(); + if(val>0){ val = qRound(val*yscale); } + settings->setValue("location/y",val); + } public slots: virtual void LocaleChange(){ @@ -74,4 +95,4 @@ signals: }; -#endif
\ No newline at end of file +#endif |