Halo subcontrol removed

This commit is contained in:
Uwe Rathmann 2024-10-28 16:03:49 +01:00
parent 177e929dbb
commit 83670c997c
4 changed files with 2 additions and 31 deletions

View File

@ -14,7 +14,6 @@ QSK_SUBCONTROL( QskSlider, Groove )
QSK_SUBCONTROL( QskSlider, Fill ) QSK_SUBCONTROL( QskSlider, Fill )
QSK_SUBCONTROL( QskSlider, Scale ) QSK_SUBCONTROL( QskSlider, Scale )
QSK_SUBCONTROL( QskSlider, Handle ) QSK_SUBCONTROL( QskSlider, Handle )
QSK_SUBCONTROL( QskSlider, Halo )
QSK_SUBCONTROL( QskSlider, GrooveStopIndicators ) QSK_SUBCONTROL( QskSlider, GrooveStopIndicators )
QSK_SUBCONTROL( QskSlider, FillStopIndicators ) QSK_SUBCONTROL( QskSlider, FillStopIndicators )
QSK_SUBCONTROL( QskSlider, LabelContainer ) QSK_SUBCONTROL( QskSlider, LabelContainer )

View File

@ -25,8 +25,8 @@ class QSK_EXPORT QskSlider : public QskBoundedValueInput
using Inherited = QskBoundedValueInput; using Inherited = QskBoundedValueInput;
public: public:
QSK_SUBCONTROLS( Panel, Groove, Fill, Scale, Handle, Halo, GrooveStopIndicators, FillStopIndicators, QSK_SUBCONTROLS( Panel, Groove, Fill, Scale, Handle,
LabelContainer, LabelText ) GrooveStopIndicators, FillStopIndicators, LabelContainer, LabelText )
QSK_STATES( Pressed ) QSK_STATES( Pressed )
explicit QskSlider( QQuickItem* parent = nullptr ); explicit QskSlider( QQuickItem* parent = nullptr );

View File

@ -54,7 +54,6 @@ QskSliderSkinlet::QskSliderSkinlet( QskSkin* skin )
FillStopIndicatorsRole, FillStopIndicatorsRole,
GrooveStopIndicatorsRole, GrooveStopIndicatorsRole,
HandleRole, HandleRole,
HaloRole,
LabelContainerRole, LabelContainerRole,
LabelTextRole, LabelTextRole,
} ); } );
@ -94,11 +93,6 @@ QRectF QskSliderSkinlet::subControlRect( const QskSkinnable* skinnable,
return scaleRect( slider, contentsRect ); return scaleRect( slider, contentsRect );
} }
if ( subControl == QskSlider::Halo )
{
return haloRect( slider, contentsRect );
}
if ( subControl == Q::LabelContainer ) if ( subControl == Q::LabelContainer )
{ {
return labelContainerRect( slider, contentsRect ); return labelContainerRect( slider, contentsRect );
@ -213,11 +207,6 @@ QSGNode* QskSliderSkinlet::updateSubNode(
return updateBoxNode( slider, node, Q::Handle ); return updateBoxNode( slider, node, Q::Handle );
} }
case HaloRole:
{
return updateBoxNode( slider, node, Q::Halo );
}
case LabelContainerRole: case LabelContainerRole:
{ {
return updateBoxNode( slider, node, Q::LabelContainer ); return updateBoxNode( slider, node, Q::LabelContainer );
@ -375,21 +364,6 @@ QRectF QskSliderSkinlet::handleRect(
return handleRect; return handleRect;
} }
QRectF QskSliderSkinlet::haloRect(
const QskSlider* slider, const QRectF& rect ) const
{
const auto haloSize = slider->strutSizeHint( Q::Halo );
const auto handleSize = slider->strutSizeHint( Q::Handle );
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 } );
return r;
}
QRectF QskSliderSkinlet::labelContainerRect( QRectF QskSliderSkinlet::labelContainerRect(
const QskSlider* slider, const QRectF& rect ) const const QskSlider* slider, const QRectF& rect ) const
{ {

View File

@ -25,7 +25,6 @@ class QSK_EXPORT QskSliderSkinlet : public QskSkinlet
GrooveStopIndicatorsRole, GrooveStopIndicatorsRole,
FillStopIndicatorsRole, FillStopIndicatorsRole,
HandleRole, HandleRole,
HaloRole,
LabelContainerRole, LabelContainerRole,
LabelTextRole, LabelTextRole,
@ -62,7 +61,6 @@ class QSK_EXPORT QskSliderSkinlet : public QskSkinlet
QRectF fillRect( const QskSlider*, const QRectF& ) const; QRectF fillRect( const QskSlider*, const QRectF& ) const;
QRectF handleRect( const QskSlider*, const QRectF& ) const; QRectF handleRect( const QskSlider*, const QRectF& ) const;
QRectF scaleRect( const QskSlider*, const QRectF& ) const; QRectF scaleRect( const QskSlider*, const QRectF& ) const;
QRectF haloRect( const QskSlider*, const QRectF& ) const;
QRectF labelContainerRect( const QskSlider*, const QRectF& ) const; QRectF labelContainerRect( const QskSlider*, const QRectF& ) const;
QRectF innerRect( const QskSlider*, const QRectF&, QskAspect::Subcontrol ) const; QRectF innerRect( const QskSlider*, const QRectF&, QskAspect::Subcontrol ) const;