diff options
| -rw-r--r-- | src/panels/information/informationpanelcontent.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index 285ce3ae9..cdd98f54c 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -16,7 +16,6 @@ #include <KSeparator> #include <KSharedConfig> #include <KStringHandler> -#include <QPainterPath> #include <QIcon> #include <QStyle> @@ -27,9 +26,7 @@ #include <QDialogButtonBox> #include <QGesture> #include <QLabel> -#include <QLinearGradient> #include <QPainter> -#include <QPolygon> #include <QScrollArea> #include <QScroller> #include <QTextLayout> @@ -40,9 +37,6 @@ #include "mediawidget.h" #include "pixmapviewer.h" -const int PLAY_ARROW_SIZE = 24; -const int PLAY_ARROW_BORDER_SIZE = 2; - InformationPanelContent::InformationPanelContent(QWidget *parent) : QWidget(parent) , m_item() @@ -390,43 +384,6 @@ void InformationPanelContent::showPreview(const KFileItem &item, const QPixmap & p.setDevicePixelRatio(devicePixelRatioF()); } - if (m_isVideo) { - // adds a play arrow overlay - - auto maxDim = qMax(p.width(), p.height()); - auto arrowSize = qMax(PLAY_ARROW_SIZE, maxDim / 8); - - // compute relative pixel positions - const int zeroX = static_cast<int>((p.width() / 2 - arrowSize / 2) / p.devicePixelRatio()); - const int zeroY = static_cast<int>((p.height() / 2 - arrowSize / 2) / p.devicePixelRatio()); - - QPolygon arrow; - arrow << QPoint(zeroX, zeroY); - arrow << QPoint(zeroX, zeroY + arrowSize); - arrow << QPoint(zeroX + arrowSize, zeroY + arrowSize / 2); - - QPainterPath path; - path.addPolygon(arrow); - - QLinearGradient gradient(QPointF(zeroX, zeroY + arrowSize / 2), QPointF(zeroX + arrowSize, zeroY + arrowSize / 2)); - - QColor whiteColor = Qt::white; - QColor blackColor = Qt::black; - gradient.setColorAt(0, whiteColor); - gradient.setColorAt(1, blackColor); - - QBrush brush(gradient); - - QPainter painter(&p); - - QPen pen(blackColor, PLAY_ARROW_BORDER_SIZE, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - painter.setPen(pen); - - painter.setRenderHint(QPainter::Antialiasing); - painter.drawPolygon(arrow); - painter.fillPath(path, brush); - } - m_preview->setPixmap(p); } |
