diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-06-19 20:08:10 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-06-19 20:08:10 +0200 |
commit | e0e5912b7047b5ef557139801651bf52bb94cd2c (patch) | |
tree | 0c26a651d1fefbc4c4bc2997a25c1d6bdd6950de | |
parent | Properly register image pack types (diff) | |
download | nheko-e0e5912b7047b5ef557139801651bf52bb94cd2c.tar.xz |
Fix completer size
-rw-r--r-- | resources/qml/Completer.qml | 2 | ||||
-rw-r--r-- | src/timeline/TimelineViewManager.cpp | 2 | ||||
-rw-r--r-- | src/timeline/TimelineViewManager.h | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/resources/qml/Completer.qml b/resources/qml/Completer.qml index 7b18951c..9aebfdf5 100644 --- a/resources/qml/Completer.qml +++ b/resources/qml/Completer.qml @@ -100,7 +100,7 @@ Control { // Broken, see https://bugreports.qt.io/browse/QTBUG-102811 //reuseItems: true - implicitWidth: listView.contentItem.childrenRect.width + implicitWidth: Math.max(listView.contentItem.childrenRect.width, 20) model: completer pixelAligned: true spacing: rowSpacing diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp index 2f6553e5..b8bd679b 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp @@ -436,7 +436,7 @@ TimelineViewManager::focusMessageInput() emit focusInput(); } -QObject * +QAbstractItemModel * TimelineViewManager::completerFor(const QString &completerName, const QString &roomId) { if (completerName == QLatin1String("user")) { diff --git a/src/timeline/TimelineViewManager.h b/src/timeline/TimelineViewManager.h index a4bc6c41..53179b44 100644 --- a/src/timeline/TimelineViewManager.h +++ b/src/timeline/TimelineViewManager.h @@ -134,8 +134,8 @@ public slots: void setVideoCallItem(); - QObject *completerFor(const QString &completerName, - const QString &roomId = QLatin1String(QLatin1String(""))); + QAbstractItemModel *completerFor(const QString &completerName, + const QString &roomId = QLatin1String(QLatin1String(""))); void forwardMessageToRoom(mtx::events::collections::TimelineEvents const *e, QString roomId); RoomlistModel *rooms() { return rooms_; } |