desktop-widgets: improves background rounding corners radius when scaling up or down.

This commit is contained in:
Lemmy
2026-03-02 20:14:40 -05:00
parent ba24387d7e
commit ddfb06fe5b
@@ -259,14 +259,14 @@ Item {
color: DesktopWidgetRegistry.editMode ? Qt.rgba(Color.mPrimary.r, Color.mPrimary.g, Color.mPrimary.b, 0.1) : "transparent"
border.color: (DesktopWidgetRegistry.editMode || internal.isDragging) ? (internal.isDragging ? Color.mOutline : Color.mPrimary) : "transparent"
border.width: DesktopWidgetRegistry.editMode ? 3 : 0
radius: Math.round(Style.radiusL * root.widgetScale)
radius: Math.min(Math.round(Style.radiusL * root.widgetScale), Style.radiusL, width / 2, height / 2)
z: -1
}
Rectangle {
id: container
anchors.fill: parent
radius: root.roundedCorners ? Math.round(Style.radiusL * root.widgetScale) : 0
radius: root.roundedCorners ? Math.min(Math.round(Style.radiusL * root.widgetScale), Style.radiusL, width / 2, height / 2) : 0
color: Qt.alpha(Color.mSurface, Settings.data.ui.panelBackgroundOpacity)
border {
width: 1