Message 67109

Message id


On 2021-04-30 09:08, Nicolas Évrard wrote:
> * Cédric Krier  [2021-04-30 00:14 +0200]: 
> >For me it is a complex code to maintain for 
> I could understand the argument of the complexity for the javascript version
> (because of the margin, the usage of "getBoundingRect" which is not exactly
> self-explanatory) but the GTK one is not really complex.
> But something even more simple could use the height of the screen.

The base height is not really the problem (and yes the screen height
should probably be used as it is fixed).
The problem is to know the height of a row before having the row. (I
really do not like to use another random treeview than the one which
will display the record).

> >no real guarantee to be correct
> It is best effort, there's no point in determining exactly the right number of
> rows as long as you're a bit but not too much above the number of displayed
> rows.

That's why a fixed number could be a good enough approximation. Maybe 20
is too small and it should be 100 to cover very large screen.

> >and for almost no benefit compared to a fixed minimal value based on common
> >screen sizes
> I don't think there is such a thing as a "common screen size".

Indeed I should not have said common but upper average.

> Even more so if
> we take into account the web and the different handheld terminals people could
> use there.
> According to the
> resolutions of the screen of people browsing their website are:
> - Other high resolutions: 52.2%
> - 1366x768: 24.8%
> - 1920x1080: 19.2%
> - Lower: 10.7%
> (I would have bet that 1920x1080 was the biggest something like 60%, I am far
> from the truth. It's a bit sad that wikipedia or google do not make their data
> about this available as they are more mainstream).

So we can take 1080 as reference which correspond to my screen and

> >(which could even be a configuration parameter if needed).
> Why not but it seems a bit too technical to explain to the users.

For me it is for special usage. Like if someone is using the client on a
unusual screen size. (It is the same as for the search limit).

Or maybe instead of adding a new value, we could still reuse the search
limit for something like:

limit = int(CONFIG['client.limit'] / min(len(fnames), 10))
Date User Action Args
2021-04-30 10:49:03cedsetrecipients: + nicoe, pokoli, reviewbot
2021-04-30 10:49:03cedlinkissue10043 messages
2021-04-30 10:49:03cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)