C++ / build (pull_request) Failing after 15s
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 28s
Python / lint-format (pull_request) Successful in 45s
Python / test (pull_request) Successful in 38s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m45s
39 lines
712 B
C++
39 lines
712 B
C++
#pragma once
|
|
|
|
#include <qquickitem.h>
|
|
|
|
namespace ZShell::components {
|
|
|
|
class ButtonRow : public QQuickItem {
|
|
Q_OBJECT
|
|
QML_ELEMENT
|
|
|
|
Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing NOTIFY spacingChanged)
|
|
|
|
public:
|
|
explicit ButtonRow(QQuickItem* parent = nullptr);
|
|
|
|
[[nodiscard]] qreal spacing() const;
|
|
void setSpacing(qreal spacing);
|
|
|
|
signals:
|
|
void spacingChanged();
|
|
|
|
protected:
|
|
void itemChange(
|
|
QQuickItem::ItemChange change,
|
|
const QQuickItem::ItemChangeData& data) override;
|
|
void updatePolish() override;
|
|
|
|
private slots:
|
|
void invalidate();
|
|
|
|
void relayout();
|
|
static qreal getMorphExpansion(const QQuickItem* item);
|
|
|
|
bool m_dirty;
|
|
qreal m_spacing;
|
|
};
|
|
|
|
} // namespace ZShell::components
|