Summary: | PreviewList not correctly aligned when starting an image editor tool [patch] | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Andi Clemens <andi.clemens> |
Component: | Plugin-Editor-AutoColors | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | andi.clemens, caulier.gilles, praveshgupta1993 |
Priority: | NOR | ||
Version: | 3.0.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/digikam/956d2657180398480bc4f6f720941edbf7331ef3 | Version Fixed In: | 3.2.0 |
Sentry Crash Report: | |||
Attachments: |
example
resizedPreviewList(Auto Correction Tool Preview List) Auto Correction after Sidebar Resize Black & White Tool Preview List Black & White Tool Preview List after Sidebar Resize Preview List Patch |
Description
Andi Clemens
2012-10-05 09:21:33 UTC
Created attachment 74352 [details]
example
Andi, Widget relevant is in image editor : https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/imageeditor/widgets/previewlist.cpp Gilles Caulier I know, but I haven't found the problem yet so I added the bugreport... :-) I can reproduce the problem here, and i tried to found the origin. I force icon size to listview to force layout of icon before to render and plug thumbs, which are computed by separated thread. This want mean that list view is show empty before to render preview. I don't touch yet sizeHintxxx() methods to re-implemented. Perhaps it's the godd way. What do you think about ? Or it's a Qt4 bug. I don't know... Gilles Caulier Yes maybe re-implementing the sizeHint method will work... onResize the list is drawn correctly, so this might be a good way to fix the issue I am also able to reproduce the bug. In my mind, a simple solution to this is to make iconSize and gridSize smaller. I have tried with different combinations and i think the previewList in the attachment(named 'resizedPreviewList' ) is good to view. Should it be done? Pravesh Created attachment 79549 [details]
resizedPreviewList(Auto Correction Tool Preview List)
But it sound like a Qt icon-view canvas refesh which is not call at the right time... No ? Gilles Caulier If your solution is a turn around the dysfunction, why not... dysfunction disappear for all tool sidebar size, when you close and reopen it ? Gilles Caulier Hi Gilles, Please can you elaborate comment 9. Pravesh Hi Gilles, It disappears for Auto Correction tool. And for White Balance Tool it makes more use of the space by displaying 2 images in a row. But the current problem then comes in White Balance Tool i.e. the 2 consecutive rows are not wholly displayed. Pravesh 1 / Open tool including PreviewList 2/ Change width of sidebar including tool settings (reduce, increase) 3/ close tool 4/ re-open tool and check if preview icon are aligned. 5/ try again to 1/ Gilles Caulier Don't forget one point. preview are computed outside GUI thread. It's invoke tool filter algorithms to apply on image and reducing result as thumb. Of course, depending of complexity of algorithm used, preview can take more and less time... This want mean that during thumb computation icon size can be not very well defined. I suspect a race condition somewhere. Note : this preview widget is used also in B&W tool... Can you reproduce ? It's i think the tool which have the most of thumbs to compute. Gilles Caulier Created attachment 79551 [details]
Auto Correction after Sidebar Resize
Created attachment 79552 [details]
Black & White Tool Preview List
Created attachment 79553 [details]
Black & White Tool Preview List after Sidebar Resize
Hi Gilles, I have attached attachments of changes in previewList after changing gridSize and iconSize. Auto Correction after Sidebar Resize Black & White Tool Preview List Black & White Tool Preview List after Sidebar Resize Pravesh Hi Gilles, Image thumbnails in the preview List does not resize when width of sidebar is changed. But if we set imageThumbnail size to 96*96, even then whole previews of B&W Tool can not be represented in single view, so to view other previews of B&W we have to scroll down . The height of the grid Area in B&W preview is to be increased some more or images should be around size 90*90, so that at least 2 rows can be displayed at a time. But if we do this, then Image Previews in the Auto ColorCorrection Tool becomes very small as compared to the area allocated to them and thus looks somewhat odd. So I think icon size (96*96), and gridSize as (125, 96+font().height()) is fine. At least preview List for Auto Correction Tool is good to view. Pravesh Sorry, In my previous comment 18, I told that to view at least 4 images with their name at around iconSize 90* 90 is required, but it is 70*70. This size makes Auto Correction Preview List Grid Space not correctly utitilized, and looks odd. Is there any other way? Pravesh Pravesh, Please attach a patch of your changes given the best results. Gilles Caulier Created attachment 79852 [details]
Preview List Patch
Hi Gilles,
I am attaching the patch which changes the image icon and grid size. This corrects preview list for Auto-Corrrection Tool.
Preview List for Black & White Tool is more good to view but still cannot completely show all the previews in the small space allocated to it.
Please review it.
Pravesh
Git commit 956d2657180398480bc4f6f720941edbf7331ef3 by Gilles Caulier. Committed on 12/05/2013 at 18:31. Pushed by cgilles into branch 'master'. apply patch #79852 from Pravesh Gupta FIXED-IN: 3.2.0 M +2 -2 utilities/imageeditor/widgets/previewlist.cpp http://commits.kde.org/digikam/956d2657180398480bc4f6f720941edbf7331ef3 Hi Gilles, I want to notify that as was in the patch submitted by me setGridSize method should have QRect of width 125 as it will result in better previewList region utilization when Black & White Tool is called. setGridSize(QSize(125, 100 + fontMetrics().height())); While according to the commit, this objective is not reached. Please review and correct asap. Pravesh Git commit 348c231cd6dd50039f3fdc0e065fbc4a8bcfc862 by Gilles Caulier. Committed on 12/05/2013 at 19:13. Pushed by cgilles into branch 'master'. polish icon size M +1 -1 utilities/imageeditor/widgets/previewlist.cpp http://commits.kde.org/digikam/348c231cd6dd50039f3fdc0e065fbc4a8bcfc862 |