aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins/userbutton/LUserButton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop/panel-plugins/userbutton/LUserButton.cpp')
-rw-r--r--lumina-desktop/panel-plugins/userbutton/LUserButton.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/lumina-desktop/panel-plugins/userbutton/LUserButton.cpp b/lumina-desktop/panel-plugins/userbutton/LUserButton.cpp
index 74509920..1100f37a 100644
--- a/lumina-desktop/panel-plugins/userbutton/LUserButton.cpp
+++ b/lumina-desktop/panel-plugins/userbutton/LUserButton.cpp
@@ -11,8 +11,7 @@ LUserButtonPlugin::LUserButtonPlugin(QWidget *parent, QString id, bool horizonta
button = new QToolButton(this);
button->setAutoRaise(true);
button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
- button->setToolTip(QString("Quickly launch applications or open files"));
- button->setText( SYSTEM::user() );
+
connect(button, SIGNAL(clicked()), this, SLOT(openMenu()));
this->layout()->setContentsMargins(0,0,0,0);
this->layout()->addWidget(button);
@@ -31,6 +30,16 @@ LUserButtonPlugin::~LUserButtonPlugin(){
}
+void LUserButtonPlugin::updateButtonVisuals(){
+ button->setToolTip(QString("Quickly launch applications or open files"));
+ button->setText( SYSTEM::user() );
+ if( QFile::exists(QDir::homePath()+"/.loginIcon.png") ){
+ button->setIcon( QIcon(QDir::homePath()+"/.loginIcon.png") );
+ }else{
+ button->setIcon( LXDG::findIcon("user-identity", ":/images/default-user.png") ); //force icon refresh
+ }
+}
+
// ========================
// PRIVATE FUNCTIONS
// ========================
bgstack15