diff options
author | Ken Moore <moorekou@gmail.com> | 2015-10-16 14:49:59 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-10-16 14:49:59 -0400 |
commit | af742de80c460e981037858b69829b503bbdedbe (patch) | |
tree | 149f66ca4a26efa0946f70cb7d2cfb8e39efa43a /lumina-desktop/LDesktop.cpp | |
parent | Change some text on the "system monitor" desktop plugin: "Disk Usage" -> "Dis... (diff) | |
download | lumina-af742de80c460e981037858b69829b503bbdedbe.tar.gz lumina-af742de80c460e981037858b69829b503bbdedbe.tar.bz2 lumina-af742de80c460e981037858b69829b503bbdedbe.zip |
Convert the grid used for the desktop plugin system a little bit:
1) The "IconSize" used is the total size for a desktop item (width & height), rather than the actual size of the icon.
2) Change the saved value in the settings file to "GridSize" instead of IconSize.
3) Make the entire grid relate to this item size - ensuring grid alignment for both desktop items and desktop plugins.
4) Make sure to treat any manual "applauncher" plugins as desktop items for sizing/update purposes.
5) Save the plugin geometries in pixel coordinates instead of grid coordinates to accomodate for flexible grid sizes now.
6) Add another update rule for 0.8.6->0.8.7 (including 0.8.7-devel->0.8.7-release) which removed all the old saved desktop plugin geometries (since they are in the wrong coordinate system). This is a minor change because the update to 0.8.7 was already going to change all the plugins anyway.
Diffstat (limited to 'lumina-desktop/LDesktop.cpp')
-rw-r--r-- | lumina-desktop/LDesktop.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp index 241302a4..15b09b8a 100644 --- a/lumina-desktop/LDesktop.cpp +++ b/lumina-desktop/LDesktop.cpp @@ -224,7 +224,7 @@ void LDesktop::InitDesktop(){ connect(bgWindow, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowMenu(const QPoint&)) ); if(DEBUG){ qDebug() << "Create bgDesktop"; } bgDesktop = new LDesktopPluginSpace(bgWindow); //new QMdiArea(bgWindow); - bgDesktop->SetIconSize( settings->value(DPREFIX+"IconSize",64).toInt() ); + bgDesktop->SetIconSize( settings->value(DPREFIX+"GridSize",100).toInt() ); connect(bgDesktop, SIGNAL(PluginRemovedByUser(QString)), this, SLOT(RemoveDeskPlugin(QString)) ); connect(bgDesktop, SIGNAL(IncreaseIcons()), this, SLOT(IncreaseDesktopPluginIcons()) ); connect(bgDesktop, SIGNAL(DecreaseIcons()), this, SLOT(DecreaseDesktopPluginIcons()) ); @@ -372,21 +372,21 @@ void LDesktop::RemoveDeskPlugin(QString ID){ } void LDesktop::IncreaseDesktopPluginIcons(){ - int cur = settings->value(DPREFIX+"IconSize",64).toInt(); + int cur = settings->value(DPREFIX+"GridSize",100).toInt(); cur+=16; issyncing=true; //don't let the change cause a refresh - settings->setValue(DPREFIX+"IconSize",cur); + settings->setValue(DPREFIX+"GridSize",cur); settings->sync(); QTimer::singleShot(200, this, SLOT(UnlockSettings()) ); bgDesktop->SetIconSize(cur); } void LDesktop::DecreaseDesktopPluginIcons(){ - int cur = settings->value(DPREFIX+"IconSize",64).toInt(); + int cur = settings->value(DPREFIX+"GridSize",100).toInt(); if(cur<32){ return; } //cannot get smaller than 16x16 cur-=16; issyncing=true; //don't let the change cause a refresh - settings->setValue(DPREFIX+"IconSize",cur); + settings->setValue(DPREFIX+"GridSize",cur); settings->sync(); QTimer::singleShot(200, this, SLOT(UnlockSettings()) ); bgDesktop->SetIconSize(cur); |