diff options
author | Ken Moore <ken@pcbsd.org> | 2014-10-30 14:29:32 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-10-30 14:29:32 -0400 |
commit | 10aa0b0ffb77023f3828486aeefcdfbf91cca7b7 (patch) | |
tree | 569ecdaaab76abfa603856b9280b0a02db70e811 /lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp | |
parent | For the system tray, only have it make changes when doing the whole check: do... (diff) | |
download | lumina-10aa0b0ffb77023f3828486aeefcdfbf91cca7b7.tar.gz lumina-10aa0b0ffb77023f3828486aeefcdfbf91cca7b7.tar.bz2 lumina-10aa0b0ffb77023f3828486aeefcdfbf91cca7b7.zip |
Large quality of life update to Lumina:
1) Fix up the applauncher desktop plugins so that the initial sizing is sane.
2) Completely remove all global static variables from the session.
3) Re-enable the login/logout chimes (works properly without static variables)
4) Streamline the desktop background rotation algorithms a bit.
5) Greatly streamline the Session start procedure (50% to 75% faster on my computer here)
6) Make sure the background wallpaper does not rotate every time the desktop settings file changes (only when the backgrounds for that desktop are changed, or the rotation timer goes off)
Diffstat (limited to 'lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp')
-rw-r--r-- | lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp b/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp index 32937ad4..9ed9e735 100644 --- a/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp +++ b/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp @@ -2,14 +2,22 @@ #include "../../LSession.h" AppLauncherPlugin::AppLauncherPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID){ - this->setLayout( new QVBoxLayout()); - this->layout()->setContentsMargins(0,0,0,0); + QVBoxLayout *lay = new QVBoxLayout(); + this->setLayout(lay); + lay->setContentsMargins(0,0,0,0); button = new QToolButton(this); button->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); button->setIconSize(QSize(64,64)); button->setAutoRaise(true); - this->layout()->addWidget(button); + button->setText("..."); //Need to set something here so that initial sizing works properly + lay->addWidget(button, 0, Qt::AlignCenter); connect(button, SIGNAL(clicked()), this, SLOT(buttonClicked()) ); + if(this->settings->allKeys().isEmpty()){ + //Brand new plugin: set initial size + this->settings->setValue("location/width",64); + this->settings->setValue("location/height",66+this->fontMetrics().height()); + this->settings->sync(); + } watcher = new QFileSystemWatcher(this); connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT( loadButton()) ); QTimer::singleShot(1,this, SLOT(loadButton()) ); @@ -33,6 +41,8 @@ void AppLauncherPlugin::loadButton(){ if(!watcher->files().isEmpty()){ watcher->removePaths(watcher->files()); } watcher->addPath(file.filePath); //make sure to update this shortcut if the file changes } + this->adjustSize(); //make sure to adjust the button on first show. + QTimer::singleShot(100, this, SLOT(update()) ); //Make sure to re-draw the image in a moment } void AppLauncherPlugin::buttonClicked(){ |