Skip to content
Permalink
Browse files

Use standard crosshair cursor in layouts

  • Loading branch information
nyalldawson committed Jun 7, 2018
1 parent 048db93 commit b95375a42b9cd28d04ae714f9aa95908a64ed82e
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/gui/layout/qgslayoutviewtooladditem.cpp
  2. +1 −1 src/gui/layout/qgslayoutviewtooladdnodeitem.cpp
@@ -35,7 +35,7 @@ QgsLayoutViewToolAddItem::QgsLayoutViewToolAddItem( QgsLayoutView *view )
: QgsLayoutViewTool( view, tr( "Add item" ) )
{
setFlags( QgsLayoutViewTool::FlagSnaps );
setCursor( QgsApplication::getThemeCursor( QgsApplication::Cursor::CrossHair ) );
setCursor( Qt::CrossCursor );
}

void QgsLayoutViewToolAddItem::setItemMetadataId( int metadataId )
@@ -36,7 +36,7 @@ QgsLayoutViewToolAddNodeItem::QgsLayoutViewToolAddNodeItem( QgsLayoutView *view
: QgsLayoutViewTool( view, tr( "Add item" ) )
{
setFlags( QgsLayoutViewTool::FlagSnaps );
setCursor( QgsApplication::getThemeCursor( QgsApplication::Cursor::CrossHair ) );
setCursor( Qt::CrossCursor );
}

void QgsLayoutViewToolAddNodeItem::setItemMetadataId( int metadataId )

7 comments on commit b95375a

@elpaso

This comment has been minimized.

Copy link
Contributor

@elpaso elpaso replied Jun 8, 2018

Why? How does it look on hidpi?

@nyalldawson

This comment has been minimized.

Copy link
Collaborator Author

@nyalldawson nyalldawson replied Jun 8, 2018

@elpaso it's a follow up to #7192

@elpaso

This comment has been minimized.

Copy link
Contributor

@elpaso elpaso replied Jun 9, 2018

Wouldn't be better to create a variant of QgsApplication::Cursor::CrossHair and make part of the theme?

@nyalldawson

This comment has been minimized.

Copy link
Collaborator Author

@nyalldawson nyalldawson replied Jun 9, 2018

@elpaso I might be mistaken, but I thought using the qt standard cursors avoided all issues with hidpi and scaling?

@elpaso

This comment has been minimized.

Copy link
Contributor

@elpaso elpaso replied Jun 9, 2018

I'm not sure, it may depend on Qt versions + platform + your screen, on my screen I find the standard cross cursor a bit too thin but maybe it's just me.

For sure we loose control over it, I would prefer to use our custom cross-hair in all occasions or we are back to the previous situation that led to the introduction of our themable cursors in the first place.

So, this is what I suggest:

  • if QgsApplication::Cursor::CrossHair does not look good fix it instead of replacing it
  • always use QgsApplication::Cursor::CrossHair unless it does not look good in that particular situation: in that case, create another QgsApplication::Cursor that suit the need

This of course would also apply to #7192

@nyalldawson

This comment has been minimized.

Copy link
Collaborator Author

@nyalldawson nyalldawson replied Jun 9, 2018

I'm fine with always using a custom one, so long as we're consistent with it and never use the standard one

@elpaso

This comment has been minimized.

Copy link
Contributor

@elpaso elpaso replied Jun 9, 2018

👍 just be consistent.

Please sign in to comment.
You can’t perform that action at this time.