mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-24 14:20:44 -04:00
fixed size of help icons in MainPage class
This commit is contained in:
parent
597f541c50
commit
3203249bd2
2 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
#include <QToolButton>
|
||||||
|
|
||||||
#include <retroshare-gui/mainpage.h>
|
#include <retroshare-gui/mainpage.h>
|
||||||
#include "common/FloatingHelpBrowser.h"
|
#include "common/FloatingHelpBrowser.h"
|
||||||
|
|
||||||
|
@ -9,12 +11,13 @@ MainPage::MainPage(QWidget *parent , Qt::WindowFlags flags ) : QWidget(parent, f
|
||||||
mHelp = "";
|
mHelp = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainPage::registerHelpButton(QAbstractButton *button,const QString& help_html_txt)
|
void MainPage::registerHelpButton(QToolButton *button,const QString& help_html_txt)
|
||||||
{
|
{
|
||||||
if (mHelpBrowser == NULL)
|
if (mHelpBrowser == NULL)
|
||||||
{
|
|
||||||
mHelpBrowser = new FloatingHelpBrowser(this, button) ;
|
mHelpBrowser = new FloatingHelpBrowser(this, button) ;
|
||||||
}
|
|
||||||
|
float S = QFontMetricsF(button->font()).height() ;
|
||||||
|
button->setIconSize(QSize(S,S)) ;
|
||||||
|
|
||||||
mHelpBrowser->setHelpText(help_html_txt) ;
|
mHelpBrowser->setHelpText(help_html_txt) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
class UserNotify;
|
class UserNotify;
|
||||||
class QAbstractButton ;
|
class QAbstractButton ;
|
||||||
class FloatingHelpBrowser;
|
class FloatingHelpBrowser;
|
||||||
|
class QToolButton;
|
||||||
|
|
||||||
class MainPage : public QWidget
|
class MainPage : public QWidget
|
||||||
{
|
{
|
||||||
|
@ -60,7 +61,7 @@ public:
|
||||||
// Overload this to add some help info to the page. The way the info is
|
// Overload this to add some help info to the page. The way the info is
|
||||||
// shown is handled by showHelp() below;
|
// 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:
|
private:
|
||||||
FloatingHelpBrowser *mHelpBrowser ;
|
FloatingHelpBrowser *mHelpBrowser ;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue