Fix request for empty image

qt66
Nicolas Werner 1 year ago
parent 05ba0c8835
commit d2c616ee67
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 4
      resources/qml/Avatar.qml
  2. 4
      resources/qml/CommunitiesList.qml
  3. 2
      resources/qml/QuickSwitcher.qml
  4. 2
      resources/qml/RoomList.qml

@ -57,7 +57,9 @@ AbstractButton {
fillMode: avatar.crop ? Image.PreserveAspectCrop : Image.PreserveAspectFit
mipmap: true
smooth: true
source: if (avatar.url.startsWith('image://')) {
source: if (avatar.url.startsWith('image://colorimage')) {
return avatar.url + "&radius=" + (Settings.avatarCircles ? 100 : 25) + ((avatar.crop) ? "" : "&scale");
} else if (avatar.url.startsWith('image://')) {
return avatar.url + "?radius=" + (Settings.avatarCircles ? 100 : 25) + ((avatar.crop) ? "" : "&scale");
} else if (avatar.url.startsWith(':/')) {
return "image://colorimage/" + avatar.url + "?" + textColor;

@ -146,8 +146,10 @@ Page {
url: {
if (model.avatarUrl.startsWith("mxc://"))
return model.avatarUrl.replace("mxc://", "image://MxcImage/");
else
else if (model.avatarUrl.length > 0)
return "image://colorimage/" + model.avatarUrl + "?" + communityItem.unimportantText;
else
return "";
}
width: avatarSize

@ -41,7 +41,7 @@ Popup {
font.pixelSize: Math.ceil(quickSwitcher.textHeight * 0.6)
width: parent.width
Keys.onPressed: (event) => {
Keys.onPressed: event => {
if (event.key == Qt.Key_Up || event.key == Qt.Key_Backtab) {
event.accepted = true;
completerPopup.up();

@ -568,8 +568,8 @@ Page {
spacing: Nheko.paddingSmall
Item {
Layout.fillWidth: true
Layout.alignment: Qt.AlignBottom
Layout.fillWidth: true
ElidedLabel {
anchors.bottom: parent.bottom

Loading…
Cancel
Save