diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-10-18 21:37:24 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-10-18 21:37:24 +0200 |
commit | fab78056104eae4149d54514c273936f8f48c36f (patch) | |
tree | 380444e4190d42c16ade032e72cc228d33c04643 /src | |
parent | Translated using Weblate (French) (diff) | |
download | nheko-fab78056104eae4149d54514c273936f8f48c36f.tar.xz |
Relayout when event delegates change implicit size
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 1 | ||||
-rw-r--r-- | src/timeline/EventDelegateChooser.cpp | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 3984f4ba..25191968 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,7 +21,6 @@ #include <QTranslator> #include "ChatPage.h" -#include "Config.h" #include "Logging.h" #include "MainWindow.h" #include "MatrixClient.h" diff --git a/src/timeline/EventDelegateChooser.cpp b/src/timeline/EventDelegateChooser.cpp index 19a5357a..2b143b0f 100644 --- a/src/timeline/EventDelegateChooser.cpp +++ b/src/timeline/EventDelegateChooser.cpp @@ -303,6 +303,8 @@ EventDelegateChooser::updatePolish() auto layoutItem = [this](QQuickItem *item, int inset) { if (item) { + QObject::disconnect(item, &QQuickItem::implicitWidthChanged, this, &QQuickItem::polish); + auto attached = qobject_cast<EventDelegateChooserAttachedType *>( qmlAttachedPropertiesObject<EventDelegateChooser>(item)); Q_ASSERT(attached != nullptr); @@ -336,6 +338,8 @@ EventDelegateChooser::updatePolish() item->setWidth(width); item->ensurePolished(); + + QObject::connect(item, &QQuickItem::implicitWidthChanged, this, &QQuickItem::polish); } }; |