[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Btelepathy-contact-list=5D_/=3A_Make_the_=22Load_fro?=
From: Martin Klapetek <martin.klapetek () gmail ! com>
Date: 2011-04-10 11:59:44
Message-ID: 20110410115944.DD868A609B () git ! kde ! org
[Download RAW message or body]
Git commit 60d575c986c24ef8b2b2307edf86bc8fc4c0f0b2 by Martin Klapetek.
Committed on 10/04/2011 at 13:56.
Pushed by mklapetek into branch 'master'.
Make the "Load from file..." menu item look the same as the other entries.
Reviewed by: David Edmundson
REVIEW: 101077
BUG: 270423
M +17 -1 main-widget.cpp
http://commits.kde.org/telepathy-contact-list/60d575c986c24ef8b2b2307edf86bc8fc4c0f0b2
diff --git a/main-widget.cpp b/main-widget.cpp
index a24ccf0..7fe200c 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -80,7 +80,23 @@ MainWidget::MainWidget(QWidget *parent)
m_userAccountIconButton->setPopupMode(QToolButton::InstantPopup);
m_avatarButtonMenu = new KMenu(m_userAccountIconButton);
- m_avatarButtonMenu->addAction(i18n("Load from file..."), this, SLOT(loadAvatarFromFile()));
+
+ QToolButton *loadFromFileButton = new QToolButton(this);
+ loadFromFileButton->setIcon(KIcon("document-open-folder"));
+ loadFromFileButton->setIconSize(QSize(48, 48));
+ loadFromFileButton->setText(i18n("Load from file..."));
+ loadFromFileButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+
+ QWidgetAction *loadFromFileAction = new QWidgetAction(this);
+ loadFromFileAction->setDefaultWidget(loadFromFileButton);
+
+ connect(loadFromFileButton, SIGNAL(clicked(bool)),
+ loadFromFileAction, SIGNAL(triggered(bool)));
+
+ connect(loadFromFileAction, SIGNAL(triggered(bool)),
+ this, SLOT(loadAvatarFromFile()));
+
+ m_avatarButtonMenu->addAction(loadFromFileAction);
m_userAccountIconButton->setMenu(m_avatarButtonMenu);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic