aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/desktop-plugins/LDPluginContainer.h
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-07-08 02:37:09 -0400
committerKen Moore <moorekou@gmail.com>2015-07-08 02:37:09 -0400
commit7e2c562e45e52fc151be9af1bebc3ad1b03b995c (patch)
treed24c2ea7660124b01a3f45704002b9d7f80cee50 /lumina-desktop/desktop-plugins/LDPluginContainer.h
parentFix the initial brightness detection for FreeBSD on new users/systems. (diff)
downloadlumina-7e2c562e45e52fc151be9af1bebc3ad1b03b995c.tar.gz
lumina-7e2c562e45e52fc151be9af1bebc3ad1b03b995c.tar.bz2
lumina-7e2c562e45e52fc151be9af1bebc3ad1b03b995c.zip
Update how the desktop icons (applaunchers or desktopview) are created/arranged initially. Now the desktopview should be oriented the proper way, and the applauncher icons should be the proper size (although they are still not being placed in non-overlapping locations yet).
Diffstat (limited to 'lumina-desktop/desktop-plugins/LDPluginContainer.h')
-rw-r--r--lumina-desktop/desktop-plugins/LDPluginContainer.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/lumina-desktop/desktop-plugins/LDPluginContainer.h b/lumina-desktop/desktop-plugins/LDPluginContainer.h
index c4d4c9fc..8719f525 100644
--- a/lumina-desktop/desktop-plugins/LDPluginContainer.h
+++ b/lumina-desktop/desktop-plugins/LDPluginContainer.h
@@ -12,6 +12,7 @@
#include <QObject>
#include <QMdiSubWindow>
+#include <QApplication>
#include <QSettings>
#include <QMoveEvent>
#include <QResizeEvent>
@@ -52,7 +53,7 @@ public:
this->setWhatsThis(plugin->ID());
this->setContentsMargins(0,0,0,0);
if(!locked){
- this->setStyleSheet("LDPluginContainer{ border-size: 1px;}");
+ //this->setStyleSheet("LDPluginContainer{ border-width: 1px;}");
this->setWindowTitle( plugin->ID().replace("---"," - ") );
//this->setWidget( new QWidget() );
this->setWidget( plugin );
@@ -68,8 +69,8 @@ public:
}
void loadInitialPosition(){
- QRect set(PLUG->readSetting("location/x",-12345).toInt(), PLUG->readSetting("location/y",-12345).toInt(), PLUG->readSetting("location/width",this->widget()->size().width()).toInt(), PLUG->readSetting("location/height",this->widget()->size().height()).toInt());
- //qDebug() << "Initial Plugin Location:" << set.x() << set.y() << set.width() << set.height();
+ QRect set(PLUG->readSetting("location/x",-12345).toInt(), PLUG->readSetting("location/y",-12345).toInt(), PLUG->readSetting("location/width",PLUG->size().width()).toInt(), PLUG->readSetting("location/height",PLUG->size().height()).toInt());
+ qDebug() << "Initial Plugin Location:" << set.x() << set.y() << set.width() << set.height();
if(set.height() < 10){ set.setHeight(10); } //to prevent foot-shooting
if(set.width() < 10){ set.setWidth(10); } //to prevent foot-shooting
if(set.x()!=-12345 && set.y()!=-12345){
@@ -81,8 +82,13 @@ public:
//qDebug() << " - Found Size:" << set;
this->resize(set.width(), set.height());
}
+ QApplication::processEvents();
setup=false; //done with setup
}
+
+ bool hasFixedPosition(){
+ return (PLUG->readSetting("location/x",-12345).toInt() != -12345);
+ }
signals:
void PluginRemoved(QString);
bgstack15