Light gray background of wxTreebook on macOS

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
asztandi
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Mar 24, 2020 2:28 am

Light gray background of wxTreebook on macOS

Post by asztandi »

Hi Everyone!

I'm using wxWidgets 3.1.4 on macOS mojave (10.14.6). After upgrading to 3.1.4 I started seeing a light gray background in wxTreebooks, but only in the region that has no text:
wxTreebook_mac2.png

Is there a flag that I would need to change regarding to reset the background to white? Is it a feature or a bug?
Thank you, I appreciate all responses.

Andrea
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Light gray background of wxTreebook on macOS

Post by ONEEYEMAN »

Hi,
Do you see the same in the notebook sample?
How did you build wxWidgets? What was exact configure line?

Thank you.
asztandi
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Mar 24, 2020 2:28 am

Re: Light gray background of wxTreebook on macOS

Post by asztandi »

Hello,
This code produces these dialogs on macOS (with wx 3.1.4) and on Windows (wx. 3.1.3):

Code: Select all

void CHelloWorldDlg::CreateControls()
{
    CHelloWorldDlg* itemDialog1 = this;

    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
    itemDialog1->SetSizer(itemBoxSizer2);

    wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1, wxID_STATIC, _("Treebook"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    wxTreebook* treebook = new wxTreebook(itemDialog1, wxID_ANY, wxDefaultPosition, wxSize(-1, 100), wxBK_DEFAULT);
    itemBoxSizer2->Add(treebook, 1, wxGROW | wxALL, 5);

    wxStaticText* itemStaticText4 = new wxStaticText(itemDialog1, wxID_STATIC, _("Notebook"), wxDefaultPosition, wxDefaultSize, 0);
    itemBoxSizer2->Add(itemStaticText4, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);

    wxNotebook* notebook = new wxNotebook(itemDialog1, wxID_ANY, wxDefaultPosition, wxSize(100, 120), wxBK_DEFAULT);
    itemBoxSizer2->Add(notebook, 1, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);

    wxWindow* panel = new wxPanel(notebook);
    notebook->AddPage(panel, wxT("Panel"));

    wxButton* itemButton5 = new wxButton( itemDialog1, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer2->Add(itemButton5, 0, wxALIGN_CENTER_HORIZONTAL |wxALL, 5);
}
Treebook_Notebook_wx3.1.4_macOS.png
Treebook_Notebook_wx3.1.3_Windows.png
Treebook_Notebook_wx3.1.3_Windows.png (3.98 KiB) Viewed 2977 times
The notebook behaves well, only the treebook shows up with a different background color. I also noticed that wxEditableListBox behaves in a similar way: initially the entire list is gray and no text is shown, then when you click on a row, the text becomes visible having a white background.

These are the configuration flags we use:
--with-opengl --with-cocoa --enable-compat30 --with-libjpeg --with-libpng --with-zlib --enable-std_iostreams --enable-std_string --enable-protocols --enable-ftp --enable-fs-inet --enable-protocols --enable-ftp --enable-fs-inet --without-macosx-sdk --with-macosx-version-min=10.10 --with-macosx-version-min=10.10 CPPFLAGS=-I/opt/X11/include LDFLAGS=-L/opt/X11/lib PKG_CONFIG=/usr/bin/false

Thank you!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Light gray background of wxTreebook on macOS

Post by ONEEYEMAN »

Hi,
So if you build the notebook sample that comes with the wxWidgets will you see the same difference?

I also find it weird that you configure line contains some options twice. And also there is some weird ones:

Code: Select all

--without-macosx-sdk --with-macosx-version-min=10.10 
You sure about that configure line?

Thank you.
asztandi
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Mar 24, 2020 2:28 am

Re: Light gray background of wxTreebook on macOS

Post by asztandi »

Hello,

Yes, I see the same behavior in the notebook example: the wxNotebook is fine but the wxTreebook has the light gray background.
Does it have to do with any of the configure's options?

What would you recommend instead of this: "--without-macosx-sdk --with-macosx-version-min=10.10" ?

Thank you.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Light gray background of wxTreebook on macOS

Post by ONEEYEMAN »

Hi,
Try to build it with just:

Code: Select all

../configure --enable-debug
Thank you.
asztandi
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Mar 24, 2020 2:28 am

Re: Light gray background of wxTreebook on macOS

Post by asztandi »

Hello,

I configured the build as you suggested and the notebook sample still shows the treebook with a light gray background:
wxTreebook_right.png
wxTreebook_left.png
Is it a feature or bug?
Thank you.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Light gray background of wxTreebook on macOS

Post by ONEEYEMAN »

Hi,
I don't know.
Try to send an E-mail to wx-users ML.

This forum is for users by users of the library.

Thank you.
asztandi
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Mar 24, 2020 2:28 am

Re: Light gray background of wxTreebook on macOS

Post by asztandi »

Hello,

Following your advice I did ask that group and it turned out to be a bug that was recently fixed: https://trac.wxwidgets.org/ticket/18940

Thank you for all your help!
Post Reply