oclero / qlementine

โš ๏ธ๐Ÿ—๏ธ [WORK IN PROGRESS] ๐ŸŠModern QStyle for desktop Qt6 applications.
https://oclero.github.io/qlementine/
MIT License
73 stars 16 forks source link

Fixed font is overwritten by default font #53

Closed pierrenicolasr closed 6 months ago

pierrenicolasr commented 6 months ago

Hello,

if you have a Widget with a fixed font (for instance a QPlainTextEdit, used to display code), the style overwrites the font with regular font:

https://github.com/oclero/qlementine/blob/0837347f44e4e4e82d9e8fa11ba49c3e2fca7b18/lib/src/style/QlementineStyle.cpp#L4784

  // Font.
  if (shouldHaveBoldFont(w)) {
    w->setFont(_impl->theme.fontBold);
  } else if (!qobject_cast<QLabel*>(w)) {
    w->setFont(_impl->theme.fontRegular);
  }

We maybe want to add shouldHaveFixedFont ?

oclero commented 6 months ago

Good idea ๐Ÿ‘

Edit: Wrong idea, sorry ๐Ÿ˜… Actually, I don't see in Qlementine when a QLabel should have a fixed font. It's up to the user to define a font on the QWidget to override the default fonts set by Qlementine.

oclero commented 6 months ago

Fixed by ccbd34c