diff options
Diffstat (limited to 'src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp b/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp index a55f3e31..ff460125 100644 --- a/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp +++ b/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp @@ -113,7 +113,9 @@ void LDesktopPluginSpace::addDesktopPlugin(QString plugID){ //No previous location - need to calculate initial geom QSize sz = plug->defaultPluginSize(); //in grid coordinates geom.setSize(sz); - geom = findOpenSpot(geom.width(), geom.height() ); + //if an applauncher - add from top-left, otherwise add in from bottom-right + if(plugID.startsWith("applauncher")){ geom = findOpenSpot(geom.width(), geom.height() ); } + else{ geom = findOpenSpot(geom.width(), geom.height(), RoundUp(this->height()/GRIDSIZE), RoundUp(this->width()/GRIDSIZE), true); } }else if(!ValidGeometry(plugID, gridToGeom(geom)) ){ //Find a new location for the plugin (saved location is invalid) geom = findOpenSpot(geom.width(), geom.height(), geom.y(), geom.x(), false); //try to get it within the same general area first |