File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -60,17 +60,16 @@ PinWidget::PinWidget(const QPixmap& pixmap,
6060 new QShortcut (Qt::Key_Escape, this , SLOT (close ()));
6161
6262 qreal devicePixelRatio = 1 ;
63- #if defined(Q_OS_MACOS) || defined(Q_OS_LINUX)
6463 QScreen* currentScreen = QGuiAppCurrentScreen ().currentScreen ();
6564 if (currentScreen != nullptr ) {
6665 devicePixelRatio = currentScreen->devicePixelRatio ();
6766 }
68- # endif
67+
6968 const int margin =
7069 static_cast <int >(static_cast <double >(MARGIN) * devicePixelRatio);
7170 QRect adjusted_pos = geometry + QMargins (margin, margin, margin, margin);
7271 setGeometry (adjusted_pos);
73- # if defined(Q_OS_MACOS) || defined(Q_OS_LINUX)
72+
7473 if (currentScreen != nullptr ) {
7574 QPoint topLeft = currentScreen->geometry ().topLeft ();
7675 adjusted_pos.setX ((adjusted_pos.x () - topLeft.x ()) / devicePixelRatio +
@@ -83,7 +82,7 @@ PinWidget::PinWidget(const QPixmap& pixmap,
8382 resize (0 , 0 );
8483 move (adjusted_pos.x (), adjusted_pos.y ());
8584 }
86- # endif
85+
8786 grabGesture (Qt::PinchGesture);
8887
8988 this ->setContextMenuPolicy (Qt::CustomContextMenu);
You can’t perform that action at this time.
0 commit comments