diff --git a/designsystems/fluent2/QskFluent2Skin.cpp b/designsystems/fluent2/QskFluent2Skin.cpp index 3ccb3bc2..3b2970f7 100644 --- a/designsystems/fluent2/QskFluent2Skin.cpp +++ b/designsystems/fluent2/QskFluent2Skin.cpp @@ -1445,12 +1445,11 @@ void Editor::setupSliderMetrics() setBoxShape( Q::Handle, 100, Qt::RelativeSize ); setBoxBorderMetrics( Q::Handle, 1_px ); - setStrutSize( Q::Ripple, { 12_px, 12_px } ); - setBoxShape( Q::Ripple, 100, Qt::RelativeSize ); + setStrutSize( Q::Halo, { 12_px, 12_px } ); + setBoxShape( Q::Halo, 100, Qt::RelativeSize ); - setStrutSize( Q::Ripple | Q::Hovered, { 14_px, 14_px } ); - - setStrutSize( Q::Ripple | Q::Pressed, { 10_px, 10_px } ); + setStrutSize( Q::Halo | Q::Hovered, { 14_px, 14_px } ); + setStrutSize( Q::Halo | Q::Pressed, { 10_px, 10_px } ); } void Editor::setupSliderColors( @@ -1470,32 +1469,32 @@ void Editor::setupSliderColors( for ( auto state : { A::NoState, Q::Pressed, Q::Disabled } ) { - QRgb grooveColor, fillColor, rippleColor; + QRgb grooveColor, fillColor, haloColor; if ( state == A::NoState ) { grooveColor = pal.fillColor.controlStrong.defaultColor; fillColor = pal.fillColor.accent.defaultColor; - rippleColor = fillColor; + haloColor = fillColor; } else if ( state == Q::Pressed ) { grooveColor = pal.fillColor.controlStrong.defaultColor; fillColor = pal.fillColor.accent.defaultColor; - rippleColor = pal.fillColor.accent.tertiary; + haloColor = pal.fillColor.accent.tertiary; } else if ( state == Q::Disabled ) { grooveColor = pal.fillColor.controlStrong.disabled; fillColor = pal.fillColor.accent.disabled; - rippleColor = grooveColor; + haloColor = grooveColor; } grooveColor = rgbSolid( grooveColor, pal.background.solid.base ); setGradient( Q::Groove | section | state, grooveColor ); setGradient( Q::Fill | section | state, fillColor ); - setGradient( Q::Ripple | section | state, rippleColor ); + setGradient( Q::Halo | section | state, haloColor ); } } diff --git a/designsystems/fusion/QskFusionSkin.cpp b/designsystems/fusion/QskFusionSkin.cpp index d637fdfd..50188ee8 100644 --- a/designsystems/fusion/QskFusionSkin.cpp +++ b/designsystems/fusion/QskFusionSkin.cpp @@ -489,7 +489,7 @@ void Editor::setupRadioBox() setStrutSize( Q::CheckIndicatorPanel, 20_dp, 20_dp ); - for ( auto subControl : { Q::CheckIndicatorPanel, Q::CheckIndicator, Q::Ripple } ) + for ( auto subControl : { Q::CheckIndicatorPanel, Q::CheckIndicator, Q::Halo } ) setBoxShape( subControl, 100, Qt::RelativeSize ); // circular setBoxBorderMetrics( Q::CheckIndicatorPanel, 1_dp ); diff --git a/designsystems/material3/QskMaterial3Skin.cpp b/designsystems/material3/QskMaterial3Skin.cpp index 52087b11..ec2686ee 100644 --- a/designsystems/material3/QskMaterial3Skin.cpp +++ b/designsystems/material3/QskMaterial3Skin.cpp @@ -232,9 +232,9 @@ void Editor::setupCheckBox() setSymbol( aspect | Q::Error, checkMark ); } - setStrutSize( Q::Ripple, 40_dp, 40_dp ); - setBoxShape( Q::Ripple, 100, Qt::RelativeSize ); - setGradient( Q::Ripple, Qt::transparent ); + setStrutSize( Q::Halo, 40_dp, 40_dp ); + setBoxShape( Q::Halo, 100, Qt::RelativeSize ); + setGradient( Q::Halo, Qt::transparent ); setColor( Q::Text, m_pal.onBackground ); // not mentioned in the specs @@ -252,25 +252,25 @@ void Editor::setupCheckBox() // 3. Hovered - setGradient( Q::Ripple | Q::Hovered | Q::Checked, m_pal.primary8 ); - setGradient( Q::Ripple | Q::Hovered, m_pal.onSurface8 ); - setGradient( Q::Ripple | Q::Error | Q::Hovered, m_pal.error8 ); - setGradient( Q::Ripple | Q::Error | Q::Hovered | Q::Checked, m_pal.error8 ); + setGradient( Q::Halo | Q::Hovered | Q::Checked, m_pal.primary8 ); + setGradient( Q::Halo | Q::Hovered, m_pal.onSurface8 ); + setGradient( Q::Halo | Q::Error | Q::Hovered, m_pal.error8 ); + setGradient( Q::Halo | Q::Error | Q::Hovered | Q::Checked, m_pal.error8 ); // 4. Focused - setGradient( Q::Ripple | Q::Focused | Q::Checked, m_pal.primary12 ); - setGradient( Q::Ripple | Q::Focused, m_pal.onSurface12 ); - setGradient( Q::Ripple | Q::Error | Q::Focused, m_pal.error12 ); - setGradient( Q::Ripple | Q::Error | Q::Focused | Q::Checked, m_pal.error12 ); + setGradient( Q::Halo | Q::Focused | Q::Checked, m_pal.primary12 ); + setGradient( Q::Halo | Q::Focused, m_pal.onSurface12 ); + setGradient( Q::Halo | Q::Error | Q::Focused, m_pal.error12 ); + setGradient( Q::Halo | Q::Error | Q::Focused | Q::Checked, m_pal.error12 ); // 5. Pressed - setGradient( Q::Ripple | Q::Pressed, m_pal.primary12 ); - setGradient( Q::Ripple | Q::Pressed | Q::Checked, m_pal.primary12 ); - setGradient( Q::Ripple | Q::Hovered | Q::Pressed, m_pal.primary12 ); - setGradient( Q::Ripple | Q::Error | Q::Pressed, m_pal.error12 ); - setGradient( Q::Ripple | Q::Error | Q::Pressed | Q::Checked, m_pal.error12 ); + setGradient( Q::Halo | Q::Pressed, m_pal.primary12 ); + setGradient( Q::Halo | Q::Pressed | Q::Checked, m_pal.primary12 ); + setGradient( Q::Halo | Q::Hovered | Q::Pressed, m_pal.primary12 ); + setGradient( Q::Halo | Q::Error | Q::Pressed, m_pal.error12 ); + setGradient( Q::Halo | Q::Error | Q::Pressed | Q::Checked, m_pal.error12 ); } void Editor::setupComboBox() @@ -480,9 +480,9 @@ void Editor::setupRadioBox() setSpacing( Q::Button, 10_dp ); setStrutSize( Q::CheckIndicatorPanel, 20_dp, 20_dp ); - setStrutSize( Q::Ripple, 40_dp, 40_dp ); + setStrutSize( Q::Halo, 40_dp, 40_dp ); - for ( auto subControl : { Q::CheckIndicatorPanel, Q::CheckIndicator, Q::Ripple } ) + for ( auto subControl : { Q::CheckIndicatorPanel, Q::CheckIndicator, Q::Halo } ) setBoxShape( subControl, 100, Qt::RelativeSize ); // circular setBoxBorderMetrics( Q::CheckIndicatorPanel, 2_dp ); @@ -494,8 +494,8 @@ void Editor::setupRadioBox() setColor( Q::Text, m_pal.onBackground ); setColor( Q::Text | Q::Disabled, m_pal.onSurface38 ); - setColor( Q::Ripple, stateLayerColor( m_pal.onSurface, m_pal.focusOpacity ) ); - setColor( Q::Ripple | Q::Selected, + setColor( Q::Halo, stateLayerColor( m_pal.onSurface, m_pal.focusOpacity ) ); + setColor( Q::Halo | Q::Selected, stateLayerColor( m_pal.primary, m_pal.focusOpacity ) ); setColor( Q::CheckIndicator, Qt::transparent); @@ -509,7 +509,7 @@ void Editor::setupRadioBox() setBoxBorderColors( Q::CheckIndicatorPanel | Q::Disabled | Q::Selected, m_pal.onSurface38 ); - setAnimation( Q::Ripple | A::Metric | A::Position, qskDuration ); + setAnimation( Q::Halo | A::Metric | A::Position, qskDuration ); } void Editor::setupFocusIndicator() @@ -1028,13 +1028,13 @@ void Editor::setupSwitchButton() setGradient( Q::Handle | Q::Disabled | Q::Checked, m_pal.surface ); // just to keep the strut size the same at all times: - setStrutSize( Q::Ripple, 40_dp, 40_dp ); - setGradient( Q::Ripple, Qt::transparent ); + setStrutSize( Q::Halo, 40_dp, 40_dp ); + setGradient( Q::Halo, Qt::transparent ); - setStrutSize( Q::Ripple | Q::Hovered, 40_dp, 40_dp ); - setBoxShape( Q::Ripple, 100, Qt::RelativeSize ); - setGradient( Q::Ripple | Q::Hovered, stateLayerColor( m_pal.onSurface, m_pal.focusOpacity ) ); - setGradient( Q::Ripple | Q::Hovered | Q::Checked, + setStrutSize( Q::Halo | Q::Hovered, 40_dp, 40_dp ); + setBoxShape( Q::Halo, 100, Qt::RelativeSize ); + setGradient( Q::Halo | Q::Hovered, stateLayerColor( m_pal.onSurface, m_pal.focusOpacity ) ); + setGradient( Q::Halo | Q::Hovered | Q::Checked, stateLayerColor( m_pal.primary, m_pal.focusOpacity ) ); setBoxBorderColors( Q::Handle, m_pal.outline ); diff --git a/src/controls/QskCheckBox.cpp b/src/controls/QskCheckBox.cpp index f4a62524..c457c9fc 100644 --- a/src/controls/QskCheckBox.cpp +++ b/src/controls/QskCheckBox.cpp @@ -9,7 +9,7 @@ QSK_SUBCONTROL( QskCheckBox, Panel ) QSK_SUBCONTROL( QskCheckBox, Box ) QSK_SUBCONTROL( QskCheckBox, Indicator ) QSK_SUBCONTROL( QskCheckBox, Text ) -QSK_SUBCONTROL( QskCheckBox, Ripple ) +QSK_SUBCONTROL( QskCheckBox, Halo ) QSK_SYSTEM_STATE( QskCheckBox, Error, QskAspect::FirstSystemState << 1 ) diff --git a/src/controls/QskCheckBox.h b/src/controls/QskCheckBox.h index f8617f58..2096ae75 100644 --- a/src/controls/QskCheckBox.h +++ b/src/controls/QskCheckBox.h @@ -17,7 +17,7 @@ class QSK_EXPORT QskCheckBox : public QskAbstractButton using Inherited = QskAbstractButton; public: - QSK_SUBCONTROLS( Panel, Box, Indicator, Text, Ripple ) + QSK_SUBCONTROLS( Panel, Box, Indicator, Text, Halo ) QSK_STATES( Error ) QskCheckBox( QQuickItem* parent = nullptr ); diff --git a/src/controls/QskCheckBoxSkinlet.cpp b/src/controls/QskCheckBoxSkinlet.cpp index 2b5531dd..47193a8e 100644 --- a/src/controls/QskCheckBoxSkinlet.cpp +++ b/src/controls/QskCheckBoxSkinlet.cpp @@ -11,7 +11,7 @@ QskCheckBoxSkinlet::QskCheckBoxSkinlet( QskSkin* skin ) : QskSkinlet( skin ) { - setNodeRoles( { BoxRole, IndicatorRole, TextRole, RippleRole } ); + setNodeRoles( { BoxRole, IndicatorRole, TextRole, HaloRole } ); } QskCheckBoxSkinlet::~QskCheckBoxSkinlet() @@ -40,8 +40,8 @@ QRectF QskCheckBoxSkinlet::subControlRect( const QskSkinnable* skinnable, if ( subControl == Q::Text ) return textRect( checkBox, contentsRect ); - if ( subControl == Q::Ripple ) - return rippleRect( checkBox, contentsRect ); + if ( subControl == Q::Halo ) + return haloRect( checkBox, contentsRect ); return contentsRect; } @@ -83,14 +83,14 @@ QRectF QskCheckBoxSkinlet::boxRect( return r; } -QRectF QskCheckBoxSkinlet::rippleRect( +QRectF QskCheckBoxSkinlet::haloRect( const QskCheckBox* checkBox, const QRectF& rect ) const { - const auto rippleSize = checkBox->strutSizeHint( QskCheckBox::Ripple ); + const auto haloSize = checkBox->strutSizeHint( QskCheckBox::Halo ); const auto boxSize = checkBox->strutSizeHint( QskCheckBox::Box ); - const auto w = ( rippleSize.width() - boxSize.width() ) / 2; - const auto h = ( rippleSize.height() - boxSize.height() ) / 2; + const auto w = ( haloSize.width() - boxSize.width() ) / 2; + const auto h = ( haloSize.height() - boxSize.height() ) / 2; auto r = boxRect( checkBox, rect ); r = r.marginsAdded( { w, h, w, h } ); @@ -119,8 +119,8 @@ QSGNode* QskCheckBoxSkinlet::updateSubNode( case TextRole: return updateTextNode( checkBox, node ); - case RippleRole: - return updateBoxNode( checkBox, node, Q::Ripple ); + case HaloRole: + return updateBoxNode( checkBox, node, Q::Halo ); } return Inherited::updateSubNode( skinnable, nodeRole, node ); diff --git a/src/controls/QskCheckBoxSkinlet.h b/src/controls/QskCheckBoxSkinlet.h index d4dac0b7..60f46be5 100644 --- a/src/controls/QskCheckBoxSkinlet.h +++ b/src/controls/QskCheckBoxSkinlet.h @@ -23,7 +23,7 @@ class QSK_EXPORT QskCheckBoxSkinlet : public QskSkinlet BoxRole, IndicatorRole, TextRole, - RippleRole, + HaloRole, RoleCount }; @@ -44,7 +44,7 @@ class QSK_EXPORT QskCheckBoxSkinlet : public QskSkinlet private: QRectF textRect( const QskCheckBox*, const QRectF& ) const; QRectF boxRect( const QskCheckBox*, const QRectF& ) const; - QRectF rippleRect( const QskCheckBox*, const QRectF& ) const; + QRectF haloRect( const QskCheckBox*, const QRectF& ) const; QSGNode* updateTextNode( const QskCheckBox*, QSGNode* ) const; }; diff --git a/src/controls/QskRadioBox.cpp b/src/controls/QskRadioBox.cpp index 63339888..e7076222 100644 --- a/src/controls/QskRadioBox.cpp +++ b/src/controls/QskRadioBox.cpp @@ -13,7 +13,7 @@ QSK_SUBCONTROL( QskRadioBox, Button ) QSK_SUBCONTROL( QskRadioBox, CheckIndicatorPanel ) QSK_SUBCONTROL( QskRadioBox, CheckIndicator ) QSK_SUBCONTROL( QskRadioBox, Text ) -QSK_SUBCONTROL( QskRadioBox, Ripple ) +QSK_SUBCONTROL( QskRadioBox, Halo ) QSK_STATE( QskRadioBox, Selected, QskAspect::FirstUserState << 1 ) QSK_STATE( QskRadioBox, Pressed, QskAspect::FirstUserState << 2 ) @@ -38,7 +38,7 @@ QskRadioBox::QskRadioBox( QQuickItem* parent ) setFocusPolicy( Qt::StrongFocus ); setAcceptedMouseButtons( Qt::LeftButton ); - setPositionHint( Ripple, -1 ); + setPositionHint( Halo, -1 ); setAcceptHoverEvents( true ); } @@ -182,7 +182,7 @@ void QskRadioBox::keyPressEvent( QKeyEvent* event ) { setFocusedIndex( nextTabIndex ); - const auto aspect = Ripple | QskAspect::Metric | QskAspect::Position; + const auto aspect = Halo | QskAspect::Metric | QskAspect::Position; const auto hint = animationHint( aspect | skinStates() ); if( hint.isValid() ) @@ -277,7 +277,7 @@ void QskRadioBox::setHoveredIndex( int index ) return; m_data->hoveredIndex = index; - setPositionHint( Ripple | Hovered, index ); + setPositionHint( Halo | Hovered, index ); update(); } @@ -288,7 +288,7 @@ void QskRadioBox::setFocusedIndex( int index ) return; m_data->focusedIndex = index; - setPositionHint( Ripple, index ); + setPositionHint( Halo, index ); update(); diff --git a/src/controls/QskRadioBox.h b/src/controls/QskRadioBox.h index 70cbcd9c..de65c457 100644 --- a/src/controls/QskRadioBox.h +++ b/src/controls/QskRadioBox.h @@ -22,7 +22,7 @@ class QSK_EXPORT QskRadioBox : public QskControl using Inherited = QskControl; public: - QSK_SUBCONTROLS( Panel, Button, CheckIndicatorPanel, CheckIndicator, Text, Ripple ) + QSK_SUBCONTROLS( Panel, Button, CheckIndicatorPanel, CheckIndicator, Text, Halo ) QSK_STATES( Selected, Pressed ) QskRadioBox( QQuickItem* parent = nullptr ); diff --git a/src/controls/QskRadioBoxSkinlet.cpp b/src/controls/QskRadioBoxSkinlet.cpp index 2bc73a19..98201ea5 100644 --- a/src/controls/QskRadioBoxSkinlet.cpp +++ b/src/controls/QskRadioBoxSkinlet.cpp @@ -40,7 +40,7 @@ namespace QskRadioBoxSkinlet::QskRadioBoxSkinlet( QskSkin* ) { setNodeRoles( { PanelRole, ButtonRole, CheckPanelRole, - CheckIndicatorRole, TextRole, RippleRole } ); + CheckIndicatorRole, TextRole, HaloRole } ); } QskRadioBoxSkinlet::~QskRadioBoxSkinlet() @@ -54,8 +54,8 @@ QRectF QskRadioBoxSkinlet::subControlRect( const QskSkinnable* skinnable, auto radioBox = static_cast< const QskRadioBox* >( skinnable ); - if( subcontrol == Q::Ripple ) - return rippleRect( radioBox, contentsRect ); + if( subcontrol == Q::Halo ) + return haloRect( radioBox, contentsRect ); return contentsRect; } @@ -82,8 +82,8 @@ QSGNode* QskRadioBoxSkinlet::updateSubNode( const QskSkinnable* skinnable, case TextRole: return updateSeriesNode( skinnable, Q::Text, node ); - case RippleRole: - return updateBoxNode( skinnable, node, Q::Ripple ); + case HaloRole: + return updateBoxNode( skinnable, node, Q::Halo ); } return Inherited::updateSubNode( skinnable, nodeRole, node ); @@ -96,17 +96,17 @@ int QskRadioBoxSkinlet::sampleCount( return radioBox->options().count(); } -QRectF QskRadioBoxSkinlet::rippleRect( +QRectF QskRadioBoxSkinlet::haloRect( const QskRadioBox* radioBox, const QRectF& rect ) const { using Q = QskRadioBox; - const auto index = qFloor( radioBox->positionHint( Q::Ripple ) ); + const auto index = qFloor( radioBox->positionHint( Q::Halo ) ); if( index < 0 ) return QRectF(); QRectF r; - r.setSize( radioBox->strutSizeHint( Q::Ripple ) ); + r.setSize( radioBox->strutSizeHint( Q::Halo ) ); if ( !r.isEmpty() ) { @@ -219,12 +219,12 @@ QskAspect::States QskRadioBoxSkinlet::sampleStates( states |= Q::Pressed; #if 1 - if( radioBox->positionHint( Q::Ripple | Q::Hovered ) == index ) + if( radioBox->positionHint( Q::Halo | Q::Hovered ) == index ) states |= Q::Hovered; else states &= ~Q::Hovered; - if( radioBox->positionHint( Q::Ripple ) == index ) + if( radioBox->positionHint( Q::Halo ) == index ) states |= Q::Focused; else states &= ~Q::Focused; diff --git a/src/controls/QskRadioBoxSkinlet.h b/src/controls/QskRadioBoxSkinlet.h index 3a777c3c..73db392b 100644 --- a/src/controls/QskRadioBoxSkinlet.h +++ b/src/controls/QskRadioBoxSkinlet.h @@ -24,7 +24,7 @@ class QSK_EXPORT QskRadioBoxSkinlet : public QskSkinlet CheckPanelRole, CheckIndicatorRole, TextRole, - RippleRole, + HaloRole, RoleCount }; @@ -58,7 +58,7 @@ class QSK_EXPORT QskRadioBoxSkinlet : public QskSkinlet QRectF checkPanelRect( const QskRadioBox*, const QRectF&, int index ) const; QRectF buttonRect( const QskRadioBox*, const QRectF&, int index ) const; - QRectF rippleRect( const QskRadioBox*, const QRectF& ) const; + QRectF haloRect( const QskRadioBox*, const QRectF& ) const; }; #endif diff --git a/src/controls/QskSlider.cpp b/src/controls/QskSlider.cpp index cf9f2846..9607260a 100644 --- a/src/controls/QskSlider.cpp +++ b/src/controls/QskSlider.cpp @@ -14,7 +14,7 @@ QSK_SUBCONTROL( QskSlider, Groove ) QSK_SUBCONTROL( QskSlider, Fill ) QSK_SUBCONTROL( QskSlider, Scale ) QSK_SUBCONTROL( QskSlider, Handle ) -QSK_SUBCONTROL( QskSlider, Ripple ) +QSK_SUBCONTROL( QskSlider, Halo ) QSK_SUBCONTROL( QskSlider, GrooveStopIndicators ) QSK_SUBCONTROL( QskSlider, FillStopIndicators ) QSK_SUBCONTROL( QskSlider, LabelContainer ) diff --git a/src/controls/QskSlider.h b/src/controls/QskSlider.h index 1bc675a4..54f5a953 100644 --- a/src/controls/QskSlider.h +++ b/src/controls/QskSlider.h @@ -25,7 +25,7 @@ class QSK_EXPORT QskSlider : public QskBoundedValueInput using Inherited = QskBoundedValueInput; public: - QSK_SUBCONTROLS( Panel, Groove, Fill, Scale, Handle, Ripple, GrooveStopIndicators, FillStopIndicators, + QSK_SUBCONTROLS( Panel, Groove, Fill, Scale, Handle, Halo, GrooveStopIndicators, FillStopIndicators, LabelContainer, LabelText ) QSK_STATES( Pressed ) diff --git a/src/controls/QskSliderSkinlet.cpp b/src/controls/QskSliderSkinlet.cpp index ef7169c9..1030f441 100644 --- a/src/controls/QskSliderSkinlet.cpp +++ b/src/controls/QskSliderSkinlet.cpp @@ -54,7 +54,7 @@ QskSliderSkinlet::QskSliderSkinlet( QskSkin* skin ) FillStopIndicatorsRole, GrooveStopIndicatorsRole, HandleRole, - RippleRole, + HaloRole, LabelContainerRole, LabelTextRole, } ); @@ -94,9 +94,9 @@ QRectF QskSliderSkinlet::subControlRect( const QskSkinnable* skinnable, return scaleRect( slider, contentsRect ); } - if ( subControl == Q::Ripple ) + if ( subControl == QskSlider::Halo ) { - return rippleRect( slider, contentsRect ); + return haloRect( slider, contentsRect ); } if ( subControl == Q::LabelContainer ) @@ -213,9 +213,9 @@ QSGNode* QskSliderSkinlet::updateSubNode( return updateBoxNode( slider, node, Q::Handle ); } - case RippleRole: + case HaloRole: { - return updateBoxNode( slider, node, Q::Ripple ); + return updateBoxNode( slider, node, Q::Halo ); } case LabelContainerRole: @@ -375,14 +375,14 @@ QRectF QskSliderSkinlet::handleRect( return handleRect; } -QRectF QskSliderSkinlet::rippleRect( +QRectF QskSliderSkinlet::haloRect( const QskSlider* slider, const QRectF& rect ) const { - const auto rippleSize = slider->strutSizeHint( Q::Ripple ); + const auto haloSize = slider->strutSizeHint( Q::Halo ); const auto handleSize = slider->strutSizeHint( Q::Handle ); - const auto w = ( rippleSize.width() - handleSize.width() ) / 2; - const auto h = ( rippleSize.height() - handleSize.height() ) / 2; + const auto w = ( haloSize.width() - handleSize.width() ) / 2; + const auto h = ( haloSize.height() - handleSize.height() ) / 2; auto r = handleRect( slider, rect ); r = r.marginsAdded( { w, h, w, h } ); diff --git a/src/controls/QskSliderSkinlet.h b/src/controls/QskSliderSkinlet.h index a9c13365..72d4560d 100644 --- a/src/controls/QskSliderSkinlet.h +++ b/src/controls/QskSliderSkinlet.h @@ -25,7 +25,7 @@ class QSK_EXPORT QskSliderSkinlet : public QskSkinlet GrooveStopIndicatorsRole, FillStopIndicatorsRole, HandleRole, - RippleRole, + HaloRole, LabelContainerRole, LabelTextRole, @@ -62,7 +62,7 @@ class QSK_EXPORT QskSliderSkinlet : public QskSkinlet QRectF fillRect( const QskSlider*, const QRectF& ) const; QRectF handleRect( const QskSlider*, const QRectF& ) const; QRectF scaleRect( const QskSlider*, const QRectF& ) const; - QRectF rippleRect( const QskSlider*, const QRectF& ) const; + QRectF haloRect( const QskSlider*, const QRectF& ) const; QRectF labelContainerRect( const QskSlider*, const QRectF& ) const; QRectF innerRect( const QskSlider*, const QRectF&, QskAspect::Subcontrol ) const; diff --git a/src/controls/QskSwitchButton.cpp b/src/controls/QskSwitchButton.cpp index b0dd5800..1703a5e2 100644 --- a/src/controls/QskSwitchButton.cpp +++ b/src/controls/QskSwitchButton.cpp @@ -7,7 +7,7 @@ QSK_SUBCONTROL( QskSwitchButton, Handle ) QSK_SUBCONTROL( QskSwitchButton, Groove ) -QSK_SUBCONTROL( QskSwitchButton, Ripple ) +QSK_SUBCONTROL( QskSwitchButton, Halo ) struct QskSwitchButton::PrivateData { diff --git a/src/controls/QskSwitchButton.h b/src/controls/QskSwitchButton.h index cc32faed..955e8f25 100644 --- a/src/controls/QskSwitchButton.h +++ b/src/controls/QskSwitchButton.h @@ -22,7 +22,7 @@ class QSK_EXPORT QskSwitchButton : public QskAbstractButton WRITE setInverted NOTIFY invertedChanged FINAL ) public: - QSK_SUBCONTROLS( Groove, Handle, Ripple ) + QSK_SUBCONTROLS( Groove, Handle, Halo ) QskSwitchButton( Qt::Orientation, QQuickItem* parent = nullptr ); QskSwitchButton( QQuickItem* parent = nullptr ); diff --git a/src/controls/QskSwitchButtonSkinlet.cpp b/src/controls/QskSwitchButtonSkinlet.cpp index e755c8c6..906e589d 100644 --- a/src/controls/QskSwitchButtonSkinlet.cpp +++ b/src/controls/QskSwitchButtonSkinlet.cpp @@ -26,7 +26,7 @@ static inline qreal qskEffectivePosition( const QskSwitchButton* switchButton ) QskSwitchButtonSkinlet::QskSwitchButtonSkinlet( QskSkin* skin ) : Inherited( skin ) { - setNodeRoles( { GrooveRole, HandleRole, RippleRole } ); + setNodeRoles( { GrooveRole, HandleRole, HaloRole } ); } QskSwitchButtonSkinlet::~QskSwitchButtonSkinlet() @@ -48,9 +48,9 @@ QRectF QskSwitchButtonSkinlet::subControlRect( const QskSkinnable* skinnable, return grooveRect( skinnable, contentsRect ); } - if ( subControl == Q::Ripple ) + if ( subControl == Q::Halo ) { - return rippleRect( skinnable, contentsRect ); + return haloRect( skinnable, contentsRect ); } @@ -63,12 +63,12 @@ QSizeF QskSwitchButtonSkinlet::sizeHint( const QskSkinnable* skinnable, if ( which != Qt::PreferredSize ) return QSizeF(); - auto grooveHint = skinnable->strutSizeHint( QskSwitchButton::Groove ); - auto handleHint = skinnable->strutSizeHint( QskSwitchButton::Handle ); - auto rippleHint = skinnable->strutSizeHint( QskSwitchButton::Ripple ); + const auto grooveHint = skinnable->strutSizeHint( QskSwitchButton::Groove ); + const auto handleHint = skinnable->strutSizeHint( QskSwitchButton::Handle ); + const auto haloHint = skinnable->strutSizeHint( QskSwitchButton::Halo ); auto hint = grooveHint; - hint = hint.expandedTo( rippleHint ); + hint = hint.expandedTo( haloHint ); hint = hint.expandedTo( handleHint ); return hint; @@ -81,8 +81,8 @@ QSGNode* QskSwitchButtonSkinlet::updateSubNode( const QskSkinnable* skinnable, switch ( nodeRole ) { - case RippleRole: - return updateBoxNode( skinnable, node, Q::Ripple ); + case HaloRole: + return updateBoxNode( skinnable, node, Q::Halo ); case HandleRole: return updateBoxNode( skinnable, node, Q::Handle ); @@ -166,7 +166,7 @@ QRectF QskSwitchButtonSkinlet::handleRect( return r; } -QRectF QskSwitchButtonSkinlet::rippleRect( +QRectF QskSwitchButtonSkinlet::haloRect( const QskSkinnable* skinnable, const QRectF& contentsRect ) const { using Q = QskSwitchButton; @@ -176,7 +176,7 @@ QRectF QskSwitchButtonSkinlet::rippleRect( const auto grooveRect = subControlRect( skinnable, contentsRect, Q::Groove ); const auto pos = qskEffectivePosition( switchButton ); const auto sizeHandle = skinnable->strutSizeHint( Q::Handle ); - const auto sizeRipple = skinnable->strutSizeHint( Q::Ripple ); + const auto sizeHalo = skinnable->strutSizeHint( Q::Halo ); qreal cx, cy; @@ -198,7 +198,7 @@ QRectF QskSwitchButtonSkinlet::rippleRect( } QRectF r; - r.setSize( sizeRipple ); + r.setSize( sizeHalo ); r.moveCenter( QPointF( cx, cy ) ); return r; diff --git a/src/controls/QskSwitchButtonSkinlet.h b/src/controls/QskSwitchButtonSkinlet.h index f9926d0e..4b8fa368 100644 --- a/src/controls/QskSwitchButtonSkinlet.h +++ b/src/controls/QskSwitchButtonSkinlet.h @@ -19,7 +19,7 @@ class QSK_EXPORT QskSwitchButtonSkinlet : public QskSkinlet { GrooveRole, HandleRole, - RippleRole, + HaloRole, RoleCount }; @@ -40,7 +40,7 @@ class QSK_EXPORT QskSwitchButtonSkinlet : public QskSkinlet private: QRectF grooveRect( const QskSkinnable*, const QRectF& ) const; QRectF handleRect( const QskSkinnable*, const QRectF& ) const; - QRectF rippleRect( const QskSkinnable*, const QRectF& ) const; + QRectF haloRect( const QskSkinnable*, const QRectF& ) const; }; #endif