From 9d3b0f96135d9695623197f99d28cf62b594b557 Mon Sep 17 00:00:00 2001 From: ShaopengLin Date: Sun, 28 Jul 2024 17:47:16 -0400 Subject: [PATCH] Aligned Library Download Spinner Shited drawing to match Download Button --- src/contentmanagerdelegate.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/contentmanagerdelegate.cpp b/src/contentmanagerdelegate.cpp index 3d46920..ce6aee6 100644 --- a/src/contentmanagerdelegate.cpp +++ b/src/contentmanagerdelegate.cpp @@ -94,9 +94,9 @@ void createDownloadStats(QPainter *painter, QRect box, QString downloadSpeed, QS painter->setPen(pen); auto oldFont = painter->font(); painter->setFont(QFont("Selawik", 8)); - QRect nRect(x - 10, y - 10, w, h); + QRect nRect(x - 20, y - 10, w, h); painter->drawText(nRect,Qt::AlignCenter | Qt::AlignJustify, downloadSpeed); - QRect fRect(x - 10, y + 10, w, h); + QRect fRect(x - 20, y + 10, w, h); painter->drawText(fRect,Qt::AlignCenter | Qt::AlignJustify, completedLength); painter->setFont(oldFont); } @@ -118,8 +118,8 @@ DownloadControlLayout getDownloadControlLayout(QRect box) const int buttonH = h - 40; DownloadControlLayout dcl; - dcl.pauseResumeButtonRect = QRect(x + w/2 + 20, y + 20, buttonW, buttonH); - dcl.cancelButtonRect = QRect(x + w/2 - 20, y + 20, buttonW, buttonH); + dcl.pauseResumeButtonRect = QRect(x + w/2 + 10, y + 20, buttonW, buttonH); + dcl.cancelButtonRect = QRect(x + w/2 - 40, y + 20, buttonW, buttonH); return dcl; }