Bug 394414 - Brush preset thumbnails are the wrong aspect and often hidden and unselectable
Summary: Brush preset thumbnails are the wrong aspect and often hidden and unselectable
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: git master (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-18 16:35 UTC by InfinityTraveller
Modified: 2021-09-01 09:59 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshots (143.73 KB, image/png)
2018-05-18 16:35 UTC, InfinityTraveller
Details
Partial fix (590 bytes, patch)
2018-06-19 13:56 UTC, InfinityTraveller
Details
Screenshot comparison (775.21 KB, image/png)
2019-05-21 12:54 UTC, Storm Engineer
Details
Starting state (77.73 KB, image/png)
2019-05-21 14:44 UTC, Storm Engineer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description InfinityTraveller 2018-05-18 16:35:12 UTC
Created attachment 112736 [details]
Screenshots

Overview:

I have noticed some oddities while using brush presets search, this occurs in the widget and the dropdown.

Steps to Reproduce:

* Erasing the parts of search term causes the thumbnails to change height.
1) Type a) in the search.
2) Erase the ")" with backspace or delete.
3) First row thumbnails are correct, the rest have the height wrong (Check attachment for screenshot 1).

* Pressing enter in the search bar while no results shown enlarges the thumbnails.
1) Type random text that clears the thumbnails like "asdsa".
2) Press Enter.
3) Thumbnails are large now (Check attachment for screenshot 2).

Actual Results:

- Thumbnail sizes have changed.

Expected Results:

- Thumbnails should appear as the size in the settings.

Build Date & Platform:

- Krita 4.0.3 64-bit, on Windows 8.1 64-bit.

Additional Information:

- I have included my thumbnail settings in the attachment as screenshot 3

Workarounds:

Workaround 1:
1) Clear any text in search bar.
2) Press enter.
3) Thumbnails have correct size.

Workaround 2:
Change the thumbnail size in the settings after searching.
Comment 1 Scott Petrovic 2018-05-22 18:06:23 UTC
This is happening to me in my Windows build and git master on my Ubuntu build. Not sure exactly what the search is doing to the results. 

It appears to only be happening with thumbnail view
Comment 2 InfinityTraveller 2018-06-19 13:56:52 UTC
Created attachment 113428 [details]
Partial fix

Was able to partially fix the issue by adding emit updateView(); at the end of tagSearchLineEditTextChanged.

With this change the thumbnails look similar and have the correct ratio, although they grow up to fill the empty space.

Not sure if this is part of the solution or if there is a better way to fix it.
Comment 3 Halla Rempt 2018-06-20 11:39:28 UTC
It's an improvement in any case, but not a complete fix.
Comment 4 Halla Rempt 2018-06-20 11:40:33 UTC
Git commit 2b86a77019236b26730a9c66d8219a19eb6036b8 by Boudewijn Rempt.
Committed on 20/06/2018 at 11:39.
Pushed by rempt into branch 'master'.

Partial fix for thumbnails getting the wrong ratio

M  +2    -0    libs/widgets/KoResourceTaggingManager.cpp

https://commits.kde.org/krita/2b86a77019236b26730a9c66d8219a19eb6036b8
Comment 5 Halla Rempt 2018-06-20 13:38:33 UTC
Git commit d3fd7e8012e5cc7bb86197973dca0180912e5da3 by Boudewijn Rempt.
Committed on 20/06/2018 at 13:12.
Pushed by rempt into branch 'krita/4.1'.

Partial fix for thumbnails getting the wrong ratio

M  +2    -0    libs/widgets/KoResourceTaggingManager.cpp

https://commits.kde.org/krita/d3fd7e8012e5cc7bb86197973dca0180912e5da3
Comment 6 Andrey 2018-06-26 15:13:24 UTC
Git commit 0154071d08b1648120e6f2f08dc229d4508fc8d2 by Andrey Kamakin, on behalf of Boudewijn Rempt.
Committed on 26/06/2018 at 14:18.
Pushed by akamakin into branch 'akamakin/T8628-multithreading-optimization'.

Partial fix for thumbnails getting the wrong ratio

M  +2    -0    libs/widgets/KoResourceTaggingManager.cpp

https://commits.kde.org/krita/0154071d08b1648120e6f2f08dc229d4508fc8d2
Comment 7 Storm Engineer 2018-10-27 17:13:21 UTC
I don't think it's directly related to the search.

My thumbnails are always incorrect by default, often a column of them being hidden as they would be outside the sub-window.

