Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dde-clipboard/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
#ifndef CONSTANTS_H
#define CONSTANTS_H

#include <QGuiApplication>

Check warning on line 8 in dde-clipboard/constants.h

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QGuiApplication> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QSize>

Check warning on line 9 in dde-clipboard/constants.h

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QSize> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QPixmap>

Check warning on line 10 in dde-clipboard/constants.h

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QPixmap> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QPainter>

Check warning on line 11 in dde-clipboard/constants.h

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QPainter> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QPainterPath>
#include <QPalette>
#include <QBitmap>
Expand Down Expand Up @@ -106,9 +107,9 @@
}

const int radius = 10;
const qreal borderWidth = 4.0;
const qreal borderWidth = 3.0;

const qreal dpr = pix.devicePixelRatioF();
const qreal dpr = qGuiApp ? qGuiApp->devicePixelRatio() : pix.devicePixelRatioF();
const QSize logicalSize = pix.size();

QImage target(logicalSize * dpr, QImage::Format_ARGB32_Premultiplied);
Expand Down
Loading