Skip to content

Commit b95375a

Browse files
committedJun 7, 2018
Use standard crosshair cursor in layouts
1 parent 048db93 commit b95375a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/gui/layout/qgslayoutviewtooladditem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ QgsLayoutViewToolAddItem::QgsLayoutViewToolAddItem( QgsLayoutView *view )
3535
: QgsLayoutViewTool( view, tr( "Add item" ) )
3636
{
3737
setFlags( QgsLayoutViewTool::FlagSnaps );
38-
setCursor( QgsApplication::getThemeCursor( QgsApplication::Cursor::CrossHair ) );
38+
setCursor( Qt::CrossCursor );
3939
}
4040

4141
void QgsLayoutViewToolAddItem::setItemMetadataId( int metadataId )

‎src/gui/layout/qgslayoutviewtooladdnodeitem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ QgsLayoutViewToolAddNodeItem::QgsLayoutViewToolAddNodeItem( QgsLayoutView *view
3636
: QgsLayoutViewTool( view, tr( "Add item" ) )
3737
{
3838
setFlags( QgsLayoutViewTool::FlagSnaps );
39-
setCursor( QgsApplication::getThemeCursor( QgsApplication::Cursor::CrossHair ) );
39+
setCursor( Qt::CrossCursor );
4040
}
4141

4242
void QgsLayoutViewToolAddNodeItem::setItemMetadataId( int metadataId )

7 commit comments

Comments
 (7)

elpaso commented on Jun 8, 2018

@elpaso
Contributor

Why? How does it look on hidpi?

nyalldawson commented on Jun 8, 2018

@nyalldawson
CollaboratorAuthor

@elpaso it's a follow up to #7192

elpaso commented on Jun 9, 2018

@elpaso
Contributor

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

nyalldawson commented on Jun 9, 2018

@nyalldawson
CollaboratorAuthor

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

elpaso commented on Jun 9, 2018

@elpaso
Contributor

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 commented on Jun 9, 2018

@nyalldawson
CollaboratorAuthor

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

elpaso commented on Jun 9, 2018

@elpaso
Contributor

👍 just be consistent.

Please sign in to comment.