Skip to content

Commit

Permalink
fix: folder icon radius too small
Browse files Browse the repository at this point in the history
  • Loading branch information
kegechen committed May 30, 2024
1 parent 88496b3 commit 8f682b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/quick/launcherfoldericonprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "iconutils.h"

#include <QPainter>
#include <QGuiApplication>

LauncherFolderIconProvider::LauncherFolderIconProvider():
QQuickImageProvider(QQuickImageProvider::Pixmap)
Expand Down Expand Up @@ -36,11 +37,13 @@ QPixmap LauncherFolderIconProvider::requestPixmap(const QString &id, QSize *size
QPainter painter;
painter.begin(&result);

qreal radius = 12.0 * qGuiApp->devicePixelRatio();

// folder background
painter.setBrush(QBrush(QColor(255, 255, 255, 255 * 0.15)));
painter.setPen(Qt::NoPen);
painter.setRenderHint(QPainter::Antialiasing);
painter.drawRoundedRect(result.rect(), 12.0, 12.0);
painter.drawRoundedRect(result.rect(), radius, radius);

// icons
// uri: image://provider/icon-name:icon-name:icon-name
Expand Down

0 comments on commit 8f682b8

Please sign in to comment.