X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Ffontselector.cpp;h=8c1c9913d6a138753ea5d02262e2c75636cccfdd;hb=c0d6dc0dec628f2e143e37ecc95cec45e636f8a5;hp=bfa8b04b928cdfa434c04c649b87fa38bbc0a9da;hpb=fcacaaf16551524c7ebb6114254d005274cc3d63;p=quassel.git diff --git a/src/uisupport/fontselector.cpp b/src/uisupport/fontselector.cpp index bfa8b04b..8c1c9913 100644 --- a/src/uisupport/fontselector.cpp +++ b/src/uisupport/fontselector.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,18 +18,19 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include "fontselector.h" + #include #include #include #include #include -#include "fontselector.h" - -FontSelector::FontSelector(QWidget *parent) : QWidget(parent) +FontSelector::FontSelector(QWidget* parent) + : QWidget(parent) { - auto *layout = new QHBoxLayout(this); - QPushButton *chooseButton = new QPushButton(tr("Choose..."), this); + auto* layout = new QHBoxLayout(this); + QPushButton* chooseButton = new QPushButton(tr("Choose..."), this); connect(chooseButton, &QAbstractButton::clicked, this, &FontSelector::chooseFont); layout->addWidget(_demo = new QLabel("Font")); @@ -42,8 +43,7 @@ FontSelector::FontSelector(QWidget *parent) : QWidget(parent) _font = font(); } - -void FontSelector::setSelectedFont(const QFont &font) +void FontSelector::setSelectedFont(const QFont& font) { _font = font; _demo->setText(QString("%1 %2pt").arg(font.family()).arg(font.pointSize())); @@ -51,7 +51,6 @@ void FontSelector::setSelectedFont(const QFont &font) emit fontChanged(font); } - void FontSelector::chooseFont() { bool ok; @@ -61,8 +60,7 @@ void FontSelector::chooseFont() } } - -void FontSelector::changeEvent(QEvent *e) +void FontSelector::changeEvent(QEvent* e) { if (e->type() == QEvent::StyleChange) { _demo->setFont(_font);