Further simplify font label updating in settings dialog
This commit is contained in:
+1
-1
Submodule lib/settings updated: a8c167976e...7ef4704596
@@ -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, []() {
|
||||||
|
|||||||
Reference in New Issue
Block a user