Summary: | ScrollBar rendered incorrectly when the range model contains large numbers | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Tools] GEF | Reporter: | fictivy | ||||||
Component: | GEF-Legacy Draw2d | Assignee: | gef-inbox <gef-inbox> | ||||||
Status: | NEW --- | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P4 | CC: | nyssen | ||||||
Version: | unspecified | ||||||||
Target Milestone: | --- | ||||||||
Hardware: | PC | ||||||||
OS: | Windows 2000 | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
fictivy
2007-05-21 08:40:30 EDT
Created attachment 67973 [details]
code example
Would you care to provide a patch to this problem? 50 million is a very large number and well beyond what most GEF clients are trying to display, so this would receive low priority from the GEF team. Created attachment 76053 [details]
Patch to increase range of scrollbar values
The location of the scrollbar thumb is currently calculated using integer math. When the integers become too large, overflow causes unpredictable results. This patch increases the range of possible values by replacing the integer math with floating-point calculations and rounding.
These floating-point calculations increase the range of possible scrollbar values, but it's questionable whether the increased range is worth the additional processing time.
|