Author Topic: Display Value Under Cursor - window too small for int variables with short names  (Read 16824 times)

Samuel

  • Guest
I had the same problem and managed to solve it as follows:

Settings > Debugger > Value Tolltip Font (Choose)

My source was less than the minimum available. That may be your problem.

I hope I can have helped you.

Offline gd_on

  • Lives here!
  • ****
  • Posts: 795
The bug described in this post is here again (C::B svn 12448, wxWidgets 3.1.5, Windows 10, but also with 12446 killerbot nightly). I obtain in any case something which looks like the Frame1 image in the first post, but just a small gray square
Changing the size and/or the font in Settings > Debugger > Choose button has no effect.
I have just added a Fit(); at line 1224 in watchesdlg.cpp and it works again.
At lines 1222 and 1223, the 2 m_sizer->Fit ... look strange. If I eliminate one of them or both, it continues to work. Are they necessary ? May be for other OS or wxWidgets version ... I don't know.
I have created a ticket #1100 here
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
This code is the most annoying place in the whole C::B, really.
For me using wx-master, somewhere around 3.1.4-3.1.5-newer, I cannot make it look good at all - it is always smaller. Linux, GTK2.
No combination of Fit/Layout makes it work.
I literally hate this code.
I suppose one day I'll bite the bullet and write a watch control from scratch. How hard could it be!
(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
This code needs major review by someone who understands wxWidgets and sizers and wxPropertyGrid.
There are so many hacks on so many levels. :(  :-[
(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
This topic is about at least two separate issues (both are fixed now in trunk/master).

1. There was a fitting bug which break with the switch to 3.1.5
2. There was a bug which lead to a horizontal scrollbar being visible when the name,value and type of a watched expression are all short.
3. It was possible to expand the tooltip outside of the monitor. Now after an expand the window is clipped, so the content is mostly visible. Unfortunately wxPropGrid behaves strangely - on all ports I've tried the third column is always made visible, which is not what I want, but this is how it is for now.

Please test and report if there are further problems or some regression. Dual monitor setup might be affected more, because I wasn't able to test them.
(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 gd_on

  • Lives here!
  • ****
  • Posts: 795
Tested on Windows 10 with a compilation via Msys2 in 64 bits.
Looks OK.
Not tested on a dual screen config, sorry, I can't.
Anyway, Many thanks. ;D

gd_on
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Please let me know if you find something that bothers you about this.
(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 AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
The SVN 12516 code on Windows 10 21H1 patched to the latest as of yesterday and MSYS 2 MinGW64 also updated to latest as of yesterday with dual monitor shows the "Evaluate expression under cursor" when enabled variable data correctly.


Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
FYI. The display appears to have an extra line which is not very high as per the attachment.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
This is intentional to prevent vertical scrollbars.

I think this is the code responsible for this: https://github.com/obfuscated/codeblocks_sf/blob/d2780b0bae3b69c3fa489af2f08f659be075e8a9/src/src/watchesdlg.cpp#L1122-L1125
(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 AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Have you tried removing it and seeing if there is an issue as the code is 10 years old?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Nope. These kinds of issues don't resolve themselves just by waiting :)
(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!]

cdx

  • Guest
A workaround for this: increase the font size sufficiently in Settings > Debugger > Common > Value Tolltip Font > Choose.

Samuel posted something which is similar but not exactly the same, so I'm posting as well.

Reading the thread, this is probably fixed for nightly builds but the windows version on the download page (3.1.3) has this issue for me. Posting here for people who try to fix it and get here from a search, as I did. For me font size at or above 12 works well for any case I tried, 11 and below can cause clipping.  If 12 doesn't work for you, maybe 14/20/72/etc will.