Reorganize TimelineView to prepare porting the room list
This commit is contained in:
parent
5658be5215
commit
39a43ad4ab
10 changed files with 410 additions and 340 deletions
|
|
@ -257,7 +257,7 @@ TimelineViewManager::TimelineViewManager(CallManager *callManager, ChatPage *par
|
|||
view->engine()->addImageProvider("MxcImage", imgProvider);
|
||||
view->engine()->addImageProvider("colorimage", colorImgProvider);
|
||||
view->engine()->addImageProvider("blurhash", blurhashProvider);
|
||||
view->setSource(QUrl("qrc:///qml/TimelineView.qml"));
|
||||
view->setSource(QUrl("qrc:///qml/Root.qml"));
|
||||
|
||||
connect(parent, &ChatPage::themeChanged, this, &TimelineViewManager::updateColorPalette);
|
||||
connect(parent,
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ class Nheko : public QObject
|
|||
Q_PROPERTY(QPalette colors READ colors NOTIFY colorsChanged)
|
||||
Q_PROPERTY(QPalette inactiveColors READ inactiveColors NOTIFY colorsChanged)
|
||||
Q_PROPERTY(int avatarSize READ avatarSize CONSTANT)
|
||||
Q_PROPERTY(int paddingSmall READ paddingSmall CONSTANT)
|
||||
Q_PROPERTY(int paddingMedium READ paddingMedium CONSTANT)
|
||||
Q_PROPERTY(int paddingLarge READ paddingLarge CONSTANT)
|
||||
|
||||
public:
|
||||
Nheko();
|
||||
|
|
@ -23,6 +26,10 @@ public:
|
|||
|
||||
int avatarSize() const { return 40; }
|
||||
|
||||
int paddingSmall() const { return 4; }
|
||||
int paddingMedium() const { return 8; }
|
||||
int paddingLarge() const { return 20; }
|
||||
|
||||
Q_INVOKABLE void openLink(QString link) const;
|
||||
|
||||
signals:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue