mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Further simplify font label updating in settings dialog
This commit is contained in:
parent
03958420be
commit
87182d078c
2 changed files with 10 additions and 15 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit a8c167976e907d8caa19f921d7a4984c6658a2a9
|
Subproject commit 7ef4704596cbcf37784ffd51e28a1203298654e9
|
|
@ -182,21 +182,16 @@ QVBoxLayout *SettingsDialog::createAppearanceTab()
|
||||||
{
|
{
|
||||||
auto &fontManager = FontManager::getInstance();
|
auto &fontManager = FontManager::getInstance();
|
||||||
|
|
||||||
fontManager.currentFontFamily.connect(
|
auto UpdateFontFamilyLabel = [fontFamilyLabel, &fontManager](auto) {
|
||||||
[fontFamilyLabel, &fontManager](auto, auto) {
|
fontFamilyLabel->setText(
|
||||||
fontFamilyLabel->setText(
|
QString::fromStdString(fontManager.currentFontFamily.getValue()) + ", " +
|
||||||
QString::fromStdString(fontManager.currentFontFamily.getValue()) + ", " +
|
QString::number(fontManager.currentFontSize) + "pt");
|
||||||
QString::number(fontManager.currentFontSize) + "pt");
|
};
|
||||||
},
|
|
||||||
this->managedConnections);
|
|
||||||
|
|
||||||
fontManager.currentFontSize.connect(
|
fontManager.currentFontFamily.connectSimple(UpdateFontFamilyLabel,
|
||||||
[fontFamilyLabel, &fontManager](auto, auto) {
|
this->managedConnections);
|
||||||
fontFamilyLabel->setText(
|
fontManager.currentFontSize.connectSimple(UpdateFontFamilyLabel,
|
||||||
QString::fromStdString(fontManager.currentFontFamily.getValue()) + ", " +
|
this->managedConnections);
|
||||||
QString::number(fontManager.currentFontSize) + "pt");
|
|
||||||
},
|
|
||||||
this->managedConnections);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fontButton->connect(fontButton, &QPushButton::clicked, []() {
|
fontButton->connect(fontButton, &QPushButton::clicked, []() {
|
||||||
|
|
Loading…
Reference in a new issue