Files
chatterino2/src/widgets/helper/FontSettingWidget.hpp
teknsl 1537d4dd97 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>
2025-11-01 15:05:18 +00:00

36 lines
779 B
C++

#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