Author Topic: CodeCompletion window different in 20.03  (Read 5519 times)

Offline zdena

  • Multiple posting newcomer
  • *
  • Posts: 39
CodeCompletion window different in 20.03
« on: April 16, 2020, 10:07:04 pm »
Hello, finally I try C::B 20.03, and I see the window with CodeCompletion behaves different - please compare pictures with 17.12 version.

The C::B project is the same, and also the settings of the CC (and also all other C::B settings) were set in the same way as in previous version, I think.

Or did I miss anything? How to set the CC window to see whole #defines as well as their documentation?

Thanks in advance. Zdena

Old Version: 17.12 May 12 2019 32b
New Version: 20.03 Mar 14 2020 64b
Windows10 64b
Windows 10 64b
Arduino 1.8.11 with (modified) Arduino Builder 1.5.1z through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.
Czechia - please pardon my English

Offline zdena

  • Multiple posting newcomer
  • *
  • Posts: 39
Re: CodeCompletion window different in 20.03
« Reply #1 on: April 16, 2020, 10:07:48 pm »
Note: window with variables is better but still without "documentation" subwindow.
Windows 10 64b
Arduino 1.8.11 with (modified) Arduino Builder 1.5.1z through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.
Czechia - please pardon my English

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CodeCompletion window different in 20.03
« Reply #2 on: April 16, 2020, 10:13:17 pm »
What is the DPI of the monitor you're using?
(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 zdena

  • Multiple posting newcomer
  • *
  • Posts: 39
Re: CodeCompletion window different in 20.03
« Reply #3 on: April 16, 2020, 10:25:09 pm »
1600 x 900
Also on the 1680 x 1050 the behaviour is the same.
Windows 10 64b
Arduino 1.8.11 with (modified) Arduino Builder 1.5.1z through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.
Czechia - please pardon my English

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1557
Re: CodeCompletion window different in 20.03
« Reply #4 on: April 16, 2020, 10:28:49 pm »
That is related to Direct Write, see http://forums.codeblocks.org/index.php/topic,23295.msg158707.html#msg158707.

When using Direct Write the text extent calculation is wrong by a factor 72/96, so the text does not fit into the tooltip. Try disabling Direct Write in Settings->Editor.

Offline zdena

  • Multiple posting newcomer
  • *
  • Posts: 39
Re: CodeCompletion window different in 20.03
« Reply #5 on: April 16, 2020, 10:44:33 pm »
The DirectWrite was already deactivated (Default setting). I tried to activate it for fun and the result is even worse.
Windows 10 64b
Arduino 1.8.11 with (modified) Arduino Builder 1.5.1z through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.
Czechia - please pardon my English

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CodeCompletion window different in 20.03
« Reply #6 on: April 17, 2020, 01:45:11 am »
I guess, I'll have to resume cherry picking wxSTC stuff, after I remove support for wx2.8...
Can you reproduce the problem with the latest and greatest stc sample from wxWidgets (you have to build them yourself)?
(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 zdena

  • Multiple posting newcomer
  • *
  • Posts: 39
Re: CodeCompletion window different in 20.03
« Reply #7 on: April 17, 2020, 09:01:33 am »
Unfortunately I can not, probably. This is not area of my knowledge. I tried to understand what did you mean but unsuccesful. Without detailed recipe I really don't know how to build the ... wxSomething.  :-[
Windows 10 64b
Arduino 1.8.11 with (modified) Arduino Builder 1.5.1z through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.
Czechia - please pardon my English

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CodeCompletion window different in 20.03
« Reply #8 on: April 17, 2020, 10:06:52 am »
Download wxWidgets using git. Build it the master branch or the wx3.1.3 tag. cd samples/stc; build this too. Run the executable.

This might help with the building step: http://wiki.codeblocks.org/index.php/Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)
(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 zdena

  • Multiple posting newcomer
  • *
  • Posts: 39
Re: CodeCompletion window different in 20.03
« Reply #9 on: April 17, 2020, 11:37:27 am »
So, I built the master branch of wxWidgets (but I had to manually download src/expat, src/jpeg, src/png, src/tiff and src/zlib - no idea why). I have got a billion of *.d and *.o files after one hour of building.
Then I built the samples/stc and I have got stctest.exe. If I try run it I have got system error in this sense: "Code not possible to run because wxmsw314u_gcc_cb.dll not found. Bla bla."
I have only "codeblocks-20.03\wxmsw313u_gcc_cb.dll" file.

Should I build exactly the tag wx3.1.3 as you suggested as a second possibility? Or could be the reason in the manually downloaded directories mentioned above?

Note: For the building I have used the command
Code
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport" >log.txt 2>&1
from your link.
Windows 10 64b
Arduino 1.8.11 with (modified) Arduino Builder 1.5.1z through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.
Czechia - please pardon my English

Offline zdena

  • Multiple posting newcomer
  • *
  • Posts: 39
Re: CodeCompletion window different in 20.03
« Reply #10 on: April 17, 2020, 12:27:45 pm »
Silly me, the dlls are in lib\gcc_dll. So, I have both wxmsw313u_gcc_cb.dll and wxmsw314u_gcc_cb.dll now. And I am able to run the stctest.exe also for both version.

And what now with them?
Windows 10 64b
Arduino 1.8.11 with (modified) Arduino Builder 1.5.1z through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.
Czechia - please pardon my English

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CodeCompletion window different in 20.03
« Reply #11 on: April 17, 2020, 12:53:13 pm »
I've forgotten that the sample doesn't have the autocomp stuff. I'll prepare a patch later today, so you can use it.
(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: CodeCompletion window different in 20.03
« Reply #12 on: April 17, 2020, 12:59:20 pm »
I'm wrong again. Place the cursor somewhere and type # this should open the autocomp for defines. If you want longer texts you can edit the samples/stc/edit.cpp the list is in the function Edit::OnCharAdded. If it works then the bug would be fixed the next time I sync the changes with wx. Unfortunately this requires dropping wx2.8 first because the code is not really compatible...
(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 zdena

  • Multiple posting newcomer
  • *
  • Posts: 39
Re: CodeCompletion window different in 20.03
« Reply #13 on: April 17, 2020, 01:49:16 pm »
It works, obfuscated. The width of the window with the defines seems to adapt according to the longest text.
Windows 10 64b
Arduino 1.8.11 with (modified) Arduino Builder 1.5.1z through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.
Czechia - please pardon my English

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: CodeCompletion window different in 20.03
« Reply #14 on: April 17, 2020, 02:02:55 pm »
So, I built the master branch of wxWidgets (but I had to manually download src/expat, src/jpeg, src/png, src/tiff and src/zlib - no idea why).
Because you didn't do a recursive clone and hence the submodules were missing.

I did a quick test myself with the sample, the font sizing is still different between both technologies, the popup list is even more narrow in directwrite mode but matches the longest entry perfect. In default mode the box is much wider than the longest entry. Screenshots taken at 100%, left default, right directwrite, latest Windows 10, wxWidgets e5d03323f99d09d6260cc537a444161e9f23a6fd compiled with MSVC 2019.