diff --git a/retroshare-gui/src/gui/MainPage.cpp b/retroshare-gui/src/gui/MainPage.cpp index 3ccc58ed3..0eefd45e9 100644 --- a/retroshare-gui/src/gui/MainPage.cpp +++ b/retroshare-gui/src/gui/MainPage.cpp @@ -1,3 +1,5 @@ +#include + #include #include "common/FloatingHelpBrowser.h" @@ -9,12 +11,13 @@ MainPage::MainPage(QWidget *parent , Qt::WindowFlags flags ) : QWidget(parent, f mHelp = ""; } -void MainPage::registerHelpButton(QAbstractButton *button,const QString& help_html_txt) +void MainPage::registerHelpButton(QToolButton *button,const QString& help_html_txt) { if (mHelpBrowser == NULL) - { mHelpBrowser = new FloatingHelpBrowser(this, button) ; - } + + float S = QFontMetricsF(button->font()).height() ; + button->setIconSize(QSize(S,S)) ; mHelpBrowser->setHelpText(help_html_txt) ; } diff --git a/retroshare-gui/src/retroshare-gui/mainpage.h b/retroshare-gui/src/retroshare-gui/mainpage.h index 064fc2210..e87e9836f 100644 --- a/retroshare-gui/src/retroshare-gui/mainpage.h +++ b/retroshare-gui/src/retroshare-gui/mainpage.h @@ -30,6 +30,7 @@ class UserNotify; class QAbstractButton ; class FloatingHelpBrowser; +class QToolButton; class MainPage : public QWidget { @@ -60,7 +61,7 @@ public: // Overload this to add some help info to the page. The way the info is // shown is handled by showHelp() below; // - void registerHelpButton(QAbstractButton *button, const QString& help_html_text) ; + void registerHelpButton(QToolButton *button, const QString& help_html_text) ; private: FloatingHelpBrowser *mHelpBrowser ;