1
The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .
.cbKeyBinder20.conf" where
is where your main codeblocks.conf file resides.| SearchText 'ShowValueTooltip' within src |I'll follow up on this.
| |
| Found 13 matches |
ShowValueTooltip is called from two key locations. First, sdk/ccmanager.cpp checks if a tooltip can be shown when the user hovers over a
variable. If so, a command is sent to GDB. After GDB returns the variable's value, the GDB command in plugins/debuggergdb/gdb_commands.h calls
ShowValueTooltip a second time to actually display the tooltip. The call chain starts with CodeCompletionManager, goes through the debugger
plugin, gets the value from GDB, then DebuggerManager, and finally DebugInterfaceFactory creates the tooltip window. The key call sites are
sdk/ccmanager.cpp and plugins/debuggergdb/gdb_commands.h.
[pecan prompt ]There is a problem when the debugger shows a single line value that is too long and hits the right side of the display. The bottom scroll bar
overlays the value being displayed. The window created is not tall enough to contain both the value and the bottom scroll bar. I want to know
where the window is created and why it isn't tall enough.
[Gemini response]
The value tooltip window sizing appears faulty, obscuring long text with a scrollbar. I'll investigate src/src/watchesdlg.cpp, focusing on the
ValueTooltip class, especially GridSetMinSize and UpdateSizeAndFit functions, and the usage of wxPopupWindow and wxScrolledWindow. I suspect a
height miscalculation in GridSetMinSize or an incorrect virtual size setting. My first step is to reread src/src/watchesdlg.cpp.
| ReadFile src\src\watchesdlg.cpp |
| |
After re-reading src/src/watchesdlg.cpp and analyzing the ValueTooltip class, I've pinpointed the sizing issue.
ValueTooltip Sizing Analysis
The ValueTooltip window is created in its constructor and sized primarily by the GridSetMinSize function. This function calculates the necessary
height and width for the wxPropertyGrid that displays the value.
The issue lies in how the height and width are determined, especially when a horizontal scrollbar is needed.
Height Calculation: The window's height is determined by the content of the wxPropertyGrid.
Width and Scrollbar: When the text content is too wide for the display, GridSetMinSize correctly calculates that a horizontal scrollbar is
needed and sets a virtualWidth.
The Flaw: The crucial oversight is that after deciding to add a horizontal scrollbar, the function does not increase the calculated height of
the window to accommodate the scrollbar itself.
Conclusion
Where the window is created: The ValueTooltip window is created in its constructor within src/src/watchesdlg.cpp.
Why it isn't tall enough: The sizing logic in the GridSetMinSize function in the same file fails to account for the vertical space taken up by
the horizontal scrollbar when it becomes necessary for long lines of text. The window is sized for the text only, so the scrollbar ends up
drawn on top of the last line of text.
To fix this, the code would need to be modified to add the height of a horizontal scrollbar to the total height of the ValueTooltip whenever one
is displayed.
wxWidgets has just published the 3.2.9 release.