mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fix: qt5
This commit is contained in:
parent
5809eeb2bf
commit
2e30ebc825
|
@ -516,7 +516,8 @@ int TextLayoutElement::getXFromIndex(size_t index)
|
|||
int x = 0;
|
||||
for (size_t i = 0; i < index; i++)
|
||||
{
|
||||
x += metrics.horizontalAdvance(this->getText()[i]);
|
||||
x += metrics.horizontalAdvance(
|
||||
this->getText()[static_cast<QString::size_type>(i)]);
|
||||
}
|
||||
return x + this->getRect().left();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue