mirror of https://github.com/procxx/kepka.git
fixed FlatLabel for large texts
This commit is contained in:
parent
572c4d8727
commit
8dca319545
|
@ -36,8 +36,8 @@ _text(st.width ? st.width : QFIXED_MAX), _st(st), _tst(tst), _opacity(1) {
|
||||||
void FlatLabel::setText(const QString &text) {
|
void FlatLabel::setText(const QString &text) {
|
||||||
textstyleSet(&_tst);
|
textstyleSet(&_tst);
|
||||||
_text.setText(_st.font, text, _labelOptions);
|
_text.setText(_st.font, text, _labelOptions);
|
||||||
textstyleRestore();
|
|
||||||
int32 w = _st.width ? _st.width : _text.maxWidth(), h = _text.countHeight(w);
|
int32 w = _st.width ? _st.width : _text.maxWidth(), h = _text.countHeight(w);
|
||||||
|
textstyleRestore();
|
||||||
resize(w, h);
|
resize(w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +45,8 @@ void FlatLabel::setRichText(const QString &text) {
|
||||||
textstyleSet(&_tst);
|
textstyleSet(&_tst);
|
||||||
const char *t = text.toUtf8().constData();
|
const char *t = text.toUtf8().constData();
|
||||||
_text.setRichText(_st.font, text, _labelOptions);
|
_text.setRichText(_st.font, text, _labelOptions);
|
||||||
textstyleRestore();
|
|
||||||
int32 w = _st.width ? _st.width : _text.maxWidth(), h = _text.countHeight(w);
|
int32 w = _st.width ? _st.width : _text.maxWidth(), h = _text.countHeight(w);
|
||||||
|
textstyleRestore();
|
||||||
resize(w, h);
|
resize(w, h);
|
||||||
setMouseTracking(_text.hasLinks());
|
setMouseTracking(_text.hasLinks());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue