[haiku-development] Fixed width for the DataTranslations preflet

  • From: "Markus Himmel" <markus@xxxxxxxxxxxxxxxxx>
  • To: <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 26 Jul 2015 20:09:23 +0200

Regarding Ticket 12243 (https://dev.haiku-os.org/ticket/12243) humdinger and
I
aren't exactly sure how to best realize this idea. The problem is that the
relevant part of the TranslatorRoster interface
(http://cgit.haiku-os.org/haiku/tree/headers/os/translation/TranslatorRoster
.h#n80)
does not guarantee that, when the configuration view is requested multiple
times,
the width is always the same. This means that it is not possible to
determine
a width which is guaranteed to be large enough for all translators. Another
reason for that is that translators which are installed while the preflet is
open will get dynamically added and may return even larger config views,
which
again means that you cannot determine a lerge enough width when the preflet
is
started.

Obvious ways of approaching this are:
1. Don't change anything and have the width change for each translator.
2. Make the preflet larger when necessary, but never smaller.
3. At startup, run through all translators to find the widest and use that
for
the preflet. If that turns out to be too small, fall back to option 2.

Option 3 seems like a decent solution, as an optimal solution does not
exist,
but it is a hack and therefore feedback as to whether it should be
implemented
or not (and of course even better options) would be appreciated.

Regards,
Markus (TwoFx)


Other related posts: