Bug 488639 - Gwenview puts commas in image dimensions in window title bar
Summary: Gwenview puts commas in image dimensions in window title bar
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 24.05.1
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-17 20:55 UTC by nyanpasu64
Modified: 2025-03-04 15:33 UTC (History)
2 users (show)

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


Attachments
Comparing image dimensions with other apps/OS (137.33 KB, image/jpeg)
2024-12-12 14:19 UTC, Luke Horwell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nyanpasu64 2024-06-17 20:55:19 UTC
SUMMARY
Gwenview now places commas in the image dimensions in the title bar, which is unexpected and doesn't match previous behavior or web browsers.

STEPS TO REPRODUCE
1. Open an image with dimensions over 1000 pixels on either axis.

OBSERVED RESULT
Title bar says "file.ext - 1,024x768 - 100% ­– Gwenview" (unsure about en or em dash).
Was this a result of porting to Qt 6 and a different formatting framework?

EXPECTED RESULT
Image dimensions do not include commas.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 570 Series
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B550M DS3H

ADDITIONAL INFORMATION
Comment 1 Luke Horwell 2024-12-12 14:19:29 UTC
Created attachment 176556 [details]
Comparing image dimensions with other apps/OS

It also affects the "Details" tab in Dolphin when right clicking an image file. Not sure if it's Qt 6 or a KDE library causing this.

Attached is an image showing the bug, and comparing other apps and OSes.
Comment 2 Luke Horwell 2024-12-12 14:53:09 UTC
I was able to track down the problematic commit/MR:

https://invent.kde.org/graphics/gwenview/-/commit/3663c774ca0b766583ee92d9b2776d67cf5d5c2a
https://invent.kde.org/graphics/gwenview/-/merge_requests/220

Reverting that commit fixes the title bar for Gwenview. Although, it was to fix a localisation issue:

* https://bugs.kde.org/show_bug.cgi?id=473638
* https://bugs.kde.org/show_bug.cgi?id=473636

Not sure if it's the i18nc() function that causes the integers (e.g. 1024) to end up formatted with commas according to locale (e.g. 1,024). Makes sense for something like "15,200 files" but not "1024x1024 pixels".
Comment 3 Bug Janitor Service 2025-02-01 14:07:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/gwenview/-/merge_requests/316
Comment 4 Joshua Goins 2025-03-04 15:33:06 UTC
Git commit 1a8894535ec18df43c7d83efaf740d822cf0091b by Joshua Goins, on behalf of Luke Horwell.
Committed on 04/03/2025 at 15:29.
Pushed by redstrate into branch 'master'.

Fix presentation of image size integers

Changes in 3663c774ca0b766583ee92d9b2776d67cf5d5c2a (bug 473638) caused
image dimensions to be displayed with integer grouping (1,024x1,024)
instead of the more conventional "1024x1024".

M  +2    -1    lib/documentview/documentview.cpp
M  +1    -1    lib/imagemetainfomodel.cpp
M  +6    -2    lib/thumbnailview/previewitemdelegate.cpp

https://invent.kde.org/graphics/gwenview/-/commit/1a8894535ec18df43c7d83efaf740d822cf0091b