Home » U++ Library support » Slider&ProgressIndicator » ProgressIndicator::Set for large value of total
ProgressIndicator::Set for large value of total [message #39730] |
Sun, 21 April 2013 19:54 |
busiek
Messages: 69 Registered: February 2011 Location: Poland
|
Member |
|
|
ProgressIndicator::Set for large total overflows resulting in strange behavior. Solution is to patch uppsrc/CtrlLib/Progress.cpp:
@@ -108,7 +108,7 @@ void ProgressIndicator::Set(int _actual, int _total) {
}
else {
int l = max(1, max(sz.cx, sz.cy));
- p = total ? min(actual * l / total, l) : 0;
+ p = total ? min(iscale(actual, l, total), l) : 0;
}
if(p != pxp) {
pxp = p;
|
|
|
Goto Forum:
Current Time: Sun Dec 08 04:17:02 CET 2024
Total time taken to generate the page: 0.02581 seconds
|