enable color and node alpha

This commit is contained in:
Vogel, Rick 2023-12-11 12:38:08 +01:00
parent 686771b2d1
commit 75c39a8e3e
4 changed files with 8 additions and 4 deletions

View File

@ -159,7 +159,7 @@ namespace
setBoxBorderColorsHint( Inherited::Handle, Qt::white ); setBoxBorderColorsHint( Inherited::Handle, Qt::white );
if(skinStates().testFlag(Alpha)) if(skinStates().testFlag(Alpha))
{ {
m_color.setAlpha(value); m_color.setAlpha(value * 255);
} }
else else
{ {
@ -413,6 +413,8 @@ namespace
ChartView::ChartView( ArcControl* chart, QQuickItem* parent ) ChartView::ChartView( ArcControl* chart, QQuickItem* parent )
: QskMainView( parent ) : QskMainView( parent )
{ {
setColor(Panel, Qt::white);
auto hBox = new QskLinearBox( Qt::Horizontal ); auto hBox = new QskLinearBox( Qt::Horizontal );
// auto chartBox = new ChartBox( chart, hBox ); // auto chartBox = new ChartBox( chart, hBox );
@ -469,7 +471,9 @@ ChartView::ChartView( ArcControl* chart, QQuickItem* parent )
[ = ]( QColor c ) { chart->setColor( subcontrol, c ); } ); [ = ]( QColor c ) { chart->setColor( subcontrol, c ); } );
connect( controlPanel, &ControlPanel::shadowColorChanged, chart, connect( controlPanel, &ControlPanel::shadowColorChanged, chart,
[ = ]( QColor c ) { chart->setShadowColorHint( subcontrol, c ); } ); [ = ]( QColor c ) {
chart->setShadowColorHint( subcontrol, c );
} );
connect( controlPanel, &ControlPanel::strokeColorChanged, chart, connect( controlPanel, &ControlPanel::strokeColorChanged, chart,
[ = ]( QColor c ) { [ = ]( QColor c ) {

View File

@ -48,5 +48,5 @@ void main()
float d = sdRing(p, cs, ubuf.radius / 2.0, ubuf.thickness); float d = sdRing(p, cs, ubuf.radius / 2.0, ubuf.thickness);
float a = 1.0 - smoothstep(0.0, ubuf.extend, d); float a = 1.0 - smoothstep(0.0, ubuf.extend, d);
fragColor = vec4(ubuf.color.rgb, 1.0) * a * ubuf.opacity; fragColor = ubuf.color * a * ubuf.opacity;
} }

View File

@ -43,5 +43,5 @@ void main()
float d = sdRing(p, cs, radius / 2.0, thickness); float d = sdRing(p, cs, radius / 2.0, thickness);
float a = 1.0 - smoothstep(0.0, extend, d); float a = 1.0 - smoothstep(0.0, extend, d);
gl_FragColor = vec4(color.rgb, 1.0) * a * opacity; gl_FragColor = color * a * opacity;
} }

Binary file not shown.