aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/LDesktopPluginSpace.h
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-10-20 16:57:33 -0400
committerKen Moore <moorekou@gmail.com>2015-10-20 16:57:33 -0400
commit07b17507d6d1f09a0d8a982a2667628cd264d9e5 (patch)
tree325a8d70b5f002dca096ce53f6698654cce82d7a /lumina-desktop/LDesktopPluginSpace.h
parentOops, reversed the height/width for the default size of the system monitor pl... (diff)
downloadlumina-07b17507d6d1f09a0d8a982a2667628cd264d9e5.tar.gz
lumina-07b17507d6d1f09a0d8a982a2667628cd264d9e5.tar.bz2
lumina-07b17507d6d1f09a0d8a982a2667628cd264d9e5.zip
Fix up the reverse location lookup procedures for desktop plugins - now when the grid size is increased the items should try to stay in the same general spot if possible.
Diffstat (limited to 'lumina-desktop/LDesktopPluginSpace.h')
-rw-r--r--lumina-desktop/LDesktopPluginSpace.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lumina-desktop/LDesktopPluginSpace.h b/lumina-desktop/LDesktopPluginSpace.h
index 316ee2f9..33c9468e 100644
--- a/lumina-desktop/LDesktopPluginSpace.h
+++ b/lumina-desktop/LDesktopPluginSpace.h
@@ -59,7 +59,8 @@ private:
void addDesktopPlugin(QString plugID);
- QRect findOpenSpot(int gridwidth = 1, int gridheight = 1, int startRow = 0, int startCol = 0);
+ QRect findOpenSpot(int gridwidth = 1, int gridheight = 1, int startRow = 0, int startCol = 0, bool reversed = false, QString plugID = "");
+ QRect findOpenSpot(QRect grid, QString plugID, bool recursive = false);
QPoint posToGrid(QPoint pos){
//This assumes a point in widget-relative coordinates
@@ -113,6 +114,7 @@ private:
}
bool ValidGrid(QRect grid){
+ qDebug() << "Check Valid Grid:" << grid << RoundUp(this->width()/GRIDSIZE) << RoundUp(this->height()/GRIDSIZE);
//This just checks that the grid coordinates are not out of bounds - should still run ValidGeometry() below with the actual pixel geom
if(grid.x()<0 || grid.y()<0 || grid.width()<0 || grid.height()<0){ return false; }
else if( (grid.x()+grid.width()) > RoundUp(this->width()/GRIDSIZE) ){ return false; }
bgstack15