-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qt_dotgraph: Allow custom edge style #51
qt_dotgraph: Allow custom edge style #51
Conversation
@@ -180,6 +180,7 @@ def addEdgeItem(self, edge, nodes, edges, highlight_level, same_label_siblings=F | |||
if 'style' in edge.attr: | |||
if edge.attr['style'] == 'invis': | |||
return | |||
style = edge.attr.get('style', 'solid') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since yoo choose the default also in the EdgeItem
this line should not define a default but None
instead.
Did all suggested changes. Thanks for reviewing! |
self._text_brush = QBrush(self._default_color) | ||
self._shape_brush = QBrush(self._default_color) | ||
if style in ['dashed', 'dotted']: | ||
self._shape_brush = QBrush(Qt.transparent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the shape need to be transparent in these cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, the triangular shape at the end of the arrow has a dashed border but a black fill. What looks strange.
Thanks! |
qt_dotgraph: Allow custom edge style
Allow 'dashed' and 'dotted' edge styles.