Skip to content

Commit

Permalink
#218 Finally leverage antialiasing / smoothing everywhere...
Browse files Browse the repository at this point in the history
Signed-off-by: cneben <[email protected]>
  • Loading branch information
cneben committed Jan 14, 2024
1 parent f08d60d commit e672a9a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
9 changes: 0 additions & 9 deletions src/EdgeTemplate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import QuickQanava 2.0 as Qan

Item {
id: edgeTemplate
antialiasing: true
property var edgeItem: undefined

property color color: edgeItem &&
Expand All @@ -52,8 +51,6 @@ Item {

Shape {
id: dstShape
antialiasing: true
smooth: true
visible: dstShapeType !== Qan.EdgeStyle.None
transformOrigin: Item.TopLeft
rotation: edgeItem.dstAngle
Expand Down Expand Up @@ -93,8 +90,6 @@ Item {

Shape {
id: srcShape
antialiasing: true
smooth: true
visible: srcShapeType !== Qan.EdgeStyle.None

preferredRendererType: Shape.CurveRenderer
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/NavigablePreview.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions src/RectGradientBackground.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion src/RectSolidBackground.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions src/VisualConnector.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e672a9a

Please sign in to comment.