From 7e2c562e45e52fc151be9af1bebc3ad1b03b995c Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 8 Jul 2015 02:37:09 -0400 Subject: 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). --- lumina-desktop/desktop-plugins/LDPluginContainer.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lumina-desktop/desktop-plugins/LDPluginContainer.h') 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 #include +#include #include #include #include @@ -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); -- cgit