mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 13:56:24 +02:00
Fix TextOverlay font size setting
This commit is contained in:
parent
448a0f01b6
commit
215c260c9e
2 changed files with 8 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue