diff options
author | Ken Moore <moorekou@gmail.com> | 2015-07-24 12:38:28 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-07-24 12:38:28 -0400 |
commit | 42b0bd6f25785c3823fdac7651e939bb921db627 (patch) | |
tree | b54efa8fa60b6abd3c3214f8395b8878825a4ce2 /lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp | |
parent | Finish up the XDG "Actions" specification for *.desktop files, and integrate ... (diff) | |
download | lumina-42b0bd6f25785c3823fdac7651e939bb921db627.tar.gz lumina-42b0bd6f25785c3823fdac7651e939bb921db627.tar.bz2 lumina-42b0bd6f25785c3823fdac7651e939bb921db627.zip |
Fix up the active re-loading of icons in the desktop interface when the icon theme changes.
Diffstat (limited to 'lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp')
-rw-r--r-- | lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp b/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp index 76a0b4cf..f0d87611 100644 --- a/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp +++ b/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp @@ -66,6 +66,10 @@ UserItemWidget::UserItemWidget(QWidget *parent, QString itemPath, QString type, UserItemWidget::UserItemWidget(QWidget *parent, XDGDesktop item) : QFrame(parent){ createWidget(); + menuopen = false; + menureset = new QTimer(this); + menureset->setSingleShot(true); + menureset->setInterval(1000); //1 second isDirectory = false; if(LUtils::isFavorite(item.filePath)){ linkPath = item.filePath; @@ -108,8 +112,8 @@ void UserItemWidget::createWidget(){ //Add them to the layout this->setLayout(new QHBoxLayout()); this->layout()->setContentsMargins(1,1,1,1); - this->layout()->addWidget(actButton); this->layout()->addWidget(icon); + this->layout()->addWidget(actButton); this->layout()->addWidget(name); this->layout()->addWidget(button); //Set a custom object name so this can be tied into the Lumina Theme stylesheets @@ -159,6 +163,8 @@ void UserItemWidget::setupActions(XDGDesktop app){ actButton->menu()->addAction(act); } connect(actButton->menu(), SIGNAL(triggered(QAction*)), this, SLOT(actionClicked(QAction*)) ); + connect(actButton->menu(), SIGNAL(aboutToShow()), this, SLOT(actionMenuOpen()) ); + connect(actButton->menu(), SIGNAL(aboutToHide()), this, SLOT(actionMenuClosed()) ); } void UserItemWidget::buttonClicked(){ |