Some fixes in layout.
This commit is contained in:
@@ -90,7 +90,7 @@ RowLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TextEdit {
|
TextEdit {
|
||||||
Layout.maximumWidth: parent.width
|
Layout.fillWidth: true
|
||||||
|
|
||||||
text: "<style>pre {white-space: pre-wrap} a{color: " + color + ";} .user-pill{}</style>" + (replyVisible ? reply.display : "")
|
text: "<style>pre {white-space: pre-wrap} a{color: " + color + ";} .user-pill{}</style>" + (replyVisible ? reply.display : "")
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ RowLayout {
|
|||||||
|
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
readOnly: true
|
readOnly: true
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ TextEdit {
|
|||||||
|
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
readOnly: true
|
readOnly: true
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
12
qml/main.qml
12
qml/main.qml
@@ -48,18 +48,18 @@ Kirigami.ApplicationWindow {
|
|||||||
onErrorOccured: showPassiveNotification(error + ": " + detail)
|
onErrorOccured: showPassiveNotification(error + ": " + detail)
|
||||||
}
|
}
|
||||||
|
|
||||||
Binding {
|
|
||||||
target: imageProvider
|
|
||||||
property: "connection"
|
|
||||||
value: spectralController.connection
|
|
||||||
}
|
|
||||||
|
|
||||||
RoomListModel {
|
RoomListModel {
|
||||||
id: spectralRoomListModel
|
id: spectralRoomListModel
|
||||||
|
|
||||||
connection: spectralController.connection
|
connection: spectralController.connection
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binding {
|
||||||
|
target: imageProvider
|
||||||
|
property: "connection"
|
||||||
|
value: spectralController.connection
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: roomPanelComponent
|
id: roomPanelComponent
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,6 @@ ThumbnailResponse::ThumbnailResponse(Quotient::Connection* c,
|
|||||||
QString::number(requestedSize.width()),
|
QString::number(requestedSize.width()),
|
||||||
QString::number(requestedSize.height()))),
|
QString::number(requestedSize.height()))),
|
||||||
errorStr("Image request hasn't started") {
|
errorStr("Image request hasn't started") {
|
||||||
if (!c) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (requestedSize.isEmpty()) {
|
if (requestedSize.isEmpty()) {
|
||||||
errorStr.clear();
|
errorStr.clear();
|
||||||
emit finished();
|
emit finished();
|
||||||
@@ -44,6 +41,11 @@ ThumbnailResponse::ThumbnailResponse(Quotient::Connection* c,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!c) {
|
||||||
|
qWarning() << "Current connection is null";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Execute a request on the main thread asynchronously
|
// Execute a request on the main thread asynchronously
|
||||||
moveToThread(c->thread());
|
moveToThread(c->thread());
|
||||||
QMetaObject::invokeMethod(this, &ThumbnailResponse::startRequest,
|
QMetaObject::invokeMethod(this, &ThumbnailResponse::startRequest,
|
||||||
@@ -114,5 +116,5 @@ void ThumbnailResponse::cancel() {
|
|||||||
QQuickImageResponse* MatrixImageProvider::requestImageResponse(
|
QQuickImageResponse* MatrixImageProvider::requestImageResponse(
|
||||||
const QString& id,
|
const QString& id,
|
||||||
const QSize& requestedSize) {
|
const QSize& requestedSize) {
|
||||||
return new ThumbnailResponse(m_connection.load(), id, requestedSize);
|
return new ThumbnailResponse(m_connection.loadRelaxed(), id, requestedSize);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user