Fix for broken scrollbar in lhelp (fix in turbopower_ipro)
Original Reporter info from Mantis: 7bit
-
Reporter name: Bernd Kreuss
Original Reporter info from Mantis: 7bit
- Reporter name: Bernd Kreuss
Description:
This is a fix for turbopower_ipro that will also fix the broken
scrollbar behavior of lhelp on GTk2 and probably also other widgetsets.
When running lhelp on GTk2 (and also the turbopower_ipro example) it is impossible to use the scrollbar of the html panel, it will jump up and down in completely erratic steps when trying to grab the scroll slider and drag it or when using the mouse wheel.
I have already posted this on the mailinglist an hour ago but now I create this report just for the sake of completeness.
in TIpHtmlScrollBar.ScrollMessage() there is a case structure that will in case of a SB_THUMBPOSITION message do a wrong calculation. This line looks like it is there only accidently, I don't see how it could ever make sense for a SB_THUMBPOSITION message with absolute positions and it seems it went unnoticed because it will never be executed on Windows. There it will never receive an SB_THUMBPOSITION message.
On GTK2 it will receive this message and do this wrong calculation and therefore on GTK2 the scrollbar is unusable. The attached patch will fix this.
After applying this patch recompile lhelp and the erratic scroll behaviour of the chm viewer should be fixed.
Mantis conversion info:
- Mantis ID: 17081
- Version: 0.9.29 (SVN)
- Fixed in revision: 26964 (#b441e37b)