Bug 508305

Summary: Dynamic view should change view when 50% of the folder's content is image/video.
Product: [Applications] dolphin Reporter: szucsilikes00
Component: view-engine: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: dolphin-bugs-null
Priority: NOR    
Version First Reported In: 25.08.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description szucsilikes00 2025-08-15 18:10:27 UTC
I think it would be better if icon view is used when 50% of the folder's content is images or videos.

The best way to do it if we divide the total items with "float(2)". 2.0 would result in double and here we don't care that much about accuracy so using float should be better than double. Dividing with a float number could allow us to change what percentage is needed to switch to icon view so instead of dividing with 2.0 we could multiply with 0.5 and we can have a slider to change the threshold.

Also integer variables for Dynamic view is set with "uint" instead of "int". Only Dynamic view uses uint and as far as I'm aware uint is undefined in c++ and nowhere else in the code uint is used this should be change to normal int.
Comment 1 szucsilikes00 2025-08-19 14:45:26 UTC
Made a fork which does this (508305) and folder ignoring (508304): https://invent.kde.org/ccmenta/dolphin/-/commit/d3c31661266a3cbaca12229f073a24cd82e57fc9
Comment 2 szucsilikes00 2025-08-22 17:38:44 UTC
(In reply to szucsilikes00 from comment #1)
> Made a fork which does this (508305) and folder ignoring (508304):
> https://invent.kde.org/ccmenta/dolphin/-/commit/d3c31661266a3cbaca12229f073a24cd82e57fc9

I forgot to put in a needed variable. https://invent.kde.org/ccmenta/dolphin