output socket now are always filled

This commit is contained in:
jonathanlurie 2025-05-15 11:51:28 +02:00
parent f84c4ff43b
commit 0e1e1505eb

View File

@ -187,7 +187,16 @@ void QgsModelDesignerSocketGraphicItem::paint( QPainter *painter, const QStyleOp
{
QColor outlineColor = getColor();
QColor fillColor = QColor( outlineColor );
fillColor.setAlpha( isDefaultParamValue() ? 30 : 255 );
if ( isInput() )
{
fillColor.setAlpha( isDefaultParamValue() ? 30 : 255 );
}
else
{
// outputs are always filled sockets
fillColor.setAlpha( 255 );
}
// Outline style
painter->setPen( QPen( outlineColor, mHoverState ? mSocketOutlineWidth * 2 : mSocketOutlineWidth ) );
@ -201,6 +210,7 @@ void QgsModelDesignerSocketGraphicItem::paint( QPainter *painter, const QStyleOp
float ellipseOffset = 0.4;
QPointF ellipsePosition = QPointF( position().x() + ellipseOffset, position().y() + ellipseOffset );
painter->drawEllipse( ellipsePosition, DISPLAY_SIZE, DISPLAY_SIZE );
/* Uncomment to display bounding box */
#if 0
painter->save();