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
+34
View File
@@ -0,0 +1,34 @@
#pragma once
#include <QListWidget>
#include <QListWidgetItem>
#include <QString>
namespace chatterino {
class IntItem : public QListWidgetItem
{
public:
static constexpr int TYPE_ID = QListWidgetItem::UserType + 101;
IntItem(int v = 0, QListWidget *parent = nullptr);
/// setText should not be used, we only store int values in this item
///
/// use setValue instead.
void setText(const QString &) = delete;
bool operator<(const QListWidgetItem &other) const override;
void setValue(int v);
int getValue() const;
private:
int value;
};
/// Iterate through all items in the given list and return the item
/// matching the given value
IntItem *findIntItemInList(QListWidget *list, int value);
} // namespace chatterino