Make settings combobox width dependent on content

fixes #1164
This commit is contained in:
Nicolas Werner 2023-06-08 23:24:32 +02:00
parent 05f1f8f556
commit 8259891a42
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 3 additions and 3 deletions

View file

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

View file

@ -99,6 +99,7 @@ Rectangle {
model: r.model.values model: r.model.values
currentIndex: r.model.value currentIndex: r.model.value
onCurrentIndexChanged: r.model.value = currentIndex onCurrentIndexChanged: r.model.value = currentIndex
implicitContentWidthPolicy: ComboBox.WidestTextWhenCompleted
WheelHandler{} // suppress scrolling changing values WheelHandler{} // suppress scrolling changing values
} }