1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix: set CSS font-weight of editbox always to normal

This fixes issue #4292 by setting CSS `font-weight: normal` always.
This commit is contained in:
ezavod 2017-03-27 18:35:55 +02:00
parent 2e4ac3c6ac
commit 96b2977a5f

View File

@ -673,14 +673,13 @@ void GenericChatForm::retranslateUi()
QString GenericChatForm::fontToCss(const QFont& font, const char* name)
{
return QString("%1{font-family: \"%2\"; font-size: %3px; font-style: \"%4\"; font-weight: %5;}")
return QString("%1{font-family: \"%2\"; font-size: %3px; font-style: \"%4\"; font-weight: normal;}")
.arg(name)
.arg(font.family())
.arg(font.pixelSize())
.arg(font.style() == QFont::StyleNormal ? "normal" : font.style() == QFont::StyleItalic
? "italic"
: "bold")
.arg(font.weight() * 10); // QFont weight is 0..100, but CSS font-weight is 0..1000
: "oblique");
}
void GenericChatForm::showNetcam()