Better rounding

This commit is contained in:
ItsLemmy
2025-11-27 08:34:15 -05:00
parent 5e833f0683
commit e6a4db9707
+15 -1
View File
@@ -186,10 +186,13 @@ ColumnLayout {
// Avatar container with rectangular design (modern, no shader issues)
Item {
id: wrapper
Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: Style.baseWidgetSize * 1.8
Layout.preferredHeight: Style.baseWidgetSize * 1.8
property bool isRounded: false
// Background and image container
Item {
anchors.fill: parent
@@ -201,8 +204,10 @@ ColumnLayout {
// Try cached circular version first
var username = root.contributors[index].login;
var cached = GitHubService.cachedCircularAvatars[username];
if (cached)
if (cached) {
wrapper.isRounded = true;
return cached;
}
// Fall back to original avatar URL
return root.contributors[index].avatar_url || "";
@@ -230,6 +235,15 @@ ColumnLayout {
color: Color.mPrimary
}
}
Rectangle {
visible: wrapper.isRounded
anchors.fill: parent
color: Color.transparent
radius: width * 0.5
border.width: Style.borderM
border.color: Color.mPrimary
}
}
// Info column