notif actions rework
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#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();
|
||||
|
||||
private:
|
||||
void relayout();
|
||||
static qreal getMorphExpansion(const QQuickItem* item);
|
||||
|
||||
bool m_dirty;
|
||||
qreal m_spacing;
|
||||
};
|
||||
|
||||
} // namespace ZShell::components
|
||||
Reference in New Issue
Block a user