Files
chatterino2/src/widgets/dialogs/font/IntItem.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

35 lines
769 B
C++

#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