Bug 508305 - Dynamic view should change view when 50% of the folder's content is image/video.
Summary: Dynamic view should change view when 50% of the folder's content is image/video.
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (other bugs)
Version First Reported In: 25.08.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-15 18:10 UTC by szucsilikes00
Modified: 2025-08-22 17:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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