refactor: consolidate font picking into one dialog (#6531)

Instead of three separate dropdowns in the setting dialog, we now expose a single label + button combo for modifying the font.
When the button is pressed, we open a custom font dialog allowing the user to customize the font family, font size, and font weight.

Reviewed-by: nerix <nerixdev@outlook.de>
Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
teknsl
2025-11-01 16:05:18 +01:00
committed by GitHub
parent f7bb4c79f2
commit 1537d4dd97
20 changed files with 846 additions and 49 deletions
+35
View File
@@ -0,0 +1,35 @@
#pragma once
#include "common/ChatterinoSetting.hpp"
#include "util/SignalListener.hpp"
#include <QLabel>
#include <QWidget>
namespace chatterino {
class FontSettingDialog;
/// FontSettingWidget includes a label showing the current font and its size, with a button
/// that opens a FontSettingDialog
class FontSettingWidget : public QWidget
{
public:
FontSettingWidget(QStringSetting &family, IntSetting &size,
IntSetting &weight, QWidget *parent = nullptr);
private:
void updateCurrentLabel();
void showDialog();
FontSettingDialog *dialog = nullptr;
QStringSetting &familySetting;
IntSetting &sizeSetting;
IntSetting &weightSetting;
QLabel *currentLabel;
SignalListener listener;
};
} // namespace chatterino