Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix: set CSS font-weight of editbox always to normal
Browse files Browse the repository at this point in the history
This fixes issue #4292 by setting CSS `font-weight: normal` always.
  • Loading branch information
ezavod committed Mar 28, 2017
1 parent 2e4ac3c commit 96b2977
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/widget/form/genericchatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 96b2977

Please sign in to comment.