[haiku-3rdparty-dev] Re: Drawing issue of BListItems

  • From: Rene Gollent <anevilyak@xxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Sat, 17 Nov 2018 06:43:12 -0700

One thing I just noticed... In the code in GitHub, you're calling Hide() on
the filter view directly...I believe you're not supposed to do that in
layout land, instead you need to get the view's layout item and call
SetVisible(false) on it. That could potentially be causing some drawing
havoc.

Regards,

Rene

On Sat, Nov 17, 2018, 07:44 Humdinger <dmarc-noreply@xxxxxxxxxxxxx wrote:

On 14/11/2018, Humdinger <humdingerb@xxxxxxxxxxxxxx> wrote:
I narrowed the strangeness down to adding the BTextControl
fFilterControl to the layout [1].

Just because it's so strange:

        // do the layouting
        BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
                .Add(menuBar)
                .AddSplit(B_HORIZONTAL, B_USE_SMALL_SPACING)
                .GetSplitView(&fMainSplitView)
                        .AddGroup(B_VERTICAL)
                                .Add(fHistoryScrollView)
                                .Add(fFilterScrollView)
                                .Add(fPauseCheckBox)
                                .AddGroup(B_HORIZONTAL)         // this is
                                        .Add(fFilterControl)    // the
                                        .Add(buttonClear)               //
filter
                                .End()
      // group
                        .End()
                        .AddGroup(B_VERTICAL, B_USE_SMALL_SPACING)
                                .Add(favoritesHeader)
                                .Add(fFavoritesScrollView)
                                .AddGroup(B_HORIZONTAL,
B_USE_SMALL_SPACING)
                                        .AddGlue()
                                        .Add(fButtonUp)
                                        .Add(fButtonDown)
                                        .AddGlue()
                                .End()
                        .End()
                .SetInsets(B_USE_SMALL_INSETS)
                .End();

Wherever I put the "filter group", the plain font strings in the
following list views aren't drawn after they are added to the layout;
they are when wagging a window in front of it.
The icon bitmaps of the history clips and the bold funtion keys
strings in the favourites lists are drawn from the start.

If I put the "filter group" at the start, both following lists show
the issue. When put at the end, none show it. The filter has to be
below the history list though, so that's no "solution". :)

Regards,
Humdinger

--
Help translating 3rd party Haiku applications
Go to https://i18n.kacperkasper.pl


Other related posts: