1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

programmatic scroller changes send notifications

fixed bug with tableview resize
made tableview column resizing
This commit is contained in:
kojima
2001-02-13 23:00:14 +00:00
parent 2172a4478e
commit 07c9bb7d8d
5 changed files with 80 additions and 34 deletions

View File

@@ -120,6 +120,8 @@ applyScrollerValues(WMScrollView *sPtr)
y = 0;
}
x = WMAX(0, x);
y = WMAX(0, y);
@@ -551,9 +553,17 @@ updateScrollerProportion(ScrollView *sPtr)
float prop, value;
if (sPtr->flags.hasHScroller) {
prop = (float)sPtr->viewport->size.width/sPtr->contentView->size.width;
value = WMGetScrollerValue(sPtr->hScroller);
float oldV, oldP;
oldV = WMGetScrollerValue(sPtr->hScroller);
oldP = WMGetScrollerKnobProportion(sPtr->hScroller);
prop = (float)sPtr->viewport->size.width/sPtr->contentView->size.width;
if (oldP == 1.0)
value = 0;
else
value = (prop * oldV) / oldP;
WMSetScrollerParameters(sPtr->hScroller, value, prop);
}
if (sPtr->flags.hasVScroller) {
@@ -563,6 +573,7 @@ updateScrollerProportion(ScrollView *sPtr)
WMSetScrollerParameters(sPtr->vScroller, value, prop);
}
applyScrollerValues(sPtr);
}