Changing the Thumbnail size slider will change the distortion, and sometimes a certain size will cause them to render inside the sub-window properly, but not always.

The only time thumbs look correct is when either via tags or search, there are only a very few (eg 6-8) thumbnails displaying.

P.s.: Arch Linux + KDE5 here.
Comment 8 Storm Engineer 2019-05-21 12:54:09 UTC
Created attachment 120219 [details]
Screenshot comparison

Edited the title to better reflect the nature of the issue, and added a new screenshot to demonstrate.

Note: on the left several presets are missing because they are outside the boundary of the presets button's dropdown.

When adjusting the thumb size in the dropdown, the thumbs in the docker get resized correctly. When size is adjusted from the docker, it will display the same issue the dropdown does.
Comment 9 Storm Engineer 2019-05-21 14:44:42 UTC
Created attachment 120223 [details]
Starting state

This is how the dropdown looks for me right after starting Krita (current master). :-O
Comment 10 vanyossi 2019-05-23 15:17:34 UTC
The last part is probably normal now. Some of it was a faulty logic on one of my "fixes". But the original report was before I even touched the code.

I Can't reproduce the bug at all using the original report instructions, neither in Linux or macOS. Do I need to set up the window in a special way?

What version of Qt are you compiling krita against? Column width is set by dividing the number of columns by the width of the widget (the number is rounded down to avoid columns "spilling"). The function used to get the width lives in Qt and we do not touch it, or overload it. It might be windows reading the width incorrectly.
Comment 11 Storm Engineer 2019-05-24 22:59:15 UTC
As I have stated several times I experience this on Linux, so it's not Windows related.
Comment 12 Storm Engineer 2019-06-05 06:06:31 UTC
Please disregard my previous comment. I've misread "window" as "Windows". Sorry about that.

So, for me this just happens 100% of the time, no matter what I do with the window, dockers, or anything, and I can not produce a state where it does not happen.
Comment 13 vanyossi 2019-06-06 02:03:01 UTC
We have a report on presets dissapearing if the area is small and ellipsis are displayed in name of the Tag collection. And the bruses deform always if there is only one column shown.

Different row height should be fixed now.

Pressing ENTER/INTRO on the search bar creates all sorts of different behaviours :S, now I have like thousends of empty collections, also thumbnail size changes sometimes, but some other times it doesnt.

Can you provide me some infor on the preset collections you are using? I installed a lot to try and reproduce a preset size bug, and this affects the number of presets shown on search. It's possible there an exact number that creates this kinds of weird resize behaviour.
Comment 14 Storm Engineer 2019-06-06 12:58:28 UTC
My number of presets changes often because I'm constantly creating new ones, and sometimes remove ones added by bundles that I don't need. But I have a very large number, around 5-600 presets total.

If I use search or show tags instead of "all", I notice that the more presets displayed at once the worse it gets.

Apparently adjusting thumbnail size affects only the height not the width, which causes the distortion. Maybe this is why there are more thumbs in a row than what can fit, because they are wider than they should be?
Comment 15 vanyossi 2019-08-13 10:50:45 UTC
Is this still an issue in 4.2.5?
Comment 16 vanyossi 2019-09-24 03:47:09 UTC
Im setting this one to fixed as it is probably a Qt quirk as it became imposible  to reproduce. Please reopen if you still experience this on 4.2.7

The code was made to not allow the thumbnails to be outside the active area. I revised the logic and unless Qt reports a wrong size it is extremely rare to tile a preset outside the active area.
Comment 17 Storm Engineer 2019-10-11 18:43:25 UTC
Sorry, I missed when this was closed.

The issue is still present for me with 4.3.0-prealpha (git 3e21da9)

Reopening as requested.
Comment 18 vanyossi 2019-12-12 06:52:23 UTC
Unassigning as I cannot reproduce the issue.
Comment 19 Tiar 2021-08-22 22:31:45 UTC
Does it happen in Krita 5.0-beta1? If not, I guess we can close this. Krita 5.0 has a new way of showing those thumbnails so there is a chance that the bug was in the now-deleted code.
Comment 20 Storm Engineer 2021-08-26 14:51:02 UTC
I haven't experienced this with git master since it went to 5.0, and the last time I built master a few weeks ago this was still the case.

I don't know when will I have the time to build it again to verify but I would wager it was indeed an issue with the older code that is replaced.
Comment 21 Halla Rempt 2021-09-01 09:59:18 UTC
We're now using a standard QListView component to show the presets, which means that we're no longer calculating the aspect ratio of the icons ourselves, so, yes, this can be closed.