from master

This commit is contained in:
Uwe Rathmann 2025-05-15 11:41:27 +02:00
parent 23a7859de6
commit cc5229f7a3
7 changed files with 17 additions and 19 deletions

View File

@ -202,7 +202,6 @@ jobs:
install-deps: "true" install-deps: "true"
modules: "qtwebengine" modules: "qtwebengine"
cached: ${{ steps.cache-qt-5-15.outputs.cache-hit }} cached: ${{ steps.cache-qt-5-15.outputs.cache-hit }}
setup-python: "false"
tools: "" tools: ""
set-env: "true" set-env: "true"
tools-only: "false" tools-only: "false"
@ -216,7 +215,6 @@ jobs:
install-deps: "true" install-deps: "true"
modules: "qtwebengine qtshadertools" modules: "qtwebengine qtshadertools"
cached: ${{ steps.cache-qt-6-2.outputs.cache-hit }} cached: ${{ steps.cache-qt-6-2.outputs.cache-hit }}
setup-python: "false"
tools: "" tools: ""
set-env: "true" set-env: "true"
tools-only: "false" tools-only: "false"

View File

@ -149,7 +149,7 @@ function(qsk_add_example target)
endfunction() endfunction()
function(qsk_add_shaders target) function(qsk_add_shaders target shader_name)
cmake_parse_arguments( arg "" "" "FILES" ${ARGN} ) cmake_parse_arguments( arg "" "" "FILES" ${ARGN} )
@ -160,7 +160,7 @@ function(qsk_add_shaders target)
list(APPEND outfiles "${qsbname}.qsb") list(APPEND outfiles "${qsbname}.qsb")
endforeach() endforeach()
qt6_add_shaders( ${target} "qskshaders" BATCHABLE PRECOMPILE QUIET qt6_add_shaders( ${target} ${shader_name} BATCHABLE PRECOMPILE QUIET
PREFIX "/qskinny/shaders" ${ARGV} OUTPUTS ${outfiles} ) PREFIX "/qskinny/shaders" ${ARGV} OUTPUTS ${outfiles} )
# pass on OUTPUT_TARGETS to the caller of this function # pass on OUTPUT_TARGETS to the caller of this function

View File

@ -35,6 +35,6 @@ if (QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6)
shaders/arcshadow-vulkan.vert shaders/arcshadow-vulkan.vert
shaders/arcshadow-vulkan.frag shaders/arcshadow-vulkan.frag
) )
qsk_add_shaders( ${target} FILES ${SHADERS} OUTPUT_TARGETS shader_target) qsk_add_shaders( ${target} "qskArcShaders" FILES ${SHADERS} OUTPUT_TARGETS shader_target)
endif() endif()

View File

@ -510,7 +510,7 @@ else()
endif() endif()
if (QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6) if (QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6)
qsk_add_shaders( ${target} FILES ${SHADERS} OUTPUT_TARGETS shader_target) qsk_add_shaders( ${target} "qskshaders" FILES ${SHADERS} OUTPUT_TARGETS shader_target)
endif() endif()
target_include_directories(${target} PUBLIC target_include_directories(${target} PUBLIC

View File

@ -41,7 +41,7 @@ class QSK_EXPORT QskTextColors
void setLinkColor( QRgb ); void setLinkColor( QRgb );
void setLinkColor( Qt::GlobalColor ); void setLinkColor( Qt::GlobalColor );
QskTextColors interpolated( const QskTextColors&, qreal value ) const; QskTextColors interpolated( const QskTextColors&, qreal ratio ) const;
static QVariant interpolate( const QskTextColors&, static QVariant interpolate( const QskTextColors&,
const QskTextColors&, qreal ratio ); const QskTextColors&, qreal ratio );

View File

@ -129,7 +129,7 @@ namespace
{ {
if ( qskIsAncestorOf( this, item ) ) if ( qskIsAncestorOf( this, item ) )
{ {
const auto pos = mapFromItem( item, QPointF() ); const auto pos = mapFromItem( item, QPointF() ) + scrollPos();
ensureVisible( QRectF( pos.x(), pos.y(), item->width(), item->height() ) ); ensureVisible( QRectF( pos.x(), pos.y(), item->width(), item->height() ) );
} }
} }

View File

@ -54,16 +54,16 @@ namespace
} }
#if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) #if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 )
// make Qt 5/6 APIs matching
QSGMaterialShader* createShader( QSGMaterialShader* createShader(
QSGRendererInterface::RenderMode ) const override final QSGRendererInterface::RenderMode ) const override final
#else
QSGMaterialShader* createShader() const override final
#endif
{ {
return createShader(); return createMaterialShader();
} }
virtual QSGMaterialShader* createShader() const = 0; virtual QSGMaterialShader* createMaterialShader() const = 0;
#endif
virtual bool setGradient( const QskGradient& ) = 0; virtual bool setGradient( const QskGradient& ) = 0;
}; };
@ -217,7 +217,7 @@ namespace
return GradientMaterial::compare( other ); return GradientMaterial::compare( other );
} }
QSGMaterialShader* createShader() const override; QSGMaterialShader* createMaterialShader() const override;
/* /*
xy: position xy: position
@ -299,7 +299,7 @@ namespace
}; };
#endif #endif
QSGMaterialShader* LinearMaterial::createShader() const QSGMaterialShader* LinearMaterial::createMaterialShader() const
{ {
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) #if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
if ( !( flags() & QSGMaterial::RhiShaderWanted ) ) if ( !( flags() & QSGMaterial::RhiShaderWanted ) )
@ -371,7 +371,7 @@ namespace
} }
} }
QSGMaterialShader* createShader() const override; QSGMaterialShader* createMaterialShader() const override;
QVector2D m_center; QVector2D m_center;
QVector2D m_radius; QVector2D m_radius;
@ -465,7 +465,7 @@ namespace
}; };
#endif #endif
QSGMaterialShader* RadialMaterial::createShader() const QSGMaterialShader* RadialMaterial::createMaterialShader() const
{ {
#ifdef SHADER_GL #ifdef SHADER_GL
if ( !( flags() & QSGMaterial::RhiShaderWanted ) ) if ( !( flags() & QSGMaterial::RhiShaderWanted ) )
@ -575,7 +575,7 @@ namespace
return GradientMaterial::compare( other ); return GradientMaterial::compare( other );
} }
QSGMaterialShader* createShader() const override; QSGMaterialShader* createMaterialShader() const override;
QVector2D m_center; QVector2D m_center;
float m_aspectRatio = 1.0; float m_aspectRatio = 1.0;
@ -685,7 +685,7 @@ namespace
}; };
#endif #endif
QSGMaterialShader* ConicMaterial::createShader() const QSGMaterialShader* ConicMaterial::createMaterialShader() const
{ {
#ifdef SHADER_GL #ifdef SHADER_GL
if ( !( flags() & QSGMaterial::RhiShaderWanted ) ) if ( !( flags() & QSGMaterial::RhiShaderWanted ) )