Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Contributions to C::B => Topic started by: gd_on on January 15, 2020, 02:00:08 pm

Title: Toolbar width problem with wxWidgets 3.1.4
Post by: gd_on on January 15, 2020, 02:00:08 pm
I am trying to test wxWidgets 3.1.4 (updated with git).
I have seen, some time ago, that some toolbars in CodeBlocks are too wide with this version but they were correct with 3.1.3 version.
It appeared very soon after the first releases of version 3.1.4 and hasn't changed since.
May be, there is something to tweak in C::B, but I have not found where it is.
See the effects on the 2 images.

gd_on
Title: Re: Toolbar width problem with wxWidgets 3.1.4
Post by: oBFusCATed on January 15, 2020, 08:44:35 pm
Does any of View -> Toolbars -> Fit toolbars or optimize toolbars fixes this?
If not bisecting the offending commit in wxwidgets might be helpful.
Title: Re: Toolbar width problem with wxWidgets 3.1.4
Post by: gd_on on January 16, 2020, 09:51:44 am
Quote
Does any of View -> Toolbars -> Fit toolbars or optimize toolbars fixes this?
No, it does not solve the problem.
Quote
If not bisecting the offending commit in wxwidgets might be helpful.
The switch between versions 3.1.3 and 3.1.4 took place on 27/10/2019. So, it will not be easy, and surely take a long time to do that...
I tried tp search why some toolbars were correctly sized and some other were not ... but I have not found ...

gd_on
Title: Re: Toolbar width problem with wxWidgets 3.1.4
Post by: sodev on January 16, 2020, 01:38:52 pm
I am observing the same behavior, it seems that only toolbars which contain a control, in both cases a combobox like one, are affected.
Title: Re: Toolbar width problem with wxWidgets 3.1.4
Post by: Miguel Gimenez on January 16, 2020, 04:19:19 pm
Your commit is Prevent spurious debug error messages in wxMSW wxToolBar code

https://github.com/wxWidgets/wxWidgets/commit/6878a46725af106758fe166f1334978b89f4a564 (https://github.com/wxWidgets/wxWidgets/commit/6878a46725af106758fe166f1334978b89f4a564)

EDIT: I have attached the old and new parts of the file. The problem is the toolIndex variable now is incremented only if the tool is not a control. This should be reported to wx devs.

EDIT2: Reported
Title: Re: Toolbar width problem with wxWidgets 3.1.4
Post by: gd_on on January 16, 2020, 06:27:18 pm
Thanks Miguel.
I was on the good way, but you win  :D
So, we have to wait for a wxWidgets correction probably.
Title: Re: Toolbar width problem with wxWidgets 3.1.4
Post by: Miguel Gimenez on January 16, 2020, 07:45:43 pm
Sorry, I didn't realize you were already working on this.
Title: Re: Toolbar width problem with wxWidgets 3.1.4
Post by: Miguel Gimenez on January 17, 2020, 09:40:36 am
Toolbar's width error fixed:

https://github.com/wxWidgets/wxWidgets/commit/e700a029647dd28a0d9104a9bb68dcac30b8e624
Title: [Solved] Re: Toolbar width problem with wxWidgets 3.1.4
Post by: gd_on on January 17, 2020, 10:36:46 am
Thanks again, it's OK now. Thanks also to the author of the patch.
And don't be sorry, you are (one of) the best  ;)

gd_on