Skip to content
Snippets Groups Projects
Verified Commit fab78056 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Relayout when event delegates change implicit size

parent 85556c9e
No related branches found
No related tags found
No related merge requests found
Pipeline #5159 passed
......@@ -21,7 +21,6 @@
#include <QTranslator>
#include "ChatPage.h"
#include "Config.h"
#include "Logging.h"
#include "MainWindow.h"
#include "MatrixClient.h"
......
......@@ -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);
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment