Author Topic: Build target window not resizing correctly.  (Read 18929 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build target window not resizing correctly.
« Reply #15 on: July 02, 2014, 02:48:50 am »
Hm, it seems that the list ctrl has not been expanded to width==200 pixels...

Probably I need to call something else, too and SetMinSize is not enough. Does anyone know what should be called?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re:
« Reply #16 on: July 02, 2014, 10:19:14 pm »
Did you forget Layout()?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build target window not resizing correctly.
« Reply #17 on: July 02, 2014, 11:36:09 pm »
Probably, but I cannot test it, because it works even without calling Layout() (probably on this).
I need someone to test this on windows.
Also I need to know if we want to do this change, so I can finish this patch.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build target window not resizing correctly.
« Reply #18 on: July 05, 2014, 05:51:22 pm »
Can someone post a screenshot from a windows machine with my patch and adding a Layout(); call after the lines
Code
     lstTargets->SetMinSize(wxSize(width, 200));
     DoTargetChange(false);"

?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Build target window not resizing correctly.
« Reply #19 on: July 06, 2014, 03:00:03 am »
Can someone post a screenshot from a windows machine with my patch and adding a Layout(); call after the lines
Code
     lstTargets->SetMinSize(wxSize(width, 200));
     DoTargetChange(false);"

?

I noticed no change; I am starting to think it is a wxWidgets 2.8 and Windows 7 32 bit bug.

I think this line is not working correctly on my PC using wxWidgets 2.8 and Windows 7 32 bit.
Code
lstTargets->SetColumnWidth(0, wxLIST_AUTOSIZE);

It works different in wx3.0.0 build the Width is twice what is needed for max target.

I think we need a different tester to verify it is not a problem on my PC.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build target window not resizing correctly.
« Reply #20 on: July 06, 2014, 12:32:34 pm »
Have you tried to debug cb and see what is the value of width?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Build target window not resizing correctly.
« Reply #21 on: July 06, 2014, 08:47:26 pm »
Have you tried to debug cb and see what is the value of width?

Trying for my forth time using wxWidgets 2.8; first three got the below message.

Code
Program received signal SIGSEGV, Segmentation fault.
In _pthread_cleanup_dest () (E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_custom_build\src\devel\share\codeblocks\plugins\xpmanifest.dll)

wx 3.0.0 width is 165

Tim S.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Build target window not resizing correctly.
« Reply #22 on: July 06, 2014, 09:02:35 pm »
After about 8 tries got this

wx 2.8.12 width is 150

So, the width value is NOT that much difference between wx 3.0.0 and wx 2.8.12.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build target window not resizing correctly.
« Reply #23 on: July 07, 2014, 01:35:55 am »
Ok, but the width of the control on your screen shot is just 100. So the SetMinSize has no effect. Can you try to replace it with SetSize()? (I'm just guessing here)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Build target window not resizing correctly.
« Reply #24 on: July 07, 2014, 01:56:52 am »
Ok, but the width of the control on your screen shot is just 100. So the SetMinSize has no effect. Can you try to replace it with SetSize()? (I'm just guessing here)

Just did that very weird results.

https://github.com/stahta01/cb_misc/blob/master/Notes/SetSize.png

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build target window not resizing correctly.
« Reply #25 on: July 07, 2014, 02:22:37 am »
This is close to the expected behaviour.
Now, the question is why SetMinSize doesn't work on windows?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Build target window not resizing correctly.
« Reply #26 on: July 07, 2014, 02:31:38 am »
This is close to the expected behaviour.
Now, the question is why SetMinSize doesn't work on windows?

I added "Fit();" where you said to add Layout and it appears to be correct for wx 2.8 (It only cuts off one of the targets).

Edit: Still about twice too wide using wx 3.0.0; might try 3.0.1 tomorrow.

Tim S.
« Last Edit: July 07, 2014, 02:38:56 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Build target window not resizing correctly.
« Reply #27 on: July 07, 2014, 04:08:47 pm »
This is close to the expected behaviour.
Now, the question is why SetMinSize doesn't work on windows?

I added "Fit();" where you said to add Layout and it appears to be correct for wx 2.8 (It only cuts off one of the targets).

Edit: Still about twice too wide using wx 3.0.0; might try 3.0.1 tomorrow.

Tim S.


No visible diff between  wx 3.0.0 and 3.0.1; still about twice too wide.

Might try wx trunk.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Build target window not resizing correctly.
« Reply #28 on: July 07, 2014, 04:57:27 pm »
I considered the wxWidgets Windows 7 32 bit build to look very good with your patch with these two changes.
1. Added Fit();
2. Added include of header (needed to get win32 wx3.0 project to build)

Link to TESTING DISPLAY ONLY patch that has those two changes.
https://github.com/stahta01/cb_misc/blob/master/Patches/svn/project_options_layout_many_target.patch

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org