summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-05-14 15:23:32 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-05-14 15:23:40 +0200
commit39a43ad4abc84733b6e8a5a244f1055048ce115c (patch)
tree89110bb753926ed22959f6f992ae66c97ddb45cc /src
parentMove global avatarSize property (diff)
downloadnheko-39a43ad4abc84733b6e8a5a244f1055048ce115c.tar.xz
Reorganize TimelineView to prepare porting the room list
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineViewManager.cpp2
-rw-r--r--src/ui/NhekoGlobalObject.h7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp
index b407a128..e8e57fd8 100644
--- a/src/timeline/TimelineViewManager.cpp
+++ b/src/timeline/TimelineViewManager.cpp
@@ -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,
diff --git a/src/ui/NhekoGlobalObject.h b/src/ui/NhekoGlobalObject.h
index 9875507e..d952c266 100644
--- a/src/ui/NhekoGlobalObject.h
+++ b/src/ui/NhekoGlobalObject.h
@@ -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: