mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Apply the file preview shadow frame to most previews instead of only image file previews
The patch applies the shadow to all previews except for folders, fonts and Win32 exe/dll previews, similar to how Windows and MacOS handles it. REVIEW: 129918
This commit is contained in:
parent
1d0b6ba65f
commit
db3f374679
|
@ -505,8 +505,12 @@ void KFileItemModelRolesUpdater::slotGotPreview(const KFileItem& item, const QPi
|
|||
|
||||
const QString mimeType = item.mimetype();
|
||||
const int slashIndex = mimeType.indexOf(QLatin1Char('/'));
|
||||
const QString mimeTypeGroup = mimeType.left(slashIndex);
|
||||
if (mimeTypeGroup == QLatin1String("image")) {
|
||||
const bool isFontPreview = mimeType.right(slashIndex).contains(QLatin1String("font"));
|
||||
const bool isFolderPreview = item.isDir();
|
||||
const bool isWindowsExePreview = mimeType == QLatin1String("application/x-ms-dos-executable") ||
|
||||
mimeType == QLatin1String("application/x-msdownload");
|
||||
|
||||
if (!isFolderPreview && !isFontPreview && !isWindowsExePreview) {
|
||||
if (m_enlargeSmallPreviews) {
|
||||
KPixmapModifier::applyFrame(scaledPixmap, m_iconSize);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue