missing initialisation for the ripple added
This commit is contained in:
parent
70aa95dee6
commit
4f24a74057
@ -37,7 +37,7 @@ QskRadioBox::QskRadioBox( QQuickItem* parent )
|
||||
setFocusPolicy( Qt::StrongFocus );
|
||||
setAcceptedMouseButtons( Qt::LeftButton );
|
||||
|
||||
setFocusedIndex( -1 );
|
||||
setPositionHint( Ripple, -1 );
|
||||
}
|
||||
|
||||
QskRadioBox::QskRadioBox( const QStringList& options, QQuickItem* parent )
|
||||
@ -129,7 +129,7 @@ void QskRadioBox::setOptions( const QStringList& options )
|
||||
setSelectedIndex( m_data->selectedIndex );
|
||||
|
||||
if( m_data->focusedIndex > options.size() )
|
||||
setFocusedIndex( 0 );
|
||||
setFocusedIndex( options.size() - 1 );
|
||||
}
|
||||
|
||||
void QskRadioBox::keyPressEvent( QKeyEvent* event )
|
||||
@ -263,6 +263,8 @@ void QskRadioBox::setFocusedIndex( int index )
|
||||
m_data->focusedIndex = index;
|
||||
setPositionHint( Ripple, index );
|
||||
|
||||
update();
|
||||
|
||||
Q_EMIT focusIndicatorRectChanged();
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ QRectF QskRadioBoxSkinlet::rippleRect(
|
||||
{
|
||||
using Q = QskRadioBox;
|
||||
|
||||
auto index = radioBox->positionHint( Q::Ripple );
|
||||
const auto index = radioBox->positionHint( Q::Ripple );
|
||||
if( index < 0 )
|
||||
return QRectF();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user