Files
qemby/src/qEmbyApp/components/collapsiblesection.h
T
dela ab1accc821 perf: smooth UI animations and reduce repaint overhead
Batch of performance and animation work: shared FadeHelper/MotionPrefs
primitives, hover animators, shadow pixmap caching, smooth scrolling,
seek time bubble, and widespread component repaint reductions.
2026-07-08 11:29:38 +08:00

32 lines
701 B
C++

#ifndef COLLAPSIBLESECTION_H
#define COLLAPSIBLESECTION_H
#include <QString>
#include <QWidget>
class QPropertyAnimation;
class QPushButton;
class QVBoxLayout;
class CollapsibleSection : public QWidget {
Q_OBJECT
public:
explicit CollapsibleSection(const QString& title, QWidget* parent = nullptr);
QVBoxLayout* contentLayout() const { return m_contentLayout; }
void setExpanded(bool expanded);
bool isExpanded() const { return m_expanded; }
private:
void updateToggleText();
QPushButton* m_toggle;
QWidget* m_content;
QVBoxLayout* m_contentLayout;
QPropertyAnimation* m_heightAnim = nullptr;
bool m_expanded = false;
QString m_title;
};
#endif