From e672a9ab010567cbec1162b5ac17b786b9b335fd Mon Sep 17 00:00:00 2001 From: cneben Date: Sun, 14 Jan 2024 19:15:20 +0100 Subject: [PATCH] #218 Finally leverage antialiasing / smoothing everywhere... Signed-off-by: cneben --- src/EdgeTemplate.qml | 9 --------- src/NavigablePreview.qml | 2 -- src/RectGradientBackground.qml | 3 +-- src/RectSolidBackground.qml | 2 +- src/VisualConnector.qml | 4 ++-- 5 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/EdgeTemplate.qml b/src/EdgeTemplate.qml index 763b26dd..1f6c36d9 100644 --- a/src/EdgeTemplate.qml +++ b/src/EdgeTemplate.qml @@ -39,7 +39,6 @@ import QuickQanava 2.0 as Qan Item { id: edgeTemplate - antialiasing: true property var edgeItem: undefined property color color: edgeItem && @@ -52,8 +51,6 @@ Item { Shape { id: dstShape - antialiasing: true - smooth: true visible: dstShapeType !== Qan.EdgeStyle.None transformOrigin: Item.TopLeft rotation: edgeItem.dstAngle @@ -93,8 +90,6 @@ Item { Shape { id: srcShape - antialiasing: true - smooth: true visible: srcShapeType !== Qan.EdgeStyle.None preferredRendererType: Shape.CurveRenderer @@ -140,8 +135,6 @@ Item { visible: edgeItem.visible && !edgeItem.hidden && edgeItem.selected // Not very efficient, use a Loader there... - antialiasing: true - smooth: true property var curvedLine : undefined property var straightLine : undefined property var orthoLine : undefined @@ -193,8 +186,6 @@ Item { anchors.fill: parent visible: edgeItem.visible && !edgeItem.hidden preferredRendererType: Shape.CurveRenderer - antialiasing: true - smooth: true property var curvedLine : undefined property var straightLine : undefined property var orthoLine : undefined diff --git a/src/NavigablePreview.qml b/src/NavigablePreview.qml index e12b21e2..ca0b75a4 100644 --- a/src/NavigablePreview.qml +++ b/src/NavigablePreview.qml @@ -189,8 +189,6 @@ Qan.AbstractNavigablePreview { id: viewWindow z: 1 color: Qt.rgba(0, 0, 0, 0) - smooth: true - antialiasing: true border.color: viewWindowColor border.width: 2 onXChanged: viewWindowDragged() diff --git a/src/RectGradientBackground.qml b/src/RectGradientBackground.qml index a627a87b..102e7729 100644 --- a/src/RectGradientBackground.qml +++ b/src/RectGradientBackground.qml @@ -62,7 +62,6 @@ Item { anchors.fill: parent radius: backRadius border.width: 0 // Do not draw border, just the background gradient (border is drawn in foreground) - antialiasing: true opacity: backOpacity // Note 20240105: Unfortunately we no longer have LinearGradient with Qt6, switching to a @@ -79,7 +78,7 @@ Item { color: Qt.rgba(0, 0, 0, 0) // Fully transparent border.color: borderColor border.width: borderWidth - antialiasing: true + antialiasing: true // Vertex antialiasing for borders // Note: Do not enable layer to avoid aliasing at high scale } } // Item diff --git a/src/RectSolidBackground.qml b/src/RectSolidBackground.qml index 2ccfbbbe..3f9b576c 100644 --- a/src/RectSolidBackground.qml +++ b/src/RectSolidBackground.qml @@ -50,7 +50,7 @@ Rectangle { color: style?.backColor || Qt.rgba(0., 0., 0., 0.) border.color: style ? style.borderColor : Qt.rgba(0., 0., 0., 0.) border.width: style ? style.borderWidth : 1.0 - antialiasing: true + antialiasing: true // Vertex antialiasing opacity: style ? style.backOpacity : 0.8 // Note: Do not enable layer to avoid aliasing at high scale } diff --git a/src/VisualConnector.qml b/src/VisualConnector.qml index a74a9142..ab24459b 100644 --- a/src/VisualConnector.qml +++ b/src/VisualConnector.qml @@ -88,7 +88,6 @@ Qan.Connector { visible: false selectable: false clip: false - antialiasing: true /*! \brief Internally used to reset correct connector position according to current node * or port configuration, also restore position bindings to source. @@ -177,7 +176,8 @@ Qan.Connector { state: "NORMAL" color: Qt.rgba(0, 0, 0, 0) radius: width / 2. - smooth: true; antialiasing: true + smooth: true + antialiasing: true property real borderWidth: visualConnector.connectorLineWidth border.color: visualConnector.connectorColor border.width: borderWidth