mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-30 10:55:37 -04:00
Try another approach.
This commit is contained in:
parent
2c5d33839b
commit
adbf0c7276
1 changed files with 6 additions and 4 deletions
|
@ -142,15 +142,11 @@ PartitionBarsView::drawSection( QPainter* painter, const QRect& rect_, int x, in
|
|||
if ( canBeSelected( index ) )
|
||||
painter->setBrush( color.lighter( 115 ) );
|
||||
else
|
||||
{
|
||||
painter->setBrush( color );
|
||||
QGuiApplication::setOverrideCursor( Qt::ForbiddenCursor );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
painter->setBrush( color );
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
QColor borderColor = color.darker();
|
||||
|
@ -475,9 +471,14 @@ PartitionBarsView::mouseMoveEvent( QMouseEvent* event )
|
|||
if ( candidateIndex.isValid() )
|
||||
{
|
||||
m_hoveredIndex = candidateIndex;
|
||||
if ( !canBeSelected( candidateIndex ) )
|
||||
QGuiApplication::setOverrideCursor( Qt::ForbiddenCursor );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_hoveredIndex = QModelIndex();
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
if ( oldHoveredIndex != m_hoveredIndex )
|
||||
{
|
||||
|
@ -492,6 +493,7 @@ PartitionBarsView::leaveEvent( QEvent* event )
|
|||
if ( m_hoveredIndex.isValid() )
|
||||
{
|
||||
m_hoveredIndex = QModelIndex();
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
viewport()->repaint();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue