mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-14 08:59:50 -05:00
Fixed compiler warning in StyledLabel
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8382 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b88f4058a8
commit
72085de44b
@ -34,10 +34,17 @@ StyledLabel::StyledLabel(const QString &text, QWidget *parent)
|
||||
{
|
||||
}
|
||||
|
||||
int StyledLabel::fontSizeFactor()
|
||||
{
|
||||
return mFontSizeFactor;
|
||||
}
|
||||
|
||||
void StyledLabel::setFontSizeFactor(int factor)
|
||||
{
|
||||
mFontSizeFactor = factor;
|
||||
|
||||
QFont f = font();
|
||||
qreal fontSize = factor * f.pointSizeF() / 100;
|
||||
qreal fontSize = mFontSizeFactor * f.pointSizeF() / 100;
|
||||
f.setPointSizeF(fontSize);
|
||||
setFont(f);
|
||||
}
|
||||
|
@ -27,13 +27,17 @@
|
||||
class StyledLabel : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int fontSizeFactor WRITE setFontSizeFactor)
|
||||
Q_PROPERTY(int fontSizeFactor READ fontSizeFactor WRITE setFontSizeFactor)
|
||||
|
||||
public:
|
||||
StyledLabel(QWidget *parent = NULL);
|
||||
StyledLabel(const QString &text, QWidget *parent = NULL);
|
||||
|
||||
int fontSizeFactor();
|
||||
void setFontSizeFactor(int factor);
|
||||
|
||||
private:
|
||||
int mFontSizeFactor;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user