mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 09:30:47 +03:00
Relayout when event delegates change implicit size
This commit is contained in:
parent
85556c9e10
commit
fab7805610
2 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue