// IconTextButton: QPushButton with fixed icon-text gap
#pragma once

#include <QPushButton>

class IconTextButton : public QPushButton {
    Q_OBJECT
    Q_PROPERTY(int gap READ gap WRITE setGap)
public:
    explicit IconTextButton(QWidget* parent = nullptr);
    explicit IconTextButton(const QString& text, QWidget* parent = nullptr);
    IconTextButton(const QIcon& icon, const QString& text, QWidget* parent = nullptr);

    int gap() const { return m_gap; }
    void setGap(int g) { m_gap = g; update(); }

protected:
    void paintEvent(QPaintEvent* e) override;
    // using default sizeHint is acceptable; styles/metrics remain intact

private:
    int m_gap = 4; // pixels between icon and text
};
