Fix TextOverlay font size setting

This commit is contained in:
David Rowe 2015-06-30 17:08:43 -07:00
parent 448a0f01b6
commit 215c260c9e
2 changed files with 8 additions and 1 deletions

View file

@ -170,3 +170,10 @@ QSizeF TextOverlay::textSize(const QString& text) const {
return QSizeF(extents.x, extents.y);
}
void TextOverlay::setFontSize(int fontSize) {
_fontSize = fontSize;
delete _textRenderer;
_textRenderer = TextRenderer::getInstance(SANS_FONT_FAMILY, _fontSize, DEFAULT_FONT_WEIGHT);
}

View file

@ -48,7 +48,7 @@ public:
void setText(const QString& text) { _text = text; }
void setLeftMargin(int margin) { _leftMargin = margin; }
void setTopMargin(int margin) { _topMargin = margin; }
void setFontSize(int fontSize) { _fontSize = fontSize; }
void setFontSize(int fontSize);
virtual void setProperties(const QScriptValue& properties);
virtual TextOverlay* createClone() const;