┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinitemlistview.cpp
diff options
context:
space:
mode:
authorAkseli Lahtinen <[email protected]>2025-06-20 00:15:31 +0300
committerAkseli Lahtinen <[email protected]>2025-06-20 00:15:31 +0300
commitc1e71289082ec7416ac19c822393ea70f63d1b75 (patch)
tree58e43ee607af7c6586235417d1056d7df5e8838b /src/views/dolphinitemlistview.cpp
parentb1d46a3cbd6dd70a6ec7e31d2d11056a5f5c6d91 (diff)
New selection effects
This adds a new selection effect that is similar to what we have in QtQuick file item views. There are also changes to some usability: Instead of only the icon and text being the clickable area in icon and details mode, the whole selection is now the clickable area. Otherwise the usability should stay the same, it's mostly a visual change. See also: https://invent.kde.org/teams/vdg/issues/-/issues/94
Diffstat (limited to 'src/views/dolphinitemlistview.cpp')
-rw-r--r--src/views/dolphinitemlistview.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/views/dolphinitemlistview.cpp b/src/views/dolphinitemlistview.cpp
index d31dc11ba..8529f23a7 100644
--- a/src/views/dolphinitemlistview.cpp
+++ b/src/views/dolphinitemlistview.cpp
@@ -194,8 +194,9 @@ void DolphinItemListView::updateGridSize()
itemHeight = padding * 3 + iconSize + option.fontMetrics.lineSpacing();
- horizontalMargin = 4;
- verticalMargin = 8;
+ const auto margin = style()->pixelMetric(QStyle::PM_SizeGripSize);
+ horizontalMargin = margin;
+ verticalMargin = margin;
maxTextLines = IconsModeSettings::maximumTextLines();
break;
}