mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-02 20:05:37 -04:00
Set an override cursor for the whole application.
This commit is contained in:
parent
25a61d07a5
commit
eac6b4f983
1 changed files with 3 additions and 2 deletions
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
// Qt
|
// Qt
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QGuiApplication>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
|
@ -134,7 +135,7 @@ PartitionBarsView::drawSection( QPainter* painter, const QRect& rect_, int x, in
|
||||||
rect.adjust( 0, 0, -1, -1 );
|
rect.adjust( 0, 0, -1, -1 );
|
||||||
|
|
||||||
|
|
||||||
setCursor( Qt::ArrowCursor);
|
QGuiApplication::restoreOverrideCursor();
|
||||||
if ( selectionMode() != QAbstractItemView::NoSelection && // no hover without selection
|
if ( selectionMode() != QAbstractItemView::NoSelection && // no hover without selection
|
||||||
m_hoveredIndex.isValid() &&
|
m_hoveredIndex.isValid() &&
|
||||||
index == m_hoveredIndex )
|
index == m_hoveredIndex )
|
||||||
|
@ -144,7 +145,7 @@ PartitionBarsView::drawSection( QPainter* painter, const QRect& rect_, int x, in
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
painter->setBrush( color );
|
painter->setBrush( color );
|
||||||
setCursor( Qt::ForbiddenCursor );
|
QGuiApplication::setOverrideCursor( Qt::ForbiddenCursor );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue