Skip to content
Commit e28b9d31 authored by Theophile Gilgien's avatar Theophile Gilgien Committed by Jonah Brüchert
Browse files

fix dropdown bugs

# fix issues with temporarySearch in search dropdown

Handling temporary searches the same as normal ones created issues when
the temporary search was the same as a normal one. The normal search
could get temorarily removed, and the temporary search would not display
normally.
Handling temporary and normal searches separately seemed easier.
However, keeping the temporary searches completely separated and only in
the qml would have complexified greatly the already complex handling of
keyboard navigation, so keeping both in the model, but separated, seemed
to be the easiest option.

# fix popup being to large when opening with few entries

This requires knowing the height of one search entry, which is
surprisingly difficult. For keyboard navigation,
completitionList.empiricDelegateHeight was used. However, this can't be
used in this concept, because it requires mainScrollView.contentHeight
to be defined, which is not the cas at this stage. Fortunately, it
doesn't to be extremly accurate, as it is only used if there are less
than 11 search entries, so a small error doesn't adds up and is
therefore unnoticeable.

The initial situation :  
![image](/uploads/17971fdd9ddcaf4c84e0fd35ac8bdfd3/image.png)

result :  
![image](/uploads/81225206b0a6e05eb9d41159ad0d2906/image.png)
parent c9eb920e
Pipeline #378387 passed with stages
in 1 minute and 43 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment