mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-01 11:25:36 -04:00
Only paint selection and hover if selectionMode is not NoSelection.
This commit is contained in:
parent
2f35aa1258
commit
fecb50779a
1 changed files with 4 additions and 2 deletions
|
@ -124,7 +124,8 @@ PartitionBarsView::drawSection( QPainter* painter, const QRect& rect_, int x, in
|
|||
rect.adjust( 0, 0, -1, -1 );
|
||||
|
||||
|
||||
if ( m_hoveredIndex.isValid() &&
|
||||
if ( selectionMode() != QAbstractItemView::NoSelection && // no hover without selection
|
||||
m_hoveredIndex.isValid() &&
|
||||
index == m_hoveredIndex )
|
||||
{
|
||||
painter->setBrush( color.lighter( 115 ) );
|
||||
|
@ -155,7 +156,8 @@ PartitionBarsView::drawSection( QPainter* painter, const QRect& rect_, int x, in
|
|||
painter->setBrush( gradient );
|
||||
painter->drawRoundedRect( rect, radius, radius );
|
||||
|
||||
if ( index.isValid() &&
|
||||
if ( selectionMode() != QAbstractItemView::NoSelection &&
|
||||
index.isValid() &&
|
||||
selectionModel() &&
|
||||
!selectionModel()->selectedIndexes().isEmpty() &&
|
||||
selectionModel()->selectedIndexes().first() == index )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue